Nomad CLI doesn't show running jobs

Hello everyone!
I am trying to stop jobs by using cli - nomad job stop. But I faced an issue.
When I try to list all running jobs by the command “nomad job status”, it returns “No running jobs”, although I have a few running jobs.
I tried it on the nomad client, as on the nomad server.

Hi @Dagora77,

I order to figure out the problem we will need a little more information on your cluster topology and configuration.

  • What namespace are the jobs you expect to see running within?
  • Do you have any environment variables that might be overriding the expected namespace to be queried?
  • Is this a multi-region cluster or a single region cluster?

Thanks,
jrasell and the Nomad team

Hi @jrasell ,
I run these jobs in SMS-QA namespace.
When I specify namespace (as in the screenshot below), it shows me jobs from this namespace.
But how can I stop job from this namespace using cli? Maybe I use the wrong command.


Also, I thought the command “nomad job status” should return all running jobs without specifying namespaces.
There’re no env variables that might be overriding the expected namespace. And it’s a single region cluster.

Hi @Dagora77,

The Nomad CLI defaults to using the default namespace identifier. This is the namespace created on startup and therefore always guaranteed to exist. If you wish to view the jobs running in all namespaces you can use the command nomad job status -namespace="*".

In order to stop the job, you will also need to specify the namespace where the job resides if it is not in the default namespace. The command in your case would be nomad job stop -namespace=SMS-QA gameauthorizationwebapiqa.

Information on other default values and how to override them can be seen within Nomads CLI documentation.

Thanks,
jrasell and the Nomad team

Thanks @jrasell, It’s helped =)