Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi There, I Am Trying To Start An Agent In Services Mode With Trains-Server Being On Localhost (But Not Started Together With The Docker-Compose!). My Trains.Conf Is The Following:

Hi there, I am trying to start an agent in services mode with trains-server being on localhost (but not started together with the docker-compose!). My trains.conf is the following:
agent.package_manager.system_site_packages = true agent.extra_docker_shell_script = [ "apt-get update", "apt-get install -y gcc", "apt-get install -y git build-essential libsm6 libxext6 libxrender-dev libglib2.0-0 libgl1-mesa-glx" ] extra_docker_arguments: ["--network='host'", ]and the command to start the agent is the following
TRAINS_API_HOST=" " \ TRAINS_WEB_HOST=" " \ TRAINS_FILES_HOST=" " \ TRAINS_WORKER_ID="trains:services" \ TRAINS_API_ACCESS_KEY="XXXXXXX" \ TRAINS_API_SECRET_KEY="XXXXXXXXXXX" \ trains-agent daemon --services-mode --detached --queue services --create-queue --docker ubuntu:18.04 --cpu-only > ~/trains-agent-services.startup.log 2>&1The problem is that it seems that the tasks being executed with this agent in docker cannot access localhost:8008 . I get an error message that tells me that the address is not accessible. Is there anything I am missing?

  
  
Posted 3 years ago
Votes Newest

Answers 4


I am now trying with agent.extra_docker_arguments: ["--network='host'", ] instead of what I shared above

  
  
Posted 3 years ago

seems like the network inside the running code cannot access the localhost (even though you have --network=host . Could you test it with the machine's IP?
(Actually the best practice is to add a name to the machine (in your hosts file), so that if later you move the server, all the links will be valid)

  
  
Posted 3 years ago

with what I shared above, I now get:
docker: Error response from daemon: network 'host' not found.

  
  
Posted 3 years ago

AgitatedDove14 I finally solved it: The problem was --network='host' should be --network=host

  
  
Posted 3 years ago