Hello!

I encountered quite an odd problem: the agent doesn't restart on KVM host.

Here is what's going on.

When it starts for the first time it creates /var/run/agent.pid file, but there 
are no numbers, the file has zero length.

When I restart it (e.g. by service cloudstack-agent restart command), it's 
being shut down, but file isn't being removed. So it can't start again, here is 
what I see in /var/log/cloudstack/agent/cloudstack-agent.out file:

2015-05-12 17:04:37,504{GMT} INFO  [cloud.agent.AgentShell] (Thread-1:) Agent 
started
2015-05-12 17:04:37,506{GMT} INFO  [cloud.agent.AgentShell] (Thread-1:) 
Implementation Version is 4.2.1
2015-05-12 17:04:37,507{GMT} INFO  [cloud.agent.AgentShell] (Thread-1:) 
agent.properties found at /etc/cloudstack/agent/agent.properties
2015-05-12 17:04:37,508{GMT} INFO  [cloud.agent.AgentShell] (Thread-1:) 
Defaulting to using properties file for storage
2015-05-12 17:04:37,509{GMT} INFO  [cloud.agent.AgentShell] (Thread-1:) 
Defaulting to the constant time backoff algorithm
2015-05-12 17:04:37,510{GMT} INFO  [cloud.utils.LogUtils] (Thread-1:) log4j 
configuration found at /etc/cloudstack/agent/log4j-cloud.xml
2015-05-12 17:04:37,626{GMT} ERROR [cloud.agent.AgentShell] (Thread-1:) Unable 
to start agent: Java process is being started twice.  If this is not true, 
remove /var/run/agent.pid
Unable to start agent: Java process is being started twice.  If this is not 
true, remove /var/run/agent.pid

I remove this file by hands and do "restart" again. The agent starts, but 
/var/run/agent.pid has zero length again.

This server is just the same as other CentOS hosts (there are many of them in 
my farm), but other hosts don't seem to be having this issue.

I opened a ticket (https://issues.apache.org/jira/browse/CLOUDSTACK-8456, there 
are more details about the environment), but if anyone has some clues, hints or 
ideas, please, share your thoughts on this topic. Any help will be greatly 
appreciated! Thanks!

-- 
V.Melnik

Reply via email to