Open tokenwizard opened 10 months ago
Just as an update, I left that running for two hours and other than additional lines of output from db_1 about the root user, there is no progress. I never get any console output from the web_1 container, but also no errors.
I'm in the same boat. Here are my logs:
mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.pack': Permission denied mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.idx': Permission denied mediacms-migrations-1 exited with code 0 mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.pack': Permission denied mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.idx': Permission denied mediacms-migrations-1 exited with code 1 mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.pack': Permission denied mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.idx': Permission denied mediacms-migrations-1 exited with code 1 mediacms-db-1 | 2023-12-07 20:50:18.603 GMT [64] FATAL: role "root" does not exist mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.pack': Permission denied mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.idx': Permission denied mediacms-migrations-1 exited with code 1 mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.pack': Permission denied mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.idx': Permission denied mediacms-migrations-1 exited with code 1 mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.pack': Permission denied mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.idx': Permission denied mediacms-migrations-1 exited with code 1 mediacms-db-1 | 2023-12-07 20:50:28.677 GMT [71] FATAL: role "root" does not exist mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.pack': Permission denied mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.idx': Permission denied mediacms-migrations-1 exited with code 1 mediacms-db-1 | 2023-12-07 20:50:38.746 GMT [79] FATAL: role "root" does not exist mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.pack': Permission denied mediacms-migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-25ede325a6de19191c8a51f31995ac6967b074af.idx': Permission denied mediacms-migrations-1 exited with code 1 mediacms-db-1 | 2023-12-07 20:50:48.815 GMT [86] FATAL: role "root" does not exist mediacms-db-1 | 2023-12-07 20:50:58.880 GMT [94] FATAL: role "root" does not exist mediacms-db-1 | 2023-12-07 20:51:08.942 GMT [101] FATAL: role "root" does not exist
Web app service never starts. I've seen your comment in #894 but in this case it is not just spam.
MacOS silicon Docker Desktop Git clone => docker compose up
same issue.. Did anyone fix it? @johann-taberlet @tokenwizard
As mentioned in https://github.com/mediacms-io/mediacms/issues/894#issuecomment-1748529012, this is just a message that can be ignored. You should be able to access http://localhost
while the console is still printing these logs.
However, if you want to remove these logs, one solution is to add the PGUSER
variable in the docker-compose.yaml
file:
db:
image: postgres:15.2-alpine
volumes:
- ../postgres_data:/var/lib/postgresql/data/
restart: always
environment:
POSTGRES_USER: mediacms
POSTGRES_PASSWORD: mediacms
POSTGRES_DB: mediacms
PGUSER: mediacms # add here
...
Other solutions are mentioned here.
@lin-yifan1 I have one more issue while running this project via docker on my macbook.
Below is the docker logs while running it. Do you know how to fix this?
migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-1142396be754e21cc4a78e06971f59a7f8e93928.pack': Permission denied
migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-1142396be754e21cc4a78e06971f59a7f8e93928.idx': Permission denied
migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-54d2a9b6e4fa977aff5571d90743b6833b2ca907.idx': Permission denied
migrations-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-54d2a9b6e4fa977aff5571d90743b6833b2ca907.pack': Permission denied
celery_worker-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-1142396be754e21cc4a78e06971f59a7f8e93928.pack': Permission denied
web-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-1142396be754e21cc4a78e06971f59a7f8e93928.pack': Permission denied
celery_worker-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-1142396be754e21cc4a78e06971f59a7f8e93928.idx': Permission denied
web-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-1142396be754e21cc4a78e06971f59a7f8e93928.idx': Permission denied
celery_worker-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-54d2a9b6e4fa977aff5571d90743b6833b2ca907.idx': Permission denied
web-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-54d2a9b6e4fa977aff5571d90743b6833b2ca907.idx': Permission denied
celery_worker-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-54d2a9b6e4fa977aff5571d90743b6833b2ca907.pack': Permission denied
web-1 | chown: changing ownership of '/home/mediacms.io/mediacms/.git/objects/pack/pack-54d2a9b6e4fa977aff5571d90743b6833b2ca907.pack': Permission denied
As mentioned in #894 (comment), this is just a message that can be ignored. You should be able to access
http://localhost
while the console is still printing these logs. However, if you want to remove these logs, one solution is to add thePGUSER
variable in thedocker-compose.yaml
file:db: image: postgres:15.2-alpine volumes: - ../postgres_data:/var/lib/postgresql/data/ restart: always environment: POSTGRES_USER: mediacms POSTGRES_PASSWORD: mediacms POSTGRES_DB: mediacms PGUSER: mediacms # add here ...
Other solutions are mentioned here.
While I can confirm this does fix the root role errors cluttering up the console, unfortunately it does not fix the non-start issue. I have done a docker-composer up
and let it sit for hours and the db_1
and redis_1
containers start up without error, but the web
container never starts or is mentioned in the console. It just seems to hang there after starting redis_1
and is never accessible via the web interface.
As mentioned in #894 (comment), this is just a message that can be ignored. You should be able to access
http://localhost
while the console is still printing these logs. However, if you want to remove these logs, one solution is to add thePGUSER
variable in thedocker-compose.yaml
file:db: image: postgres:15.2-alpine volumes: - ../postgres_data:/var/lib/postgresql/data/ restart: always environment: POSTGRES_USER: mediacms POSTGRES_PASSWORD: mediacms POSTGRES_DB: mediacms PGUSER: mediacms # add here ...
Other solutions are mentioned here.
While I can confirm this does fix the root role errors cluttering up the console, unfortunately it does not fix the non-start issue. I have done a
docker-composer up
and let it sit for hours and thedb_1
andredis_1
containers start up without error, but theweb
container never starts or is mentioned in the console. It just seems to hang there after startingredis_1
and is never accessible via the web interface.
in my case i can access application on localhost but backend(api calls failing) seems to be not working by throwing errors. as api's are failing it is waste with frontend working.
I have the exact same problem on Docker for Windows. The web container simply doesn't want to run... which means this entire application doesn't work for me, and perhaps many others judging by this thread here.
Is there anything we are all collectively missing? I've tried the standard port 80, as well as alternative ports (xxxx:80). Docker Desktop is giving me the following error log:
(HTTP code 400) unexpected - failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./deploy/docker/entrypoint.sh": stat ./deploy/docker/entrypoint.sh: no such file or directory: unknown
Had the same problem. However it works when I switched to Rancher Desktop from Docker Desktop, see if it helps.
If Docker Desktop is required, I worked around it by manually running scripts (entrypoint.sh
, prestart.sh
, start.sh
) in e.g. ./deploy/docker/prestart.sh
manner.
Running script by cd /deploy/docker
first then e.g. ./prestart.sh
causes some other error.
May need to manually run the lines related to migration in prestart.sh
for the first time.
This workaround needs manually running scripts to start the web container everytime afterwards though.
Had the same problem. However it works when I switched to Rancher Desktop from Docker Desktop, see if it helps.
If Docker Desktop is required, I worked around it by manually running scripts (
entrypoint.sh
,prestart.sh
,start.sh
) in e.g../deploy/docker/prestart.sh
manner. Running script bycd /deploy/docker
first then e.g../prestart.sh
causes some other error. May need to manually run the lines related to migration inprestart.sh
for the first time. This workaround needs manually running scripts to start the web container everytime afterwards though.
Thanks for this comment. Could you please give more details about the work around? In which container did you run the scripts? when running in Docker Desktop, following containers are appearing:
mediacms-celery_beat-1 (failing) mediacms-migrations-1 (failing) mediacms-db-1 (running)
I'm getting the same error. My Docker compose version never launchs. Any update?
I tried to deploy a fresh version besides my old running instance (which mysteriously died with a 502 error after an update), but I'm getting the same problems as everyone else here. There's a problem apparently with the db, I can see the mediacms homepage anyhow but never a sign-in button and when I actually head to the sign-in page, all I see is a django error page :/
I'm getting this every time when trying to run:
WARN[0000] The "POSTGRES_DB" variable is not set. Defaulting to a blank string. WARN[0000] The "POSTGRES_USER" variable is not set. Defaulting to a blank string.
Even though my docker-compose.yaml has these set, as well as deploy/docker/local_settings.py
I have the exact same problem on Docker for Windows. The web container simply doesn't want to run... which means this entire application doesn't work for me, and perhaps many others judging by this thread here.
Is there anything we are all collectively missing? I've tried the standard port 80, as well as alternative ports (xxxx:80). Docker Desktop is giving me the following error log:
(HTTP code 400) unexpected - failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./deploy/docker/entrypoint.sh": stat ./deploy/docker/entrypoint.sh: no such file or directory: unknown
Same error here. Glad this seems to be a widespread issue with the docker compose deploy.
Hi guys, I found out the problem. It seems to be some permission issues while running the containers on a OSX computer. The line 31 in deploy/docker/entrypoint.sh
file tries to assert the correct file permissions for the www-data
user. it works essentialy for all files copied into the folder during the docker image build process. However, since the project's root directory is mounted as volume in the same directory /home/mediacms.io/mediacms/
, the .git
folder is then placed under /home/mediacms.io/mediacms/.git
with root permissions, causing the command find /home/mediacms.io/ ! \( -user www-data -group $TARGET_GID \) -exec chown www-data:$TARGET_GID {} +
to fail. Once it fails, the migrations and other tasks the containers depends on also fail, causing the errors mentioned by @vijaykumar1710 and @johann-taberlet.
My solution was to modify thefind
command above in the deploy/docker/entrypoint.sh
file to this one:
find /home/mediacms.io/ ! \( -path "*.git*" \) -and ! \( -user www-data -group $TARGET_GID \) -exec chown www-data:$TARGET_GID {} +
This command also ignores anything in the .git
directory, avoiding the permission errors during the containers launch.
I've also made the PR #1052 to fix this issue.
Hi guys, I think I fixed the problem for Windows. You need to open all the .sh files in the deploy/docker path with Notepad++ and convert them to Unix (LF) line endings.
Hi all, thanks anyone that participated in this thread, I've merged the PRs that fix this and it should not be aproblem anymore, can you checkout the latest main branch and try it out?
Thanks a lot!
Describe the issue I followed the Docker Compose installation steps and it seems like the services are starting up, but they just seem to be indefinitely launching and never completely running.
To Reproduce Steps to reproduce the issue:
docker-compose up
mediacms_web
container never seems to run. So far it has been about 10 minutes and the output is still as you see below.Expected behavior Expect all services to start up and be accessible at http://SERVER_IP
Screenshots
Environment (please complete the following information):