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

vote and result services not starting #97

Closed
Jeffboq opened this issue Dec 7, 2017 · 2 comments
Closed

vote and result services not starting #97

Jeffboq opened this issue Dec 7, 2017 · 2 comments

Comments

@Jeffboq
Copy link

Jeffboq commented Dec 7, 2017

Description
When starting application with docker-compose up -d, both vote and result services do not work.

Steps to reproduce the issue, if relevant:

  1. docker-compose up -d
  2. docker-compose ps

Describe the results you received:

$ docker-compose ps
             Name                            Command               State             Ports
---------------------------------------------------------------------------------------------------
db                                docker-entrypoint.sh postgres    Up       5432/tcp
examplevotingappmaster_result_1   nodemon server.js                Exit 0
examplevotingappmaster_vote_1     python app.py                    Exit 2
examplevotingappmaster_worker_1   /bin/sh -c dotnet src/Work ...   Up
redis                             docker-entrypoint.sh redis ...   Up       0.0.0.0:32770->6379/tcp

Describe the results you expected:
examplevotingappmaster_result_1 and examplevotingappmaster_vote_1 containers should be in up state.

Additional information you deem important (e.g. issue happens only occasionally):
Here is the result of docker-compose logs command (db & redis services omitted for clarity)

Attaching to examplevotingappmaster_worker_1, db, examplevotingappmaster_result_1, redis, examplevotingappmaster_vote_1
worker_1  | Waiting for db
worker_1  | Connected to db
worker_1  | Connecting to redis
worker_1  | Found redis at 172.19.0.2
vote_1    | python: can't open file 'app.py': [Errno 2] No such file or directory
result_1  |   Usage: nodemon [nodemon options] [script.js] [args]
result_1  |
result_1  |   See "nodemon --help" for more.
result_1  |
result_1  |   Usage: nodemon [nodemon options] [script.js] [args]

Output of docker version:

Client:
 Version:      17.10.0-ce
 API version:  1.33
 Go version:   go1.8.3
 Git commit:   f4ffd25
 Built:        Tue Oct 17 19:00:02 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.11.0-ce
 API version:  1.34 (minimum version 1.12)
 Go version:   go1.8.5
 Git commit:   1caf76c
 Built:        Mon Nov 20 18:39:28 2017
 OS/Arch:      linux/amd64
 Experimental: false

Additional environment details (AWS, Docker for Mac, Docker for Windows, VirtualBox, physical, etc.):
Running Docker Toolbox on Windows 8.1

@yigitbasalma
Copy link

Hi All;

I resolved that issue.I couldn't understand why we have experienced this issue but my solution worked. =) My docker-compose.yml is below.You could use them if you want.

`version: "2"

services:
vote:
build: ./vote
#volumes:
# - ./vote:/app
ports:
- "5000:80"
networks:
- front-tier
- back-tier

result:
build: ./result
#volumes:
# - ./result:/app
ports:
- "5001:80"
- "5858:5858"
networks:
- front-tier
- back-tier

worker:
build:
context: ./worker
depends_on:
- "redis"
networks:
- back-tier

redis:
image: redis:alpine
container_name: redis
ports: ["6379"]
networks:
- back-tier

db:
image: postgres:9.4
container_name: db
volumes:
- "db-data:/var/lib/postgresql/data"
networks:
- back-tier

volumes:
db-data:

networks:
front-tier:
back-tier:`

@yigitbasalma
Copy link

I found the cause of the issue.My docker and docker-compose version too old.I'm upgraded following the steps of the site below and it worked.

https://docs.docker.com/engine/installation/linux/docker-ce/fedora/

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