-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error loading config/jwt.json on deploying osctrl with dockerize.sh #67
Comments
What is the command you used to generate the docker environment? I just tried with |
Thank you Javotu, Output of running docker container list. I have appended the log after the containers have started. |
Hey Avinash, Thank you so much for reporting this issue. There was a problem indeed in |
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 Thank you, |
The issue has been fixed. Thank you once again for your prompt reply and help. |
Hello,
I am using the latest master branch for deploying osctrl. I am deploying using the dockerize.sh script and face the following issues on deployment.
I find that osctrl-api container is in an exited state. After the script runs I see the following.
$ docker ps -a | head
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
540aa20eaa4d osctrl_osquery-ubuntu18 "/bin/sh wait.sh" About an hour ago Up About an hour osquery-ubuntu18
1d14cad30249 nginx:1.13.5 "nginx -g 'daemon of…" About an hour ago Up About an hour 0.0.0.0:443->443/tcp, 80/tcp, 0.0.0.0:8443->8443/tcp osctrl-nginx
d40d37391fbb osctrl_osctrl-tls "/osctrl-tls/bin/osc…" About an hour ago Up About an hour 0.0.0.0:9000->9000/tcp osctrl-tls
11298d44696b osctrl_osctrl-api "/osctrl-api/bin/osc…" About an hour ago Exited (1) About an hour ago osctrl-api
b09756739c1a osctrl_osctrl-admin "/bin/sh /osctrl-adm…" About an hour ago Exited (1) About an hour ago osctrl-admin
85e04607fd8d postgres:10-alpine "docker-entrypoint.s…" About an hour ago Up About an hour 0.0.0.0:5432->5432/tcp osctrl-db
I would like to add that this issue I face with osctrl-admin as well.
osctrl-admin | Created admin user
osctrl-admin | main.go:159: Loading config/admin.json
osctrl-admin | jwt.go:18: Loading config/jwt.json
osctrl-admin | main.go:228: Error loading config/jwt.json - While parsing config: unexpected end of JSON input
osctrl-admin exited with code 1
I find osctrl-api and osctrl-admin in the exited state after the script runs.
I also find these messages in the log.
osctrl-admin | 2020/05/07 01:51:01 Failed to load DB - dial tcp 172.18.0.2:5432: connect: connection refused
osctrl-db | creating subdirectories ... ok
osctrl-db | selecting default max_connections ... 100
osctrl-db | selecting default shared_buffers ... 128MB
osctrl-db | selecting default timezone ... UTC
osctrl-db | selecting dynamic shared memory implementation ... posix
osctrl-db | creating configuration files ... ok
osctrl-db | running bootstrap script ... ok
osctrl-db | performing post-bootstrap initialization ... sh: locale: not found
osctrl-db | 2020-05-07 01:50:52.870 UTC [29] WARNING: no usable system locales were found
osctrl-db | ok
osctrl-db | syncing data to disk ...
osctrl-db | WARNING: enabling "trust" authentication for local connections
osctrl-db | You can change this by editing pg_hba.conf or using the option -A, or
osctrl-db | --auth-local and --auth-host, the next time you run initdb.
osctrl-db | ok
osctrl-db |
osctrl-db | Success. You can now start the database server using:
osctrl-db |
osctrl-db | pg_ctl -D /var/lib/postgresql/data -l logfile start
osctrl-db |
osctrl-db | waiting for server to start....2020-05-07 01:51:01.424 UTC [34] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
osctrl-db | 2020-05-07 01:51:01.568 UTC [35] LOG: database system was shut down at 2020-05-07 01:50:57 UTC
osctrl-db | 2020-05-07 01:51:01.601 UTC [34] LOG: database system is ready to accept connections
osctrl-db | done
osctrl-db | server started
osctrl-db | CREATE DATABASE
osctrl-db |
osctrl-db |
osctrl-db | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
osctrl-db |
osctrl-db | waiting for server to shut down....2020-05-07 01:51:02.910 UTC [34] LOG: received fast shutdown request
osctrl-db | 2020-05-07 01:51:03.016 UTC [34] LOG: aborting any active transactions
osctrl-db | 2020-05-07 01:51:03.017 UTC [34] LOG: worker process: logical replication launcher (PID 41) exited with exit code 1
osctrl-db | 2020-05-07 01:51:03.017 UTC [36] LOG: shutting down
osctrl-db | 2020-05-07 01:51:03.513 UTC [34] LOG: database system is shut down
osctrl-db | done
osctrl-db | server stopped
osctrl-db |
osctrl-db | PostgreSQL init process complete; ready for start up.
osctrl-db |
osctrl-db | 2020-05-07 01:51:03.893 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
osctrl-db | 2020-05-07 01:51:03.893 UTC [1] LOG: listening on IPv6 address "::", port 5432
osctrl-db | 2020-05-07 01:51:04.002 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
osctrl-db | 2020-05-07 01:51:04.330 UTC [45] LOG: database system was shut down at 2020-05-07 01:51:03 UTC
osctrl-db | 2020-05-07 01:51:04.360 UTC [46] FATAL: the database system is starting up
osctrl-db | 2020-05-07 01:51:04.456 UTC [1] LOG: database system is ready to accept connections
osctrl-admin | Postgres is unavailable - Waiting...
Please help me with fixing this issue in deployment.
Thank you,
Avinash.
The text was updated successfully, but these errors were encountered: