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

ERROR: for web Container "120209d872b5" is unhealthy #1

Closed
xStevex opened this issue Sep 28, 2023 · 4 comments
Closed

ERROR: for web Container "120209d872b5" is unhealthy #1

xStevex opened this issue Sep 28, 2023 · 4 comments

Comments

@xStevex
Copy link

xStevex commented Sep 28, 2023

I'm having trouble with an error and I'm not sure how to fix it.

ERROR: for web  Container "120209d872b5" is unhealthy.
ERROR: Encountered errors while bringing up the project.
Docker version 20.10.17, build 100c701

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

Linux remnux 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
@nikhilh-20
Copy link
Owner

nikhilh-20 commented Sep 28, 2023

Do you have more console logs from when you did a docker compose up? Was there some other service which failed before the web container was brought up? The web container relies on other containers to be up and properly functioning. Also, ELFEN was only tested on Ubuntu 22.04.2.

  • Try recreating the docker containers. This error may be intermittent.
$ docker compose down
$ docker compose up --force-recreate
  • Try rebuilding ELFEN from scratch
$ docker compose build --no-cache
$ docker compose up

@xStevex
Copy link
Author

xStevex commented Sep 28, 2023

I tried already docker compose up --force-recreate and docker compose build --no-cache and it didn't helped.

Also, I deleted old docker and installed the newest version Docker version 24.0.6, build ed223bc
In the new console, I see this message:
image

chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
chmod: changing permissions of '/var/run/postgresql': Operation not permitted

It looks like I have issues with the Postgres container.

Some other artifacts:
image
image
image

@xStevex
Copy link
Author

xStevex commented Sep 28, 2023

I removed user: 1000:1000 # Solves data directory permission issues from docker-compose.yml
image

and it fixed the issue.
image

@nikhilh-20
Copy link
Owner

I would highly recommend not running docker containers as root user as a best practice.

Your issue was caused because data/postgres directory was owned by root (you likely went through the setup instructions as root user). Since PostgreSQL container runs as a non-root user (user: 1000:1000), it was causing a permission issue in your setup.

Again, I would highly recommend not setting up / running ELFEN as root user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants