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
Trying To Setup A Trains-Agent Worker On A Remote Machine; When I Run Trains-Init And Follow The Steps To Give It Credentials For Our Trains Server I Get This

Trying to setup a trains-agent worker on a remote machine; when I run trains-init and follow the steps to give it credentials for our trains server I get this
Verifying credentials ... Error: could not verify credentials:Any advice on determining what's going wrong here?
Trying to set this up through SSH on a secure VPN if that's relevant -- happy to provide any other relevant info.
Thanks!

  
  
Posted 4 years ago
Votes Newest

Answers 30


Yeah, that makes sense. So could this be an issue with how we've configured our trains server then?

  
  
Posted 4 years ago

yeah that's in the ~/trains.conf both locally (which works) and on the remote machine I'm trying to set up (which doesn't work)

  
  
Posted 4 years ago

But the same configuration does not work on the machine with the trains-agent?

  
  
Posted 4 years ago

(btw thanks so much for all your help debugging this, really appreciate it 🙂 )

  
  
Posted 4 years ago

the only port configurations that will work are 8080 / 8008 / 8081

  
  
Posted 4 years ago

Was given http, but I'll try https!

  
  
Posted 4 years ago

https ?

  
  
Posted 4 years ago

Yeah no idea why it said https there, the trains.conf has http for everything for sure.
And oops yeah the port it said there was :8010 which seems strange to me as well

  
  
Posted 4 years ago

are you using http?

  
  
Posted 4 years ago

Also of interest:
curl http://<IP>:8008/ gives a response when we run it locally, which I think gives further support to the idea that this is firewall related.

We've opened a ticket with our IT dept to see if they can help us, but not super optimistic there lol.

I'll update here if we figure out anything more on this. Thanks again for your help!

  
  
Posted 4 years ago

hmm yeah seems very strange to me too.
So does the fact that trains-agent list gives
trains_agent: ERROR: Connection Error: it seems *api_server* is misconfigured. Is this the TRAINS API server https://<IP>:8010 ?or that curl http://<IP>:8008 gives nothing
give us any useful info? Or are those relatively normal?

  
  
Posted 4 years ago

Yeah that's what I would expect!
Neither https nor 8010 appear anywhere in ~/trains.conf, but yeah trains-agent list gives
trains_agent: ERROR: Connection Error: it seems *api_server* is misconfigured. Is this the TRAINS API server https://<IP>:8010 ?

  
  
Posted 4 years ago

curl seems okay, but this is odd https://<IP>:8010
it should be http://<IP>:8008
Could you change and test?
(meaning change the trains.conf and run trains-agent list )

  
  
Posted 4 years ago

Yeah definitely seems odd -- that's not actually coming from trains.conf though:
` api {
api_server: http://<IP>:8008
web_server: http://<IP>:8080
files_server: http://<IP>:8081

credentials {"access_key": <ACCESS>, "secret_key": <SECRET>}

} `Maybe it's something on the server side?

  
  
Posted 4 years ago

that might be it.
Is the web UI working properly ?
What ports are you using?

  
  
Posted 4 years ago

web / api / files

  
  
Posted 4 years ago

We have the server running on a GCP instance and haven't changed anything there for a long time

  
  
Posted 4 years ago

yeah no luck with either

  
  
Posted 4 years ago

this issue on when trying to set up on our remote machines

You mean setting up the trains-server on remote machine?

  
  
Posted 4 years ago

I'm guessing some network issue, though I can't figure why it cannot connect and curl seems to work

  
  
Posted 4 years ago

where is the port? why https ?

  
  
Posted 4 years ago

Could you manually configure the ~/trains.conf ?
(Just copy paste the section from the UI)
then try to run:
trains-agent list

  
  
Posted 4 years ago

corporate firewall... let's start with http 🙂

  
  
Posted 4 years ago

okay, just so I understand, this is what you have on your client that can connect with the server:
api { api_server: web_server: files_server: credentials {"access_key": "KEY", "secret_key": "SECRET"} }

  
  
Posted 4 years ago

I wasn't the one who configured the server, so I don't know much about that process, but I can ask for details if we need

  
  
Posted 4 years ago

trains_agent: ERROR: Connection Error: it seems *api_server* is misconfigured. Is this the TRAINS API server https://<<trains-server_ip>> ?

  
  
Posted 4 years ago

okay so the error should have been:

trains_agent: ERROR: Connection Error: it seems api_server is misconfigured. Is this the TRAINS API server http://<IP>:8008 ?

Not https nor 8010 ?!

  
  
Posted 4 years ago

http vs https ?

  
  
Posted 4 years ago

No, I meant with setting up trains agents -- stuck on trains-init

  
  
Posted 4 years ago

Yeah the web UI is working fine on 8080, and we've been able to run things locally on our laptops fine; only encountering this issue on when trying to set up on our remote machines

  
  
Posted 4 years ago
1K Views
30 Answers
4 years ago
one year ago
Tags