clearml-server icon indicating copy to clipboard operation
clearml-server copied to clipboard

Error when starting docker

Open sagyHarpaz opened this issue 4 years ago • 11 comments

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

sagyHarpaz avatar Aug 10 '20 13:08 sagyHarpaz

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.

bmartinn avatar Aug 10 '20 20:08 bmartinn

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

sagyHarpaz avatar Aug 16 '20 12:08 sagyHarpaz

@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.

jkhenning avatar Aug 16 '20 13:08 jkhenning

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

sagyHarpaz avatar Aug 16 '20 13:08 sagyHarpaz

@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)

jkhenning avatar Aug 16 '20 14:08 jkhenning

image

sagyHarpaz avatar Aug 16 '20 14:08 sagyHarpaz

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 🙂

jkhenning avatar Aug 16 '20 14:08 jkhenning

I already have the latest version 2.3.0.4 (46911)

sagyHarpaz avatar Aug 16 '20 14:08 sagyHarpaz

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: https://github.com/docker-library/mongo/issues/385

jkhenning avatar Aug 16 '20 14:08 jkhenning

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

sagyHarpaz avatar Aug 17 '20 03:08 sagyHarpaz

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

evg-allegro avatar Aug 17 '20 08:08 evg-allegro