apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.05k stars 1.1k forks source link

Cloudstack-agent stuck on activating #8788

Closed Gunseerat closed 6 months ago

Gunseerat commented 7 months ago
ISSUE TYPE
COMPONENT NAME

cloudstack agent is not active, it is showing activating, further host is not getting added

CLOUDSTACK VERSION

4.18 on ubuntu 20

CONFIGURATION

Trying to add host in advanced networking.

OS / ENVIRONMENT

Ubuntu 20

SUMMARY

error received while adding host, troubleshooted and ended up checking that cloudstack-agent is not active, hence cloud agent is not letting add host.

STEPS TO REPRODUCE

followed cloudstack's documentation to install from scratch, added host got error [can't setup agent, due to com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore on the KVM host ]

EXPECTED RESULTS

be able to add host

ACTUAL RESULTS

command is systemctl status cloudstack-agent

cloudstack-agent.service - CloudStack Agent Loaded: loaded (/lib/systemd/system/cloudstack-agent.service; enabled; vendor preset: enabled) Active: activating (auto-restart) since Thu 2024-03-14 13:44:31 IST; 1s ago Docs: http://www.cloudstack.org/ Process: 4093 ExecStart=/usr/bin/java $JAVA_OPTS $JAVA_DEBUG -cp $CLASSPATH $JAVA_CLASS (code=exited, status=0/SUCCESS) Main PID: 4093 (code=exited, status=0/SUCCESS)

Mar 14 13:44:31 server.cloud.ubuntu systemd[1]: cloudstack-agent.service: Succeeded. ~ ~ ~ ~

vishesh92 commented 7 months ago

@Gunseerat Can you share the complete logs? Did you install and configure libvirtd?

weizhouapache commented 7 months ago

@Gunseerat Can you share the complete logs? Did you install and configure libvirtd?

+1 please also check if cloudbrX have been configured.

Gunseerat commented 7 months ago

@vishesh92 @weizhouapache Platform details: Ubuntu 20 virtual machine on virtual box Network adapters: 2, first is NAT second is HOST-ONLY Cloudstack bridges: Cloudbr0 on NAT adapter and CLoudbr1 on HOST-ONLY adapter

Log reports for cloudstack-management cloudstack-management.service - CloudStack Management Server Loaded: loaded (/lib/systemd/system/cloudstack-management.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2024-03-15 10:01:43 IST; 1min 15s ago Main PID: 1963 (java) Tasks: 32 (limit: 9366) Memory: 857.7M CGroup: /system.slice/cloudstack-management.service └─1963 /usr/bin/java -Djava.security.properties=/etc/cloudstack/management/java.security.ciphers -Djava.awt.headless=>

Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> Mar 15 10:02:42 server.cloud.ubuntu java[1963]: INFO [o.a.c.s.m.m.i.DefaultModuleDefinitionSet] (main:null) (logid:) Loading modu> ~ ~ ~ ~ ~

Log for libvirtd libvirtd.service - Virtualization daemon Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2024-03-15 10:01:31 IST; 2min 26s ago Docs: man:libvirtd(8) https://libvirt.org Main PID: 1020 (libvirtd) Tasks: 19 (limit: 32768) Memory: 32.3M CGroup: /system.slice/libvirtd.service ├─1020 /usr/sbin/libvirtd ├─1543 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libv> └─1544 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libv>

Mar 15 10:01:31 server.cloud.ubuntu systemd[1]: Started Virtualization daemon. Mar 15 10:01:34 server.cloud.ubuntu dnsmasq[1543]: started, version 2.90 cachesize 150 Mar 15 10:01:34 server.cloud.ubuntu dnsmasq[1543]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN DHCP DHCPv6 no-Lua > Mar 15 10:01:34 server.cloud.ubuntu dnsmasq-dhcp[1543]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h Mar 15 10:01:34 server.cloud.ubuntu dnsmasq-dhcp[1543]: DHCP, sockets bound exclusively to interface virbr0 Mar 15 10:01:34 server.cloud.ubuntu dnsmasq[1543]: reading /etc/resolv.conf Mar 15 10:01:34 server.cloud.ubuntu dnsmasq[1543]: using nameserver 127.0.0.53#53 Mar 15 10:01:34 server.cloud.ubuntu dnsmasq[1543]: read /etc/hosts - 11 names Mar 15 10:01:34 server.cloud.ubuntu dnsmasq[1543]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 names Mar 15 10:01:34 server.cloud.ubuntu dnsmasq-dhcp[1543]: read /var/lib/libvirt/dnsmasq/default.hostsfile ~ ~ ~

Ash6990 commented 5 months ago

@Gunseerat how did you manage to get cloudstack agent active again? Mine is stuck at activating only.

cloudstack-agent.service - CloudStack Agent Loaded: loaded (/lib/systemd/system/cloudstack-agent.service; enabled; vendor preset: enabled) Active: activating (auto-restart) since Tue 2024-04-30 14:00:51 IST; 8s ago Docs: http://www.cloudstack.org/ Process: 9859 ExecStart=/usr/bin/java $JAVA_OPTS $JAVA_DEBUG -cp $CLASSPATH $JAVA_CLASS (code=exited, status=0/SUCCESS) Main PID: 9859 (code=exited, status=0/SUCCESS) CPU: 2.985s