# Rancher-agent not running

**URL:** <https://forums.suse.com/t/rancher-agent-not-running/963>\
**Category:** Rancher 1.x\
**Created:** [November 16, 2015, 1:37pm UTC](https://forums.suse.com/t/rancher-agent-not-running/963 "2015-11-16T13:37:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![masc1](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@masc1](https://forums.suse.com/u/masc1)\
**Post date:** [November 16, 2015, 1:37pm UTC](https://forums.suse.com/t/rancher-agent-not-running/963/1 "2015-11-16T13:37:37Z")

</div>

Hi,

i have some problems starting the container agents. Had it all running once and tried to re-run it now.

The container log:  
…  
INFO: ENV: RANCHER\_AGENT\_IMAGE=rancher/agent:v0.8.2  
time=“2015-11-16T12:39:02Z” level=fatal msg="Error response from daemon: Could not find container for entity id 40ffc3c62cadf1732c11ba3a8c2884ca2347a2500d329421d580be4ce40e4ae7"  
Error: No such image or container: rancher-agent-state  
dirname: missing operand  
Try ‘dirname --help’ for more information.

docker.log from upstart:  
ERRO[4529] Handler for GET /v1.18/containers/rancher-agent/json returned error: no such id: rancher-agent  
ERRO[4529] HTTP Error err=no such id: rancher-agent statusCode=404  
INFO[4529] GET /v1.18/images/rancher-agent/json  
ERRO[4529] Handler for GET /v1.18/images/rancher-agent/json returned error: No such image: rancher-agent  
ERRO[4529] HTTP Error err=No such image: rancher-agent statusCode=404  
INFO[4529] GET /v1.18/containers/rancher-agent-state/json  
ERRO[4529] Handler for GET /v1.18/containers/rancher-agent-state/json returned error: no such id: rancher-agent-state  
ERRO[4529] HTTP Error err=no such id: rancher-agent-state statusCode=404  
INFO[4529] GET /v1.18/images/rancher-agent-state/json  
ERRO[4529] Handler for GET /v1.18/images/rancher-agent-state/json returned error: No such image: rancher-agent-state  
ERRO[4529] HTTP Error err=No such image: rancher-agent-state statusCode=404  
INFO[4529] POST /v1.18/containers/create?name=rancher-agent-state  
ERRO[4529] Handler for POST /v1.18/containers/create returned error: Could not find container for entity id 40ffc3c62cadf1732c11ba3a8c2884ca2347a2500d329421d580be4ce40e4ae7  
ERRO[4529] HTTP Error err=Could not find container for entity id 40ffc3c62cadf1732c11ba3a8c2884ca2347a2500d329421d580be4ce40e4ae7 statusCode=500  
INFO[4529] GET /v1.18/containers/rancher-agent-state/json  
ERRO[4529] Handler for GET /v1.18/containers/rancher-agent-state/json returned error: no such id: rancher-agent-state  
ERRO[4529] HTTP Error err=no such id: rancher-agent-state statusCode=404  
INFO[4529] GET /v1.18/images/rancher-agent-state/json  
ERRO[4529] Handler for GET /v1.18/images/rancher-agent-state/json returned error: No such image: rancher-agent-state  
ERRO[4529] HTTP Error err=No such image: rancher-agent-state statusCode=404

If i try to pull it manually it fails also. I’ve already tried to delete all containers which aren’t running.

Thanks for your help/ideas.

Marc

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [November 16, 2015, 5:56pm UTC](https://forums.suse.com/t/rancher-agent-not-running/963/2 "2015-11-16T17:56:44Z")

</div>

Did you remove the container `rancher-agent-state`? When you launch the rancher-agent, it actually spins up 3 containers with only 1 remaining running.

The stopped container called `rancher-agent-state` cannot be deleted. Otherwise, `rancher-agent` container won’t work.

---

<div class="post-metadata">

**Author:** ![masc1](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@masc1](https://forums.suse.com/u/masc1)\
**Post date:** [November 17, 2015, 6:05am UTC](https://forums.suse.com/t/rancher-agent-not-running/963/3 "2015-11-17T06:05:23Z")

</div>

> [@denise](#):
>
> rancher-agent-state

Hi Denise, thank you. I’ve already tried deleting it via docker rmi rancher-agent-state:  
docker rmi rancher-agent-state  
Error response from daemon: could not find image: no such id: rancher-agent-state  
Error: failed to remove images: [rancher-agent-state]

docker rm -fv rancher-agent-state  
Error response from daemon: no such id: rancher-agent-state  
Error: failed to remove containers: [rancher-agent-state]

docker rmi rancher-agent  
Error response from daemon: could not find image: no such id: rancher-agent  
Error: failed to remove images: [rancher-agent]

and i’ve also tried  
docker rmi $(docker images -f “dangling=true” -q)  
docker rm -v $(docker ps -a -q -f status=exited)

This happens on all 4 nodes where it was previously started.

---

<div class="post-metadata">

**Author:** ![ebishop](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@ebishop](https://forums.suse.com/u/ebishop)\
**Post date:** [November 17, 2015, 2:39pm UTC](https://forums.suse.com/t/rancher-agent-not-running/963/4 "2015-11-17T14:39:46Z")

</div>

I stopped and removed the rancher agent containers, and then removed /var/lib/rancher on the host. After this, I restarted the rancher agent and it came right up. It’s a bit harsh, but it worked.

---

<div class="post-metadata">

**Author:** ![masc1](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@masc1](https://forums.suse.com/u/masc1)\
**Post date:** [November 18, 2015, 10:26am UTC](https://forums.suse.com/t/rancher-agent-not-running/963/5 "2015-11-18T10:26:16Z")

</div>

@ebishop: Thanks. i’ve tried it but it still doesn’t want to start

in docker.log from upstart it still complains about  
ERRO[165404] Handler for GET /v1.18/images/rancher-agent-state/json returned error: No such image: rancher-agent-state  
ERRO[165404] HTTP Error err=No such image: rancher-agent-state statusCode=404

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [November 21, 2015, 5:45am UTC](https://forums.suse.com/t/rancher-agent-not-running/963/6 "2015-11-21T05:45:01Z")

</div>

When you say that you went to re-run, what are you doing specifically?

So you had something running rancher/agent and then you were trying to re-run rancher/agent command to update it?

Can you share the command that you are running? I don’t know why it’s trying to get an image called `rancher-agent-state`. We only have a `rancher/agent` image that is used when starting rancher/agent.

---

<div class="post-metadata">

**Author:** ![masc1](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@masc1](https://forums.suse.com/u/masc1)\
**Post date:** [November 23, 2015, 12:51pm UTC](https://forums.suse.com/t/rancher-agent-not-running/963/7 "2015-11-23T12:51:05Z")

</div>

Hi Denise, i had it running some weeks ago and stopped the rancher-agent. I’ve started the rancher server on another linux docker host via  
docker run -d --restart=always -p 8080:8080 rancher/server  
which works fine. After that i’ve visited the gui which gave me the command to add other nodes to the rancher cluster, similar to this:

docker run -e CATTLE\_HOST\_LABELS=‘internal=1&zone=internal&slave=1’ -d rancher-agent --privileged -v /var/run/docker.sock:/var/run/docker.sock rancher/agent:v0.8.2 [http://rancherserver:8080/v1/scripts/A1ABE1A609482E85BA0D:1847635200000:URrNci0dkFIAAfrclfbCYy4BpK0](http://rancherserver:8080/v1/scripts/A1ABE1A609482E85BA0D:1847635200000:URrNci0dkFIAAfrclfbCYy4BpK0)

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [November 23, 2015, 6:57pm UTC](https://forums.suse.com/t/rancher-agent-not-running/963/8 "2015-11-23T18:57:56Z")

</div>

Did you alter the command provided by the uI? Typically, re running rancher-agent on a host used in a different set up has no issues. I’ve done it myself quite often with no issues.

Mostly just asking because the `-d rancher-agent --privileged` is strange. It typically doesn’t have the rancher-agent at that section…

---

<div class="post-metadata">

**Author:** ![billclark](https://avatars.discourse-cdn.com/v4/letter/b/7ea924/32.png) [@billclark](https://forums.suse.com/u/billclark)\
**Post date:** [November 10, 2016, 1:29am UTC](https://forums.suse.com/t/rancher-agent-not-running/963/9 "2016-11-10T01:29:17Z")

</div>

I just downloaded rancher, and have the exact same issue the first time I ran an agent. Did anybody find a solution to this problem?

---

<div class="post-metadata">

**Author:** ![billclark](https://avatars.discourse-cdn.com/v4/letter/b/7ea924/32.png) [@billclark](https://forums.suse.com/u/billclark)\
**Post date:** [November 10, 2016, 1:31am UTC](https://forums.suse.com/t/rancher-agent-not-running/963/10 "2016-11-10T01:31:11Z")

</div>

Nov 9 20:14:07 devbzdocker01 kernel: [24442.454043] XFS (dm-10): Unmounting Filesystem  
Nov 9 20:14:08 devbzdocker01 systemd-udevd[6242]: inotify\_add\_watch(7, /dev/dm-10, 10) failed: No such file or directory  
Nov 9 20:14:09 devbzdocker01 systemd-udevd[6242]: inotify\_add\_watch(7, /dev/dm-10, 10) failed: No such file or directory  
Nov 9 20:14:09 devbzdocker01 systemd-udevd[6242]: inotify\_add\_watch(7, /dev/dm-10, 10) failed: No such file or directory  
Nov 9 20:14:09 devbzdocker01 dockerd[684]: time=“2016-11-09T20:14:09.330812983-05:00” level=error msg="Handler for GET /v1.18/containers/rancher-agent/json returned error: No such container: rancher-agent"  
Nov 9 20:14:09 devbzdocker01 dockerd[684]: time=“2016-11-09T20:14:09.332259262-05:00” level=error msg="Handler for GET /v1.18/images/rancher-agent/json returned error: No such image: rancher-agent"  
Nov 9 20:14:09 devbzdocker01 kernel: [24443.917789] XFS (dm-10): Mounting V5 Filesystem  
Nov 9 20:14:09 devbzdocker01 kernel: [24443.927147] XFS (dm-10): Ending clean mount  
Nov 9 20:14:09 devbzdocker01 kernel: [24443.939667] XFS (dm-10): Unmounting Filesystem  
Nov 9 20:14:09 devbzdocker01 kernel: [24444.007704] XFS (dm-10): Mounting V5 Filesystem  
Nov 9 20:14:09 devbzdocker01 kernel: [24444.018979] XFS (dm-10): Ending clean mount  
Nov 9 20:14:09 devbzdocker01 kernel: [24444.027437] XFS (dm-10): Unmounting Filesystem  
Nov 9 20:14:09 devbzdocker01 kernel: [24444.092027] XFS (dm-10): Mounting V5 Filesystem  
Nov 9 20:14:09 devbzdocker01 kernel: [24444.100823] XFS (dm-10): Ending clean mount  
Nov 9 20:14:09 devbzdocker01 dockerd[684]: time=“2016-11-09T20:14:09.666376789-05:00” level=error msg=“containerd: start container” error=“oci runtime error: container\_linux.go:247: starting container process caused “process\_linux.go:245: running exec setns process for init caused \“exit status 17\””\n” id=33df1bab609c6017eeb0031cfe2d9548b7c7da853292e071bcfbea0093f3bc66  
Nov 9 20:14:09 devbzdocker01 dockerd[684]: time=“2016-11-09T20:14:09.671218456-05:00” level=error msg="Create container failed with error: invalid header field value “oci runtime error: container\_linux.go:247: starting container process caused \“process\_linux.go:245: running exec setns process for init caused \\\“exit status 17\\\”\”\n”"  
Nov 9 20:14:09 devbzdocker01 kernel: [24444.191304] XFS (dm-10): Unmounting Filesystem  
Nov 9 20:14:09 devbzdocker01 dockerd[684]: time=“2016-11-09T20:14:09.733427348-05:00” level=error msg=“Handler for POST /v1.18/containers/33df1bab609c6017eeb0031cfe2d9548b7c7da853292e071bcfbea0093f3bc66/start returned error: invalid header field value “oci runtime error: container\_linux.go:247: starting container process caused \“process\_linux.go:245: running exec setns process for init caused \\\“exit status 17\\\”\”\n””
