-
Notifications
You must be signed in to change notification settings - Fork 12
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
FATAL: data directory "/var/lib/postgresql/data" has wrong ownership #6
Comments
Thanks for reporting. Looking into it. |
Could you delete the existing modelchimp folder in your local system and do a fresh clone. Execute the following within the modelchimp folder
|
Hello Thanks for this update, but I'm still getting some errors at the end when he wants to start modelchimp_redis_1 and modelchimp_db_1: $>.\docker-windows.bat $>docker volume create --name postgres-data -d local $>docker-compose -f docker-compose.yml -f docker-compose.windows.yml up --build --abort-on-container-exit ERROR: for modelchimp_redis_1 Cannot start service redis: driver failed programming external connectivity on endpoint modelchimp_redis_1 (33807c6801f0acdb9e78806dae66076151ca8c518cd9fa56cc0b6edf1d83178b): ErrorRecreating modelchimp_db_1 ... error ERROR: for modelchimp_db_1 Cannot start service db: driver failed programming external connectivity on endpoint modelchimp_db_1 (a1e0f28d522921d6856033bfbd4b5fa34a294b6cf86dc3557d8fab5a1c2e2ed1): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5432:tcp:172.19.0.2:5432: input/output error ERROR: for redis Cannot start service redis: driver failed programming external connectivity on endpoint modelchimp_redis_1 (33807c6801f0acdb9e78806dae66076151ca8c518cd9fa56cc0b6edf1d83178b): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.19.0.3:6379: input/output error ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint modelchimp_db_1 (a1e0f28d522921d6856033bfbd4b5fa34a294b6cf86dc3557d8fab5a1c2e2ed1): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5432:tcp:172.19.0.2:5432: input/output error |
Removing the containers that have been built with the following commands might solve the issue.
This link has information on the commands, you'll have to modify it to corresponding windows version After the above steps are done, execute the .\docker-windows.bat and let me know if it works. P.S I'm on a mac and don't have a windows machine readily with me due to which its difficult to reproduce this. |
Thanks I did remove all the dockers I had and ran it again $>docker volume create --name postgres-data -d local $>docker-compose -f docker-compose.yml -f docker-compose.windows.yml up --build --abort-on-container-exit |
Hmm...not sure why that is happening. I tried it on my friend's window machine and its working. Could you comment out the Line 7 in Dockerfile and run it again |
Still have the same problem even with commenting out the line 7 docker-compose -f docker-compose.yml -f docker-compose.windows.yml up --build --abort-on-container-exit ERROR: for modelchimp_db_1 Cannot start service db: driver failed programming external connectivity on endpoint modelchimp_db_1 (3913c789ca6e6ae8d5e61924d0c998a0671120992b182fdd1ae0ed3f1b5dced1): Error starting userland proxy: mkdir /port/Starting modelchimp_redis_1 ... error ERROR: for modelchimp_redis_1 Cannot start service redis: driver failed programming external connectivity on endpoint modelchimp_redis_1 (a7e8755820f61f54c96177e5f9bf2d841ecfaf9dcc27db8f0dd18159fb1f93b5): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.19.0.3:6379: input/output error ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint modelchimp_db_1 (3913c789ca6e6ae8d5e61924d0c998a0671120992b182fdd1ae0ed3f1b5dced1): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5432:tcp:172.19.0.2:5432: input/output error ERROR: for redis Cannot start service redis: driver failed programming external connectivity on endpoint modelchimp_redis_1 (a7e8755820f61f54c96177e5f9bf2d841ecfaf9dcc27db8f0dd18159fb1f93b5): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.19.0.3:6379: input/output error |
This is a docker error caused by the stray containers again. You'll have to do the container removal that you did earlier which eliminates this error. After this, if there is still an error then you can ping me individually in slack and we can get on skype/hangout to see what's going on |
Hi
I am trying to run the docker installation on windows and it gives me an error every time i want to start the docker, see here the full log:
$ bash docker.sh
Creating network "modelchimp_default" with the default driver
Building web
Step 1/9 : FROM python:3.6.7-stretch
---> 1ec4d11819ad
Step 2/9 : ENV PYTHONUNBUFFERED 1
---> Using cache
---> 1ca747b25fa0
Step 3/9 : ADD requirements.txt /code/
---> Using cache
---> d127eb960b39
Step 4/9 : WORKDIR /code
---> Using cache
---> 1b02ef9d8fbc
Step 5/9 : RUN pip install --upgrade setuptools
---> Using cache
---> 784ff82c5b00
Step 6/9 : RUN pip install -r requirements.txt
---> Using cache
---> d864890d0a5c
Step 7/9 : ADD . /code/
---> Using cache
---> 5701b8f92922
Step 8/9 : RUN apt-get update && apt-get install -y postgresql-client
---> Using cache
---> 38281c757066
Step 9/9 : EXPOSE 8000
---> Using cache
---> af486f650dfa
Successfully built af486f650dfa
Successfully tagged modelchimp_web:latest
Building celery
Step 1/9 : FROM python:3.6.7-stretch
---> 1ec4d11819ad
Step 2/9 : ENV PYTHONUNBUFFERED 1
---> Using cache
---> 1ca747b25fa0
Step 3/9 : ADD requirements.txt /code/
---> Using cache
---> d127eb960b39
Step 4/9 : WORKDIR /code
---> Using cache
---> 1b02ef9d8fbc
Step 5/9 : RUN pip install --upgrade setuptools
---> Using cache
---> 784ff82c5b00
Step 6/9 : RUN pip install -r requirements.txt
---> Using cache
---> d864890d0a5c
Step 7/9 : ADD . /code/
---> Using cache
---> 5701b8f92922
Step 8/9 : RUN apt-get update && apt-get install -y postgresql-client
---> Using cache
---> 38281c757066
Step 9/9 : EXPOSE 8000
---> Using cache
---> af486f650dfa
Successfully built af486f650dfa
Successfully tagged modelchimp_celery:latest
Creating modelchimp_redis_1 ... done
Creating modelchimp_db_1 ... done
Creating modelchimp_web_1 ... done
Creating modelchimp_celery_1 ... done
Attaching to modelchimp_db_1, modelchimp_redis_1, modelchimp_web_1, modelchimp_celery_1
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
redis_1 | 1:C 29 Jan 2019 12:54:36.750 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1 | 1:C 29 Jan 2019 12:54:36.750 # Redis version=5.0.3, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1 | 1:C 29 Jan 2019 12:54:36.750 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1 | 1:M 29 Jan 2019 12:54:36.752 * Running mode=standalone, port=6379.
redis_1 | 1:M 29 Jan 2019 12:54:36.752 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1 | 1:M 29 Jan 2019 12:54:36.752 # Server initialized
redis_1 | 1:M 29 Jan 2019 12:54:36.753 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1 | 1:M 29 Jan 2019 12:54:36.753 * Ready to accept connections
db_1 | creating subdirectories ... ok
db_1 | selecting default max_connections ... 20
db_1 | selecting default shared_buffers ... 400kB
db_1 | selecting dynamic shared memory implementation ... posix
db_1 | creating configuration files ... ok
db_1 | running bootstrap script ... 2019-01-29 12:54:38.177 UTC [77] FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
db_1 | 2019-01-29 12:54:38.177 UTC [77] HINT: The server must be started by the user that owns the data directory.
web_1 | wait-for-postgres.sh: line 3: $'\r': command not found
: invalid option-for-postgres.sh: line 4: set: -
web_1 | set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
web_1 | wait-for-postgres.sh: line 5: $'\r': command not found
web_1 | wait-for-postgres.sh: line 7: $'shift\r': command not found
web_1 | wait-for-postgres.sh: line 9: $'\r': command not found
db_1 | child process exited with exit code 1
db_1 | initdb: removing contents of data directory "/var/lib/postgresql/data"
web_1 | wait-for-postgres.sh: line 18: syntax error: unexpected end of file
celery_1 | wait-for-postgres.sh: line 3: $'\r': command not found
: invalid option-for-postgres.sh: line 4: set: -
celery_1 | set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
celery_1 | wait-for-postgres.sh: line 5: $'\r': command not found
celery_1 | wait-for-postgres.sh: line 7: $'shift\r': command not found
celery_1 | wait-for-postgres.sh: line 9: $'\r': command not found
celery_1 | wait-for-postgres.sh: line 18: syntax error: unexpected end of file
modelchimp_celery_1 exited with code 2
Stopping modelchimp_web_1 ... done
Stopping modelchimp_redis_1 ... done
Stopping modelchimp_db_1 ... done
Aborting on container exit...
The text was updated successfully, but these errors were encountered: