Rancher agent cannot be started

When I input:

docker run -e CATTLE_AGENT_IP="121.xx.xx.4" -it --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.0.2 http://121.xx.xx.4:8080/v1/scripts/874F461593B82EEEEB61:1468335600000:0SsoizxYtibU55WpXq7zcSR5gPg

the agent container started and then exited immediately, no host is added to server.

no output can be found when I

docker logs agentcontainerid

My host is a centos 6.5 VM, with upgraded kernel to 3.10.xx.

How can I do some troubleshooting?

The command given is supposed to run, create two other containers (named rancher-agent-state and rancher-agent) and then exit. Are the other two there? What’s in the logs for rancher-agent?

After I run the command, no agent is active. Only rancher-agent-state existed but exited. No other agent existed:

It looks like the rancher-agent-state was never run. There’s actually 3 containers that run.

Can you look at the detailed agent logs?

http://docs.rancher.com/rancher/latest/en/faqs/agents/#where-can-i-find-detailed-logs-of-the-rancher-agent-container

But I can not find rancher directory in /var/log, so no any rancher agent log can be found.

The logs are in the container that exited. Use the cp command to copy the logs outside.

docker cp <container_id>:/var/log/rancher /local/path

Nope, I was wrong. It seems that the container that never ran creates the logs you’re looking for. What does docker logs gigantic_lamarr say?

nothing either. I decide to reset the host OS, it may be a problem related to the host system chaos. Thanks all!