Skip to content
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

After deploy to Ubuntu machine got Database problem #373

Closed
resulraveendran opened this issue Nov 22, 2023 · 5 comments
Closed

After deploy to Ubuntu machine got Database problem #373

resulraveendran opened this issue Nov 22, 2023 · 5 comments
Labels
🐛 bug Something isn't working deployment Deployment related issues osctrl-admin osctrl-admin related changes

Comments

@resulraveendran
Copy link

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

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

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_


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

@stepcellwolf
Copy link

I have the same issue. Any solution?

@javuto javuto added 🐛 bug Something isn't working deployment Deployment related issues osctrl-admin osctrl-admin related changes labels Nov 29, 2023
@rinshadka
Copy link

Hello, any progress in this issue?

@javuto
Copy link
Collaborator

javuto commented Dec 3, 2023

Actively looking into this, thanks for your patience!

@javuto
Copy link
Collaborator

javuto commented Dec 5, 2023

Please take a look at the latest commits in #341, it may help solve some of the docker issues. Thank you!

@javuto javuto closed this as completed Mar 2, 2024
@javuto
Copy link
Collaborator

javuto commented Mar 2, 2024

Try the latest changes merged for the docker-dev environment, that should solve all the issues. Thanks!

#393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working deployment Deployment related issues osctrl-admin osctrl-admin related changes
Projects
None yet
Development

No branches or pull requests

4 participants