Virtualization platform cloudstack (4)-several exceptions

Source: Internet
Author: User
Tags cloudstack
Cloudstack host cannot be added

Cloudstack is started normally. The region, provisioning point, and cluster are added normally. However, a message indicating that the host is not successfully added is displayed.

Add hosts first:

Then the prompt is displayed:

After finding a circle on the Internet, there is basically no reply, no way, you have to do it yourself.

View logs

Go to/var/log/cloud/managerment to view the log of the Management Server:

Tail F management-server.log

View the log to find exceptions:

2013-06-27 09:07:19,659 INFO  [cloud.resource.ResourceManagerImpl] (catalina-exec-17:null) Trying to add a new host at http://192.168.74.143 in data center 32013-06-27 09:07:19,664 WARN  [kvm.discoverer.KvmServerDiscoverer] (catalina-exec-17:null)  can't setup agent, due to java.io.IOException: There was a problem while connecting to 192.168.74.143:22 - There was a problem while connecting to 192.168.74.143:222013-06-27 09:07:19,664 WARN  [cloud.resource.ResourceManagerImpl] (catalina-exec-17:null) Unable to find the server resources at http://192.168.74.1432013-06-27 09:07:19,664 WARN  [api.commands.AddHostCmd] (catalina-exec-17:null) Exception: com.cloud.exception.DiscoveryException: Unable to add the host    at com.cloud.resource.ResourceManagerImpl.discoverHostsFull(ResourceManagerImpl.java:737)    at com.cloud.resource.ResourceManagerImpl.discoverHosts(ResourceManagerImpl.java:544)    at com.cloud.api.commands.AddHostCmd.execute(AddHostCmd.java:140)    at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:138)    at com.cloud.api.ApiServer.queueCommand(ApiServer.java:544)    at com.cloud.api.ApiServer.handleRequest(ApiServer.java:423)    at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:312)    at com.cloud.api.ApiServlet.doGet(ApiServlet.java:64)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:744)    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2282)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)    at java.lang.Thread.run(Thread.java:679)2013-06-27 09:07:19,666 WARN  [cloud.api.ApiDispatcher] (catalina-exec-17:null) class com.cloud.api.ServerApiException : Unable to add the host

Check whether VT is enabled

The host cannot be added because the VT is not enabled. After the VT is enabled, add the host again. The host is added successfully!

When bind_address of MySQL is modified in cloudstack, the connection fails.

After modifying the parameters, Tomcat cannot be started. view the logs and obtain the following information:

2013-07-01 23:55:48,703 WARN  [cluster.dao.ManagementServerHostDaoImpl] (Cluster-Heartbeat-1:null) Unexpected exception, com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet successfully received from the server was 1 milliseconds ago.  The last packet sent successfully to the server was 0 milliseconds ago.    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

I checked some information online:

After modifying the MySQL parameter, the maximum value of wait_timeout is 31536000, that is, 1 year. Add the following to my. CNF:

[mysqld]wait_timeout=31536000interactive_timeout=31536000

The restart takes effect. You need to modify these two parameters at the same time.

No, so

Comment out this line, for example: # bind-address = 127.0.0.1

Or change:Bind-address = 0.0.0.0

Allow access from any IP address;

If an IP address is specified, the local machine cannot be accessed, which may cause some exceptions. Therefore, I can change it to any IP address and re-authorize it.

grant all privileges on *.* to root@"%" identified by "password" with grant option;   flush privileges;

Restart MySQL

sudo /etc/init.d/mysql restart

Then restart

sudo /etc/init.d/cloud-management restart

Everything works.

Connection refused prompt when cloudstack registers ISO

When registering a template, configure Apache and test it locally.

However, when uploading a template, the system still prompts to reject the connection:

Go to the cloudstack management interface for global configuration

Search for the secstorage keyword, find a configuration parameter named "secstorage. Allowed. Internal. sites", and set it to an accessible IP address, such (192.168.1.1/24), Press enter to confirm. This parameter indicates that the IP address range of the Web server is 192.168.1. *. Then, restart the service on the command line of the Management node: # service cloud-management restart
Log on to the interface again and add the ISO template here. The "connection refused" error will not occur.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.