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, I'M Getting

Hi, I'm getting
trains_agent: ERROR: 'NoneType' object has no attribute 'startswith'When doing
trains-agent daemon --stopAny idea why would that happen? (ATM I can't disable a worker without shutting down the machine / killing the process)
Also, could you please enable closing workers from the UI?
Thanks.

  
  
Posted 4 years ago
Votes Newest

Answers 27


The trains-agent prints out the temp folder as part of the configuration dump to the log, when it starts

  
  
Posted 4 years ago

Does the file contain the agent's PID?

  
  
Posted 4 years ago

Actually the 5031 is the PID.

  
  
Posted 4 years ago

I see, I'll try that

  
  
Posted 4 years ago

in the file's name

  
  
Posted 4 years ago

By the way, what about enabling closing workers from the UI? 🙂

  
  
Posted 4 years ago

I found the temp files

What's the path they're located in?

  
  
Posted 4 years ago

And how can I tell which TRAINS_WORKER_ID I'm using?

  
  
Posted 4 years ago

Nope, I've run them with the command I've written here

  
  
Posted 4 years ago

How can I tell what's the temp folder path?

  
  
Posted 4 years ago

Did you run the agents using sudo ?

  
  
Posted 4 years ago

Let me check this out

  
  
Posted 4 years ago

I've ran this 8 times:
trains-agent --config-file /opt/trains/trains.conf daemon --detached --cpu-only --queue important_cpu_queue cpu_queueThe version is 0.16.2rc0 (a version Mushik gave me that supports local conda env)

  
  
Posted 4 years ago

It's important to say that this happens when I have more than like 4 workers but when I run the
trains-agent daemon --stopWith less than 4 workers it works well

  
  
Posted 4 years ago

By the way, what about enabling closing workers from the UI?

As always, we'll appreciate a GitHub issue for feature requests 🙂 - I'll write it down

  
  
Posted 4 years ago

SuccessfulKoala55 I found the temp files, they contain the supposedly worker id, which seems just fine

  
  
Posted 4 years ago

I'll add the fix to the startswith error you've reported to the next version in any case

  
  
Posted 4 years ago

Also - what is the temp folder path in your case?

  
  
Posted 4 years ago

Nope, only its name

  
  
Posted 4 years ago

Oh

  
  
Posted 4 years ago

SmarmySeaurchin8 when calling with --stop , you need to use the exact same command-line used to start the agent, with the --stop flag added. In your case:
trains-agent --config-file /opt/trains/trains.conf daemon --detached --cpu-only --queue important_cpu_queue cpu_queue --stop

  
  
Posted 4 years ago

The file content by the way contained only the worker's name

  
  
Posted 4 years ago

in /tmp/.trainsagent_5031_f4iwisna.tmp
For example

  
  
Posted 4 years ago

Still, what's the file's contents?

  
  
Posted 4 years ago

I will open one

  
  
Posted 4 years ago

And what's the TRAINS_WORKER_ID you're using? It seems this issue is caused by the agent failing to locate a suitable .trainsagent* file in the temp folder (these files store the currently running agent PIDs)

  
  
Posted 4 years ago

SmarmySeaurchin8 what's the trains-agent version? What command did you use to start it (also did you use a custom worker ID)?

  
  
Posted 4 years ago