安装CloudStack官方指南得到无法findURL 404错误

按照这个安装指南:

https://docs.cloudstack.apache.org/projects/cloudstack-installation/en/latest/qig.html

运行安装命令时:

# yum -y install cloudstack-management 

它得到了一个无法findULR 404错误。 是官方档案坏了的原因吗?

这是图片


从日志中我看到:

 ... com.cloud.utils.exception.CloudRuntimeException: No database selected for the transaction 2017-04-21 05:28:10,385 ERROR [cccClusterManagerImpl] (Cluster-Heartbeat-1:ctx-a3d78589) (logid:c556482a) Unexpected exception in cluster heartbeat java.lang.RuntimeException: No database selected for the transaction Caused by: com.cloud.utils.exception.CloudRuntimeException: No database selected for the transaction 2017-04-21 05:28:11,884 WARN [cccdManagementServerHostDaoImpl] (Cluster-Heartbeat-1:ctx-69287ea3) (logid:ee11e3ed) Unexpected exception, com.cloud.utils.exception.CloudRuntimeException: No database selected for the transaction 2017-04-21 05:28:11,885 ERROR [cccClusterManagerImpl] (Cluster-Heartbeat-1:ctx-69287ea3) (logid:ee11e3ed) Unexpected exception in cluster heartbeat java.lang.RuntimeException: No database selected for the transaction Caused by: com.cloud.utils.exception.CloudRuntimeException: No database selected for the transaction 2017-04-21 05:28:12,784 ERROR [ccudConnectionConcierge] (ConnectionConcierge-1:ctx-c609b238) (logid:80cc65b8) Unable to keep the db connection for LockMaster1 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3520) Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. 2017-04-21 07:24:23,824 ERROR [ccudMerovingian2] (main:null) (logid:) Unable to get a new db connection com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) at com.cloud.utils.db.TransactionLegacy.getStandaloneConnectionWithException(TransactionLegacy.java:212) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable) 2017-04-21 07:24:23,862 WARN [oacsmcResourceApplicationContext] (main:null) (logid:) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lockMasterListener' defined in URL [jar:file:/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-server-4.9.2.0.jar!/META-INF/cloudstack/system/spring-server-system-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cloud.server.LockMasterListener]: Constructor threw exception; nested exception is com.cloud.utils.exception.CloudRuntimeException: Unable to initialize a connection to the database for locking purposes 2017-04-24 01:19:18,333 ERROR [ccudMerovingian2] (main:null) (logid:) Unable to get a new db connection com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) at com.cloud.utils.db.TransactionLegacy.getStandaloneConnectionWithException(TransactionLegacy.java:212) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Caused by: java.net.SocketException: Network is unreachable (connect failed) 2017-04-24 01:19:18,387 WARN [oacsmcResourceApplicationContext] (main:null) (logid:) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lockMasterListener' defined in URL [jar:file:/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-server-4.9.2.0.jar!/META-INF/cloudstack/system/spring-server-system-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cloud.server.LockMasterListener]: Constructor threw exception; nested exception is com.cloud.utils.exception.CloudRuntimeException: Unable to initialize a connection to the database for locking purposes 2017-04-24 01:47:42,075 ERROR [ccudMerovingian2] (main:null) (logid:) Unable to get a new db connection com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) at com.cloud.utils.db.TransactionLegacy.getStandaloneConnectionWithException(TransactionLegacy.java:212) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable) 2017-04-24 01:47:42,111 WARN [oacsmcResourceApplicationContext] (main:null) (logid:) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lockMasterListener' defined in URL [jar:file:/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-server-4.9.2.0.jar!/META-INF/cloudstack/system/spring-server-system-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cloud.server.LockMasterListener]: Constructor threw exception; nested exception is com.cloud.utils.exception.CloudRuntimeException: Unable to initialize a connection to the database for locking purposes 

数据库连接exception。 如何正确设置数据库? 我只是遵循那个指南,但不知道任何其他的事情。

尝试安装4.8版本:

http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/4.8/qig.html

先安装数据库:

 # yum -y install mysql-server # service mysqld start # chkconfig mysqld on 

然后安装Cloudstack:

 # yum -y install cloudstack-management # cloudstack-setup-databases cloud:password@localhost --deploy-as=root # cloudstack-setup-management 

在这之后你应该得到xxxx:8080 / client的pipe理界面,其中xxxx是服务器的IP地址。