Open majdzr opened 4 years ago
Hi @majdzr,
It seems the issue is that the trains-agent (that runs in docker mode) can successfully translate localhost:8008
and connect to the server, while the Trains SDK running inside the docker received the same address but fails to resolve it.
Try changing the trains-agent configuration for the api_server to <remote-machine-ip>:8008
and see if it works...
Thanks for your reply.
I have changed the localhost with the remote-machine-ip
on trains.conf file, without much luck. I still receive the same error (with the ip instead of localhost, after restarting the daemon). Any ideas?
Are you sure this IP is reachable from inside the docker? Can you try to run the docker manually, open shell and ping it?
If that's not the issue, you can always use the custom docker arguments configuration so that the agent will pass custom arguments to the docker (like --net==host
or similar - see here)
Thanks for your reply. Indeed, setting the --net=host in the configuration file as extra argument solved the mystery. Thanks!
By the way, any magic solution for mapping external directory for the docker (mainly to read data)? Obviously I can use the same logic as above but I was wondering if this is the best.
By the way, any magic solution for mapping external directory for the docker (mainly to read data)? Obviously I can use the same logic as above but I was wondering if this is the best.
Well, assuming this is a fixed folder that contains all your data, (which you will always use), I think the easiest way would be to have it mounted to the same folder inside any docker. You can just add it using the same extra_docker_args
configuration setting, using the value -v host_data:/mnt/data
Hello, thanks for the millionth time for this great project. It literally saves me everyday.
However, I having a problem with trains agent.
Setup:
Scenarios:
trains_agent: ERROR: Connection Error: it seems *api_server* is misconfigured. Is this the TRAINS API server http://localhost:8008 ?
Any idea what is going on?
Thanks, Majd