Git Product home page Git Product logo

Comments (5)

avinashkurup avatar avinashkurup commented on July 18, 2024 1

The issue has been fixed. Thank you once again for your prompt reply and help.

from osctrl.

javuto avatar javuto commented on July 18, 2024

What is the command you used to generate the docker environment? I just tried with master and it did generated a brand new docker osctrl environment with no issues at all. I used make docker_all which is just running ./deploy/docker/dockerize.sh -u -b -f. Please try that and let me know if you are still seeing problems. Thanks!

from osctrl.

avinashkurup avatar avinashkurup commented on July 18, 2024

Thank you Javotu,
I generated the docker environment after pulling latest changes, I used the make docker_all command. I still face the issues as mentioned.

Output of running docker container list.
$ docker ps -a | head
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7236577fcf60 osctrl_osquery-ubuntu18 "/bin/sh wait.sh" 51 seconds ago Up 46 seconds osquery-ubuntu18
814303a61dac nginx:1.13.5 "nginx -g 'daemon of…" 55 seconds ago Exited (1) 49 seconds ago osctrl-nginx
7125b57b5c8a osctrl_osctrl-tls "/osctrl-tls/bin/osc…" About a minute ago Up 55 seconds 0.0.0.0:9000->9000/tcp osctrl-tls
76cc8a5a8e9d osctrl_osctrl-api "/osctrl-api/bin/osc…" About a minute ago Exited (1) 56 seconds ago osctrl-api
7319dc0151ae osctrl_osctrl-admin "/bin/sh /osctrl-adm…" About a minute ago Exited (1) 37 seconds ago osctrl-admin
85e04607fd8d postgres:10-alpine "docker-entrypoint.s…" 3 days ago Up About a minute 0.0.0.0:5432->5432/tcp osctrl-db

I have appended the log after the containers have started.
Successfully built 3594a4671cfe
Successfully tagged osctrl_osquery-ubuntu18:latest
[+] Access osctrl-admin using https://localhost:8443
[+] Running containers
Starting osctrl-db ... done
Recreating osctrl-admin ... done
Recreating osctrl-tls ... done
Recreating osctrl-api ... done
Recreating osctrl-nginx ... done
Recreating osquery-ubuntu18 ... done
Attaching to osctrl-db, osctrl-api, osctrl-tls, osctrl-admin, osctrl-nginx, osquery-ubuntu18
osctrl-admin | Postgres is up - Starting osctrl-admin
osctrl-api | 2020/05/10 23:23:33 ==================== Initializing osctrl-api v0.2.1
osctrl-api | main.go:112: Loading config/api.json
osctrl-api | jwt.go:14: Loading config/jwt.json
osctrl-api | main.go:164: Error loading config/jwt.json - While parsing config: unexpected end of JSON input
osctrl-api exited with code 1
osctrl-db |
osctrl-db | PostgreSQL Database directory appears to contain a database; Skipping initialization
osctrl-db |
osctrl-db | 2020-05-10 23:23:28.788 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
osctrl-db | 2020-05-10 23:23:28.788 UTC [1] LOG: listening on IPv6 address "::", port 5432
osctrl-db | 2020-05-10 23:23:28.946 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
osctrl-db | 2020-05-10 23:23:29.247 UTC [20] LOG: database system was shut down at 2020-05-10 23:20:22 UTC
osctrl-db | 2020-05-10 23:23:29.348 UTC [1] LOG: database system is ready to accept connections
osctrl-tls | 2020/05/10 23:23:34 ==================== Initializing osctrl-tls v0.2.1
osctrl-tls | main.go:93: Loading config/tls.json
osctrl-tls | main.go:142: ==================== Starting osctrl-tls v0.2.1
osctrl-tls | main.go:152: Connection to backend successful!
osctrl-tls | main.go:179: Loading service settings
osctrl-tls | settings.go:390: SetString 0.0.0.0 tls json_listener
osctrl-tls | settings.go:390: SetString 9000 tls json_port
osctrl-tls | settings.go:390: SetString localhost tls json_host
osctrl-tls | settings.go:390: SetString none tls json_auth
osctrl-tls | settings.go:390: SetString db tls json_logging
osctrl-tls | main.go:184: Loading service metrics
osctrl-tls | main.go:190: Loading TLS logger
osctrl-tls | db.go:96: Setting DB logging settings
osquery-ubuntu18 | osctrl is up - Enrolling osctrl-ubuntu18
osctrl-tls | main.go:268: osctrl-tls v0.2.1 - HTTP listening 0.0.0.0:9000
osctrl-tls | utils.go:56: Refreshing settings...
osctrl-tls | utils.go:45: Refreshing environments...
osctrl-nginx | 2020/05/10 23:23:39 [emerg] 1#1: host not found in upstream "osctrl-api" in /etc/nginx/conf.d/api.conf:44
osctrl-nginx | nginx: [emerg] host not found in upstream "osctrl-api" in /etc/nginx/conf.d/api.conf:44
osctrl-nginx exited with code 1
osctrl-admin | Environment dev exists
osquery-ubuntu18 | I0510 23:23:47.335966 7 init.cpp:340] osquery initialized [version=4.2.0]
osquery-ubuntu18 | I0510 23:23:47.336311 7 system.cpp:362] Writing osqueryd pid (7) to /var/run/osqueryd.pidfile
osquery-ubuntu18 | I0510 23:23:47.338867 7 extensions.cpp:349] Could not autoload extensions: Failed reading: /etc/osquery/extensions.load
osquery-ubuntu18 | I0510 23:23:47.340471 8 watcher.cpp:583] osqueryd watcher (7) executing worker (9)
osquery-ubuntu18 | I0510 23:23:47.359158 9 init.cpp:337] osquery worker initialized [watcher=7]
osquery-ubuntu18 | I0510 23:23:47.359905 9 rocksdb.cpp:131] Opening RocksDB handle: /var/osquery/osquery.db
osquery-ubuntu18 | I0510 23:23:47.805342 9 auto_constructed_tables.cpp:93] Removing stale ATC entries
osquery-ubuntu18 | I0510 23:23:47.805356 16 interface.cpp:268] Extension manager service starting: /var/osquery/osquery.em
osquery-ubuntu18 | W0510 23:23:47.806165 9 init.cpp:596] Error reading config: config file does not exist: /etc/osquery/osquery.conf
osquery-ubuntu18 | I0510 23:23:47.831410 9 events.cpp:863] Event publisher not enabled: auditeventpublisher: Publisher disabled via configuration
osquery-ubuntu18 | I0510 23:23:47.831594 9 events.cpp:863] Event publisher not enabled: syslog: Publisher disabled via configuration
osquery-ubuntu18 | I0510 23:23:47.832321 9 events.cpp:1122] Error registering subscriber: process_file_events: Subscriber disabled via configuration
osquery-ubuntu18 | I0510 23:23:47.832382 9 events.cpp:1122] Error registering subscriber: selinux_events: Subscriber disabled via configuration
osquery-ubuntu18 | I0510 23:23:47.832413 9 events.cpp:1122] Error registering subscriber: socket_events: Subscriber disabled via configuration
osquery-ubuntu18 | I0510 23:23:47.832659 9 main.cpp:103] Not starting the distributed query service: Distributed query service not enabled.
osquery-ubuntu18 | I0510 23:23:47.832774 17 events.cpp:784] Starting event publisher run loop: inotify
osquery-ubuntu18 | I0510 23:23:47.838960 18 events.cpp:784] Starting event publisher run loop: udev
osctrl-admin | 2020/05/10 23:23:53 Failed to execute admin already exists
osctrl-admin | Admin user exists
osctrl-admin | 2020/05/10 23:23:53 ==================== Initializing osctrl-admin v0.2.1
osctrl-admin | main.go:159: Loading config/admin.json
osctrl-admin | jwt.go:18: Loading config/jwt.json
osctrl-admin | main.go:229: Error loading config/jwt.json - While parsing config: unexpected end of JSON input
osctrl-admin exited with code 1
osquery-ubuntu18 | I0510 23:25:00.838565 19 database.cpp:140] Resetting the database plugin: rocksdb
osquery-ubuntu18 | I0510 23:25:00.839051 19 rocksdb.cpp:131] Opening RocksDB handle: /var/osquery/osquery.db

from osctrl.

javuto avatar javuto commented on July 18, 2024

Hey Avinash,

Thank you so much for reporting this issue. There was a problem indeed in dockerize.sh and it was using the wrong path for the template to generate the jwt.json, necessary to deploy the osctrl-api component and making the whole deployment to fail. I have added a fix in #70 and I will add it to the 0.2.2 version, which was released today. Please let me know if it works for you and thanks again!

from osctrl.

avinashkurup avatar avinashkurup commented on July 18, 2024

Thank you so much for your help, I just pulled the latest master and ran it on one of the systems which was facing the issue. Now I find all the containers running successfully and the error regarding jwt.json does not come up in the logs.

$ docker ps -a | head
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
482b21936185 osctrl_osquery-ubuntu18 "/bin/sh wait.sh" About a minute ago Up 59 seconds osquery-ubuntu18
897f8cfe2e38 nginx:1.13.5 "nginx -g 'daemon of\u2026" About a minute ago Up About a minute 0.0.0.0:443->443/tcp, 80/tcp, 0.0.0.0:8443->8443/tcp osctrl-nginx
4eeab2c78ce0 osctrl_osctrl-admin "/bin/sh /osctrl-adm\u2026" About a minute ago Up About a minute 0.0.0.0:9001->9001/tcp osctrl-admin
a521aa96d3fc osctrl_osctrl-api "/osctrl-api/bin/osc\u2026" About a minute ago Up About a minute 0.0.0.0:9002->9002/tcp osctrl-api
097be495a6dd osctrl_osctrl-tls "/osctrl-tls/bin/osc\u2026" About a minute ago Up About a minute 0.0.0.0:9000->9000/tcp osctrl-tls
24d63605e9d7 postgres:10-alpine "docker-entrypoint.s\u2026" 19 minutes ago Up 19 minutes 0.0.0.0:5432->5432/tcp osctrl-db

Thank you,
Avinash.

from osctrl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.