Saleor: ERROR: for saleor_db_1 Cannot start service db: b'driver failed programming external connectivity on endpoint saleor_db_1

Created on 8 Jul 2019  路  3Comments  路  Source: mirumee/saleor

What I'm trying to achieve

Setup Saleor with Docker for dev

Steps to reproduce the problem

  1. Clone the repo
  2. Run docker-compose build
  3. Run docker-compose run --rm web python3 manage.py migrate

What I expected to happen

Continue with the migrations

Screenshots

System information
Operating system: Win10, Docker

When I run the migrate command I get this error.

`$ docker-compose run --rm web python3 manage.py migrate
Creating network "saleor_saleor-backend-tier" with driver "bridge"
Creating volume "saleor_saleor-db" with local driver
Creating volume "saleor_saleor-redis" with local driver
Creating volume "saleor_saleor-media" with default driver
Pulling db (library/postgres:11.1-alpine)...
11.1-alpine: Pulling from library/postgres
6c40cc604d8e: Pull complete
3ea5fa93d025: Pull complete
146f5c88cacb: Pull complete
1549d653d730: Pull complete
1f52f9ddebb6: Pull complete
a4c85e4b61b7: Pull complete
a562b26ea57a: Pull complete
04f1f3b24313: Pull complete
f2684c2bfb4b: Pull complete
Pulling redis (library/redis:5.0-alpine)...
5.0-alpine: Pulling from library/redis
921b31ab772b: Pull complete
da982f901912: Pull complete
b0a650576779: Pull complete
600c8b9b6cf4: Pull complete
9addbabe0fbf: Pull complete
71dc983a976c: Pull complete
Creating saleor_db_1 ... error
Creating saleor_redis_1 ...

ERROR: for saleor_db_1 Cannot start service db: b'driver failed programming external connectivity on endpoint saleor_db_1 (86c7db8721dc655b347d72cb576c2b9ebfe8868f8571643f3a07c2060fedd921): Error starting userland proxy: mCreating saleor_redis_1 ... error

ERROR: for saleor_redis_1 Cannot start service redis: b'driver failed programming external connectivity on endpoint saleor_redis_1 (724d0440d73565b25df5cfc3e45583cf457a0ae9064e9ae1a1cca87ab29a0cd3): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.23.0.3:6379: input/output error'

ERROR: for db Cannot start service db: b'driver failed programming external connectivity on endpoint saleor_db_1 (86c7db8721dc655b347d72cb576c2b9ebfe8868f8571643f3a07c2060fedd921): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5432:tcp:172.23.0.2:5432: input/output error'

ERROR: for redis Cannot start service redis: b'driver failed programming external connectivity on endpoint saleor_redis_1 (724d0440d73565b25df5cfc3e45583cf457a0ae9064e9ae1a1cca87ab29a0cd3): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.23.0.3:6379: input/output error'
ERROR: Encountered errors while bringing up the project.`

The docker-compose.override.yml file looks like this:

`version: '2'

services:
web:
tty: true
stdin_open: true

ports:
  - 8000:8000
command: python manage.py runserver 0.0.0.0:8000
volumes:
  - ./saleor/:/app/saleor:Z
  - ./templates/:/app/templates:Z
  - ./tests/:/app/tests
  # prevents overshadowing of build-time assets
  # - /app/saleor/static/assets
  - ./webpack-bundle.json:/app/webpack-bundle.json
  # - /app/templates/templated_email/compiled
  # shared volume between celery and web for media
  - saleor-media:/app/media

db:
ports:
- 5432:5432

redis:
ports:
- 6379:6379

celery:
volumes:
- ./saleor/:/app/saleor:Z
- ./templates/:/app/templates:Z
# prevents overshadowing of build-time assets
# - /app/templates/templated_email/compiled
# shared volume between celery and web for media
- saleor-media:/app/media

volumes:
saleor-media:
`

It only works if I remove the line in override file with the web bind mount - ./webpack-bundle.json:/app/webpack-bundle.json

Does anyone has any idea why is this happening. I cannot run Saleor locally with Docker as I cannot mount the assets for local development and building the project for each amendment is time consuming at least.

Thanks

support

Most helpful comment

Hi @anoopsethu you have already installed and run postgreSQL in background. This local program use port 5432.

Please try:
sudo service postgresql stop
sudo update-rc.d postgresql disable

All 3 comments

I still face this issue in my system - can someone help

  • ./webpack-bundle.json:/app/webpack-bundle.json is not there

Anoops-MacBook-Air:tapchief_saleor anoopsethu$ docker-compose run --rm web python3 manage.py migrate
Starting *_saleor_redis_1 ...
Starting *
_saleor_db_1 ... error
Starting *_saleor_redis_1 ... done
ERROR: for *
_saleor_db_1 Cannot start service db: Ports are not available: listen tcp 0.0.0.0:5432: bind: address already in use

ERROR: for db Cannot start service db: Ports are not available: listen tcp 0.0.0.0:5432: bind: address already in use

Hi @anoopsethu you have already installed and run postgreSQL in background. This local program use port 5432.

Please try:
sudo service postgresql stop
sudo update-rc.d postgresql disable

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  4Comments

khalibloo picture khalibloo  路  4Comments

flaviocolonna picture flaviocolonna  路  3Comments

timuric picture timuric  路  3Comments

ranjanprj picture ranjanprj  路  3Comments