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

Error when starting docker #56

Open
sagyHarpaz opened this issue Aug 10, 2020 · 11 comments
Open

Error when starting docker #56

sagyHarpaz opened this issue Aug 10, 2020 · 11 comments

Comments

@sagyHarpaz
Copy link

Hi when I tried to run "docker-compose -f docker-compose-win10.yml up"
I got:
Unexpected API error for trains-redis (HTTP code 502)
Response body:
Bad response from Docker engine

Unexpected API error for trains-webserver (HTTP code 502)
Response body:
Bad response from Docker engine

Unexpected API error for trains-elastic (HTTP code 502)
Response body:
Bad response from Docker engine

Unexpected API error for trains-apiserver (HTTP code 502)
Response body:
Bad response from Docker engine

Unexpected API error for trains-fileserver (HTTP code 502)
Response body:
Bad response from Docker engine

@bmartinn
Copy link
Member

Hi @sagyHarpaz
From the error codes all dockers are not running, and it seems like there is an issue with the docker service for windows setup (not specifically the trains-server dockers).
Did you follow the Windows 10 instructions here ?
Notice step (2) increasing the default memory for the docker service.

@sagyHarpaz
Copy link
Author

I always got this message
pymongo.errors.ServerSelectionTimeoutError: mongo:27017: [Errno -2] Name or service not known

@jkhenning
Copy link
Member

@sagyHarpaz can you see if the trains-mongo docker is up? Assuming you're using Windows, you can open the Docker-Desktop dashboard and see the status of the container.

You can also use the docker ps command to get a list of the containers and see the status of trains-mongo - do that several times and see if the container is up, or keeps restarting.

Also, assuming there's something wrong with the container, use docker logs trains-mongo to get the full container logs - please share it so we can better understand the issue.

@sagyHarpaz
Copy link
Author

When I ran docker ps command I got:
image
and when Iran docker logs trains-mongo I got
log.txt

@jkhenning
Copy link
Member

@sagyHarpaz did you check the Docker Desktop's sharing option? Check Docker Desktop\Settings\Resources\File Sharing and see if the data folder you use in the docker-compose is listed there. If not, try adding it and restart Trains Server (docker-compose down and than docker-compose up)

@sagyHarpaz
Copy link
Author

image

@jkhenning
Copy link
Member

jkhenning commented Aug 16, 2020

Can you check what is your Docker Desktop version? In the past, we experienced issues with specific versions.
Our last test was with version 2.3.0.4 (46911) which is still the latest.

In any case, I suggest trying to update to the latest version and try again 🙂

@sagyHarpaz
Copy link
Author

I already have the latest version 2.3.0.4 (46911)

@jkhenning
Copy link
Member

jkhenning commented Aug 16, 2020

OK, this might be a volume issue, try the following:

Edit the docker-compose file, change the mongo service' volumes and add a new volume at the end of the file:

services:
  ...
  mongo:
        volumes:
        - mongodata:/data/db
        - c:/opt/trains/data/mongo/configdb:/data/configdb

...

volumes:
  mongodata:

Then do:

docker-compose down
docker volume create --name=mongodata
docker-compose up

BTW - seems like a known mongo issue on Windows: docker-library/mongo#385

@sagyHarpaz
Copy link
Author

now I get this error
elasticsearch.exceptions.RequestError: RequestError(400, 'action_request_validation_exception', 'Validation Failed: 1: template is missing;')

@evg-allegro
Copy link
Contributor

Hi @sagyHarpaz, can you please share the logs from trains-elastic and trains-apiserver dockers? I suspect that we will see some errors there.
To get the elasticsearch logs into a file run: sudo docker logs trains-elastic >& elastic.logs
For the apiserver: sudo docker logs trains-apiserver >& apiserver.logs

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

4 participants