Rituparno Bhattacharya
Rituparno Bhattacharya

Reputation: 363

Issue with adding Host in Cloudstack

I am trying to setup Apache Cloudstack 4.13.1.0. As per documentation, I have installed Management Server, SQL, Libvirtd, firewall etc. After installation, I can able to complete Basic Configuration except Host Add part. Here is my Basic Configuration -

Server IP : 192.168.1.1 (No Bridge) Pod IP Range : 192.168.1.190 - 192.168.1.240 Guest IP Range : 192.168.1.20 - 192.168.1.50

Created NFS on /mnt/export/primary & /mnt/export/secondary

As Host Add failed on Basic Configuration, I tried to add that from UI > Infrastructure. While trying to do that, I am getting below error -

2020-09-18 15:57:52,868 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-8499e7fc) (logid:4bbb7dcd) Found 0 routers to update status.
2020-09-18 15:57:52,869 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-8499e7fc) (logid:4bbb7dcd) Found 0 VPC's to update Redundant State.
2020-09-18 15:57:52,870 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-8499e7fc) (logid:4bbb7dcd) Found 0 networks to update RvR status.
2020-09-18 15:58:02,841 INFO  [o.a.c.f.j.i.AsyncJobManagerImpl] (AsyncJobMgr-Heartbeat-1:ctx-cbb2166b) (logid:4d2ae4c7) Begin cleanup expired async-jobs
2020-09-18 15:58:02,845 INFO  [o.a.c.f.j.i.AsyncJobManagerImpl] (AsyncJobMgr-Heartbeat-1:ctx-cbb2166b) (logid:4d2ae4c7) End cleanup expired async-jobs
2020-09-18 15:58:08,210 DEBUG [c.c.s.StatsCollector] (StatsCollector-5:ctx-64b6199c) (logid:358fb781) AutoScaling Monitor is running...
2020-09-18 15:58:08,257 DEBUG [c.c.s.StatsCollector] (StatsCollector-4:ctx-60b983fe) (logid:e7ae6de9) StorageCollector is running...
2020-09-18 15:58:08,265 DEBUG [c.c.s.StatsCollector] (StatsCollector-2:ctx-e09b2b45) (logid:f111f14f) HostStatsCollector is running...
2020-09-18 15:58:12,841 INFO  [o.a.c.f.j.i.AsyncJobManagerImpl] (AsyncJobMgr-Heartbeat-1:ctx-c75ea193) (logid:9a36ec8c) Begin cleanup expired async-jobs
2020-09-18 15:58:12,846 INFO  [o.a.c.f.j.i.AsyncJobManagerImpl] (AsyncJobMgr-Heartbeat-1:ctx-c75ea193) (logid:9a36ec8c) End cleanup expired async-jobs
2020-09-18 15:58:13,064 DEBUG [o.a.c.s.SecondaryStorageManagerImpl] (secstorage-1:ctx-80a6789d) (logid:65a79967) Zone 1 is not ready to launch secondary storage VM yet
2020-09-18 15:58:13,159 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:ctx-ae019505) (logid:a49898b8) Skip capacity scan as there is no Primary Storage in 'Up' state
2020-09-18 15:58:22,842 INFO  [o.a.c.f.j.i.AsyncJobManagerImpl] (AsyncJobMgr-Heartbeat-1:ctx-ee1faa93) (logid:a8e7362a) Begin cleanup expired async-jobs
2020-09-18 15:58:22,846 INFO  [o.a.c.f.j.i.AsyncJobManagerImpl] (AsyncJobMgr-Heartbeat-1:ctx-ee1faa93) (logid:a8e7362a) End cleanup expired async-jobs
2020-09-18 15:58:22,868 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-302f904a) (logid:9f6faa20) Found 0 routers to update status.
2020-09-18 15:58:22,869 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-302f904a) (logid:9f6faa20) Found 0 VPC's to update Redundant State.
2020-09-18 15:58:22,870 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-302f904a) (logid:9f6faa20) Found 0 networks to update RvR status.
2020-09-18 15:58:23,025 DEBUG [c.c.h.k.d.LibvirtServerDiscoverer] (qtp1715998167-274:ctx-0748cc35 ctx-10413d10) (logid:574cedd7) Timeout, to wait for the host connecting to mgt svr, assuming it is failed
2020-09-18 15:58:23,027 WARN  [c.c.r.ResourceManagerImpl] (qtp1715998167-274:ctx-0748cc35 ctx-10413d10) (logid:574cedd7) Unable to find the server resources at http://192.168.1.1
2020-09-18 15:58:23,027 INFO  [c.c.u.e.CSExceptionErrorCode] (qtp1715998167-274:ctx-0748cc35 ctx-10413d10) (logid:574cedd7) Could not find exception: com.cloud.exception.DiscoveryException in error code list for exceptions
2020-09-18 15:58:23,029 WARN  [o.a.c.a.c.a.h.AddHostCmd] (qtp1715998167-274:ctx-0748cc35 ctx-10413d10) (logid:574cedd7) Exception:
com.cloud.exception.DiscoveryException: Unable to add the host
        at com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:825)
        at com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:611)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:338)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
        at com.sun.proxy.$Proxy180.discoverHosts(Unknown Source)
        at org.apache.cloudstack.api.command.admin.host.AddHostCmd.execute(AddHostCmd.java:142)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
        at com.cloud.api.ApiServer.queueCommand(ApiServer.java:759)
        at com.cloud.api.ApiServer.handleRequest(ApiServer.java:583)
        at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:310)
        at com.cloud.api.ApiServlet$1.run(ApiServlet.java:130)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
        at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:127)
        at com.cloud.api.ApiServlet.doPost(ApiServlet.java:94)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:706)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:527)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.Server.handle(Server.java:530)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
        at java.lang.Thread.run(Thread.java:748)
2020-09-18 15:58:23,032 INFO  [c.c.a.ApiServer] (qtp1715998167-274:ctx-0748cc35 ctx-10413d10) (logid:574cedd7) Unable to add the host
2020-09-18 15:58:23,033 DEBUG [c.c.a.ApiServlet] (qtp1715998167-274:ctx-0748cc35 ctx-10413d10) (logid:574cedd7) ===END===  202.142.91.51 -- POST  command=addHost&response=json

While checking the status of the services, I found management server service is running fine but agent service is exited with following error -

● cloudstack-agent.service - CloudStack Agent
   Loaded: loaded (/lib/systemd/system/cloudstack-agent.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2020-09-18 15:00:22 UTC; 4s ago
     Docs: http://www.cloudstack.org/
  Process: 10076 ExecStart=/usr/bin/java $JAVA_OPTS $JAVA_DEBUG -cp $CLASSPATH $JAVA_CLASS (code=exited, status=66)
 Main PID: 10076 (code=exited, status=66)

I am trying to add host as 192.168.1.1 only with root password.

I have also tried to configure cloudstack agent like below, but again got error -

Please input the Management Server Hostname/IP-Address:[localhost]192.168.1.1
Please input the Zone Id:[default]zone
Please input the Pod Id:[default]pod
Please input the Cluster Id:[default]cluster
Please input the Hypervisor type kvm/lxc:[kvm]kvm
Failed to get default route. Please configure your network to have a default route

Am I doing something wrong or how can I fix the issue?

Upvotes: 0

Views: 1592

Answers (1)

Minh Trung Lê
Minh Trung Lê

Reputation: 11

select id,name,guid from cluster where name="your cluster name";

check your cluster if it don't have 1 guid gen 1 for it

Upvotes: 1

Related Questions