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

Impossible de démarrer le conteneur Docker : "cannot start service nginx" #31

Open
Guts opened this issue Feb 20, 2018 · 4 comments
Open

Comments

@Guts
Copy link

Guts commented Feb 20, 2018

J'ai suivi la doc d'installation mais le compose up plante :

PS C:\Users\$USER\Documents\GitHub\Pro\mdchecker> docker-compose up -d
Starting mdchecker_mdchecker_1 ... done
Starting mdchecker_nginx_1 ... error

ERROR: for mdchecker_nginx_1  Cannot start service nginx: Cannot link to a non running container: /mdchecker_mdchecker_1 AS /mdchecker_nginx_1/mdchecker

ERROR: for nginx  Cannot start service nginx: Cannot link to a non running container: /mdchecker_mdchecker_1 AS /mdchecker_nginx_1/mdchecker
ERROR: Encountered errors while bringing up the project.

Env: W10 Pro
docker images:
image

J'ai l'impression que cela provient d'un conflit avec mon image nginx, pourtant l'officielle.

@Guts
Copy link
Author

Guts commented Feb 20, 2018

J'ai l'impression que cela provient d'un conflit avec mon image nginx, pourtant l'officielle.

Même en supprimant l'image et en relançant compose up, ça ne fonctionne toujours pas :

PS C:\Users\$USER\Documents\GitHub\Pro\mdchecker> docker rmi -f 9e988ed19567
Untagged: nginx:latest
Untagged: nginx@sha256:0ffc09487404ea43807a1fd9e33d9e924d2c8b48a7b7897e4d1231a396052ff9
Deleted: sha256:9e988ed19567262bd07d62a8e51b3c0db8bda5d7afd63268860aabfe04d46168
PS C:\Users\$USER\Documents\GitHub\Pro\mdchecker> docker-compose up -d
Pulling nginx (nginx:latest)...
latest: Pulling from library/nginx
8176e34d5d92: Already exists
cb1142c3ae99: Already exists
45b531966c63: Already exists
Digest: sha256:0ffc09487404ea43807a1fd9e33d9e924d2c8b48a7b7897e4d1231a396052ff9
Status: Downloaded newer image for nginx:latest
Starting mdchecker_mdchecker_1 ... done
Starting mdchecker_nginx_1 ... error

ERROR: for mdchecker_nginx_1  Cannot start service nginx: Cannot link to a non running container: /mdchecker_mdchecker_1 AS /mdchecker_nginx_1/mdchecker

ERROR: for nginx  Cannot start service nginx: Cannot link to a non running container: /mdchecker_mdchecker_1 AS /mdchecker_nginx_1/mdchecker
ERROR: Encountered errors while bringing up the project.

@fvanderbiest
Copy link
Contributor

Chez moi ça démarre sans gros soucis:

Creating mdchecker_mdchecker_1 ... done
Creating mdchecker_mdchecker_1 ... 
Creating mdchecker_nginx_1     ... done
Attaching to mdchecker_mdchecker_1, mdchecker_nginx_1
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | ERROR in main [/app/mdchecker/main.py:84]:
mdchecker_1  | [Errno 2] No such file or directory: '/app/mdchecker/conf/app.json'
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | ERROR in main [/app/mdchecker/main.py:85]:
mdchecker_1  | cant read or write /app/mdchecker/conf/app.json, using defaults
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [/app/mdchecker/main.py:101]:
mdchecker_1  | module testContact successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [/app/mdchecker/main.py:101]:
mdchecker_1  | module testDefault successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [/app/mdchecker/main.py:101]:
mdchecker_1  | module testDigitalTransferOptions successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [/app/mdchecker/main.py:101]:
mdchecker_1  | module testGenealogy successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [/app/mdchecker/main.py:101]:
mdchecker_1  | module testInspireKeyword successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [/app/mdchecker/main.py:101]:
mdchecker_1  | module testLicence successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [/app/mdchecker/main.py:101]:
mdchecker_1  | module testMD_Identifier successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [/app/mdchecker/main.py:101]:
mdchecker_1  | module testSpatial successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO:root:Creation of the database: sqlite:////data/mdchecker.db
mdchecker_1  | INFO:root:Database creation succeeded
mdchecker_1  | *** Starting uWSGI 2.0.16 (64bit) on [Tue Feb 20 11:12:43 2018] ***
mdchecker_1  | compiled with version: 4.9.2 on 20 February 2018 11:11:36
mdchecker_1  | os: Linux-4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018
mdchecker_1  | nodename: 44b0684a8f42
mdchecker_1  | machine: x86_64
mdchecker_1  | clock source: unix
mdchecker_1  | pcre jit disabled
mdchecker_1  | detected number of CPU cores: 8
mdchecker_1  | current working directory: /app
mdchecker_1  | detected binary path: /usr/local/bin/uwsgi
mdchecker_1  | dropping root privileges as early as possible
mdchecker_1  | uWSGI running as root, you can use --uid/--gid/--chroot options
mdchecker_1  | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
mdchecker_1  | chdir() to /app
mdchecker_1  | *** WARNING: you are running uWSGI without its master process manager ***
mdchecker_1  | your memory page size is 4096 bytes
mdchecker_1  | detected max file descriptor number: 1048576
mdchecker_1  | lock engine: pthread robust mutexes
mdchecker_1  | thunder lock: disabled (you can enable it with --thunder-lock)
mdchecker_1  | uwsgi socket 0 bound to TCP address 0.0.0.0:5000 fd 3
mdchecker_1  | dropping root privileges after socket binding
mdchecker_1  | uWSGI running as root, you can use --uid/--gid/--chroot options
mdchecker_1  | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
mdchecker_1  | Python version: 2.7.14 (default, Feb 17 2018, 09:47:19)  [GCC 4.9.2]
mdchecker_1  | *** Python threads support is disabled. You can enable it with --enable-threads ***
mdchecker_1  | Python main interpreter initialized at 0xfb59d0
mdchecker_1  | dropping root privileges after plugin initialization
mdchecker_1  | uWSGI running as root, you can use --uid/--gid/--chroot options
mdchecker_1  | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
mdchecker_1  | your server socket listen backlog is limited to 100 connections
mdchecker_1  | your mercy for graceful operations on workers is 60 seconds
mdchecker_1  | mapped 72920 bytes (71 KB) for 1 cores
mdchecker_1  | *** Operational MODE: single process ***
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | ERROR in main [./mdchecker/main.py:84]:
mdchecker_1  | [Errno 2] No such file or directory: './mdchecker/conf/app.json'
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | ERROR in main [./mdchecker/main.py:85]:
mdchecker_1  | cant read or write ./mdchecker/conf/app.json, using defaults
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [./mdchecker/main.py:101]:
mdchecker_1  | module testContact successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [./mdchecker/main.py:101]:
mdchecker_1  | module testDefault successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [./mdchecker/main.py:101]:
mdchecker_1  | module testDigitalTransferOptions successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [./mdchecker/main.py:101]:
mdchecker_1  | module testGenealogy successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [./mdchecker/main.py:101]:
mdchecker_1  | module testInspireKeyword successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [./mdchecker/main.py:101]:
mdchecker_1  | module testLicence successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [./mdchecker/main.py:101]:
mdchecker_1  | module testMD_Identifier successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | INFO in main [./mdchecker/main.py:101]:
mdchecker_1  | module testSpatial successfully loaded
mdchecker_1  | --------------------------------------------------------------------------------
mdchecker_1  | WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0xfb59d0 pid: 1 (default app)
mdchecker_1  | dropping root privileges after application loading
mdchecker_1  | uWSGI running as root, you can use --uid/--gid/--chroot options
mdchecker_1  | *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
mdchecker_1  | *** uWSGI is running in multiple interpreter mode ***
mdchecker_1  | spawned uWSGI worker 1 (and the only) (pid: 1, cores: 1)

Après, l'appli m'envoie des 502 bad gateway par exemple sur http://localhost:8080/new_session/creation/?cat=G%C3%A9oBretagne&OrganisationName=dreal&anytext=&maxharvest=
Il est possible que les récentes évolutions depuis la dockerisation n'ont pas tenu compte de la dockerisation.

Pour ton problème plus spécifique, je pense que c'est lié à ton OS : je soupçonne que les images que nous utilisons sous linux ne sont pas compatibles windows !

@Guts
Copy link
Author

Guts commented Feb 20, 2018

J'utilise des images Linux sur Docker Windows (et non des images Docker Windows). A priori, ça devrait passer...

Ai-je manqué une étape de config ? volume, port...

@bchartier
Copy link
Collaborator

Est-ce que ce ne serait simplement que le port (8080 par défaut je crois) qu'est censé utiliser le nginx du docker-compose de mdchecker est déjà utilisé par autre chose sur ton poste (l'autre nginx ou un tomcat) ?

Sinon le message d'erreur a l'air de dire que le container nginx n'arrive pas à se connecter au container mdcheker parce que ce dernier n'existerait pas alors qu'il indique juste avant qu'il existe bien.

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

3 participants