CloudStack: cloud-agent dead but subsys locked
If you have installed the cloudstack agent and it will not start you may be seeing these errors.
[root@cldstkkvm02 ~]# service cloud-agent status cloud-agent dead but subsys locked
or
[root@cldstkkvm02 ~]# tail /var/log/cloud/agent/agent.log 2020-06-18 09:02:20,756 INFO [utils.component.ComponentLocator] (main:null) Skipping configuration using components.xml 2020-06-18 09:02:20,756 INFO [cloud.agent.AgentShell] (main:null) Implementation Version is 4.0.2.20200420145617 2020-06-18 09:02:20,756 INFO [cloud.agent.AgentShell] (main:null) agent.properties found at /etc/cloud/agent/agent.properties 2020-06-18 09:02:20,758 INFO [cloud.agent.AgentShell] (main:null) Defaulting to using properties file for storage 2020-06-18 09:02:20,761 INFO [cloud.agent.AgentShell] (main:null) Defaulting to the constant time backoff algorithm 2020-06-18 09:02:20,860 INFO [cloud.agent.Agent] (main:null) id is 2020-06-18 09:02:20,877 ERROR [cloud.resource.ServerResourceBase] (main:null) Nics are not configured! 2020-06-18 09:02:20,885 INFO [cloud.resource.ServerResourceBase] (main:null) Designating private to be nic eth0
I resolved this problem by creating the cloudbr0 bridge to eth0.
1. cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-cloudbr0
2. vi /etc/sysconfig/network-scripts/ifcfg-eth0 then add a line “BRIDGE=cloudbr0” as shown below.
DEVICE="eth0" BOOTPROTO=none NM_CONTROLLED="no" ONBOOT=yes TYPE="Ethernet" UUID="aec1ee06-3797-4160-9dd4-90a881816e71" HWADDR=EC:A8:6B:F3:70:4D IPADDR=192.168.2.61 PREFIX=24 GATEWAY=192.168.2.1 DNS1=192.168.2.38 DOMAIN=myvlab.org DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" BRIDGE=cloudbr0
3. vi /etc/sysconfig/network-scripts/ifcfg-cloudbr0 then change “TYPE=Ethernet” to “TYPE=Bridge” and “DEVICE=eth0” to “DEVICE=cloudbr0” as shown below.
DEVICE=cloudbr0 BOOTPROTO=none NM_CONTROLLED=no ONBOOT=yes TYPE=Bridge UUID="aec1ee06-3797-4160-9dd4-90a881816e71" HWADDR=EC:A8:6B:F3:70:4D IPADDR=192.168.2.61 PREFIX=24 GATEWAY=192.168.2.1 DNS1=192.168.2.38 DOMAIN=myvlab.org DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0"
4. service restart network
[root@cldstkkvm02 ~]# service network restart Shutting down interface eth0: bridge cloudbr0 does not exist! [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ] Bringing up interface cloudbr0: [ OK ] [root@cldstkkvm02 ~]# service cloud-agent start Starting Cloud Agent: [root@cldstkkvm02 ~]# service cloud-agent status cloud-agent (pid 2707) is running...
If your still having issues try this out as well http://s10758.p20.sites.pressdns.com/2020/07/05/cloudstack-clo…cked-continued/
[…] problems starting the agent take a look at this post, the cloudbr0 bridge is probably not created. http://thehyperadvisor.com/2020/06/18/cloudstack-cloud-agent-dead-but-subsys-locked/ This was getting done automatically but it seems that has […]
I feel the command is “service cloudstack-agent status” rather than “cloud-agent status”
Ramzana, you are correct if you’re using cloudstack version 4.1.x because of the changes made but with 4.0.x it’s as I documented.