0

Follow this installation guide:

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

When run the Installation command:

# yum -y install cloudstack-management

It got an can't find ULR 404 error. Is it the reason that official files went bad?

This is the picture


Add

From log I saw:

...
com.cloud.utils.exception.CloudRuntimeException: No database selected for the transaction
2017-04-21 05:28:10,385 ERROR [c.c.c.ClusterManagerImpl] (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  [c.c.c.d.ManagementServerHostDaoImpl] (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 [c.c.c.ClusterManagerImpl] (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 [c.c.u.d.ConnectionConcierge] (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 [c.c.u.d.Merovingian2] (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  [o.a.c.s.m.c.ResourceApplicationContext] (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 [c.c.u.d.Merovingian2] (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  [o.a.c.s.m.c.ResourceApplicationContext] (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 [c.c.u.d.Merovingian2] (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  [o.a.c.s.m.c.ResourceApplicationContext] (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

Database connect exception. How to set database rightly? I just followed that guide but don't know any other thing.

1

Try installing 4.8 version:

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

Install database first:

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

Then install Cloudstack:

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

After this you should get management ui on x.x.x.x:8080/client where x.x.x.x is the ip of server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.