<#373 After deploy to Ubuntu machine got Database...
# osctrl
g
#373 After deploy to Ubuntu machine got Database problem Issue created by resulraveendran I installed the osctrl in docker using this Readme "https://github.com/jmpsec/osctrl/tree/main/deploy/docker#running-osctrl-with-docker" And my .env file is like this
Copy code
OSCTRL_VERSION=0.3.4
OSQUERY_VERSION=5.10.2
NGINX_VERSION=1.21.1-alpine
POSTGRES_VERSION=13.5-alpine
POSTGRES_DB_NAME=osctrl
POSTGRES_DB_USERNAME=osctrl
POSTGRES_DB_PASSWORD=osctrl
REDIS_PASSWORD=osctrl
JWT_SECRET=2c98e9c283f55df5bc6c30ac5e35170c7a584552958da475ed7ff04b8ea1859f
OSCTRL_USER=admin
OSCTRL_PASS=1234655
REDIS_VERSION=6.2.6-alpine3.15
But after this when i run docker-compose up -d i got these errors
Copy code
From  "osctrl-admin" container

osctrl-admin      | main.go:613: Initializing backend...
ubuntu-osquery_1  | 2023/11/21 11:32:52 ❌ Failed to execute - Failed to create backend - Failed to load DB configuration - Config File "config" Not Found in "[]"
ubuntu-osquery_1  | sleep: missing operand
ubuntu-osquery_1  | Try 'sleep --help' for more information.
ubuntu-osquery_1  | DB is not ready
osctrl-admin      | 
osctrl-admin      | 2023/11/21 11:32:52 /home/runner/work/osctrl/osctrl/backend/backend.go:64
osctrl-admin      | [error] failed to initialize database, got error failed to connect to `host=postgres user=osctrl database=osctrl`: dial error (dial tcp 172.23.0.3:5432: connect: connection refused)
osctrl-admin      | main.go:621: Failed to connect to backend - Failed to get DB - failed to connect to `host=postgres user=osctrl database=osctrl`: dial error (dial tcp 172.23.0.3:5432: connect: connection refused)
ubuntu-osquery_
Copy code
From osctrl-postgres container

2023-11-22 04:54:31.087 UTC [8899] FATAL:  role "${POSTGRES_USER}" does not exist
2023-11-22 04:54:41.167 UTC [8907] FATAL:  role "${POSTGRES_USER}" does not exist
2023-11-22 04:54:51.248 UTC [8915] FATAL:  role "${POSTGRES_USER}" does not exist
2023-11-22 04:55:01.329 UTC [8922] FATAL:  role "${POSTGRES_USER}" does not exist
2023-11-22 04:55:11.431 UTC [8930] FATAL:  role "${POSTGRES_USER}" does not exist
2023-11-22 04:55:21.507 UTC [8937] FATAL:  role "${POSTGRES_USER}" does not exist
2023-11-22 04:55:31.599 UTC [8944] FATAL:  role "${POSTGRES_USER}" does not exist
2023-11-22 04:55:41.688 UTC [8952] FATAL:  role "${POSTGRES_USER}" does not exist
2023-11-22 04:55:51.813 UTC [8959] FATAL:  role "${POSTGRES_USER}" does not exist
Do you have any idea about to resolve this issue jmpsec/osctrl
p
Hi, I'm getting the same issue too. Any workaround?