cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Cross" <>
Subject RE: Centos 6.3 new install sql connection issue
Date Fri, 23 Nov 2012 17:09:02 GMT
Christoffer & Marc, thank you for the suggestions.

I checked my hostfile at /etc/hosts and added the hostname line as follows:

[root@nodedev4 ~]# cat /etc/hosts               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6   nodedev4.node.local

I checked my hostname with the following command:

[root@nodedev4 sysconfig]# hostname --fqdn

I checked my iptables, and here's how they are configured:

[root@nodedev4 sysconfig]# cat iptables
# Generated by iptables-save v1.4.7 on Fri Nov 23 03:19:39 2012
:INPUT ACCEPT [825:78727]
:OUTPUT ACCEPT [601:70882]
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -s -p udp -m state --state NEW -m udp --dport 111 -j ACCEPT
-A INPUT -s -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT
-A INPUT -s -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT
-A INPUT -s -p tcp -m state --state NEW -m tcp --dport 32803 -j ACCEPT
-A INPUT -s -p udp -m state --state NEW -m udp --dport 32769 -j ACCEPT
-A INPUT -s -p tcp -m state --state NEW -m tcp --dport 892 -j ACCEPT
-A INPUT -s -p udp -m state --state NEW -m udp --dport 892 -j ACCEPT
-A INPUT -s -p tcp -m state --state NEW -m tcp --dport 875 -j ACCEPT
-A INPUT -s -p udp -m state --state NEW -m udp --dport 875 -j ACCEPT
-A INPUT -s -p tcp -m state --state NEW -m tcp --dport 662 -j ACCEPT
-A INPUT -s -p udp -m state --state NEW -m udp --dport 662 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 9090 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8250 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 7080 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
# Completed on Fri Nov 23 03:19:39 2012

My Ethernet adapter is configured with a static IP as follows:

[root@nodedev4 network-scripts]# cat ifcfg-Auto_eth0
NAME="Auto eth0"

[root@nodedev4 network-scripts]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1E:4F:A4:90:95
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::21e:4fff:fea4:9095/64 Scope:Link
          RX packets:10073 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3782 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:822453 (803.1 KiB)  TX bytes:4166501 (3.9 MiB)

lo        Link encap:Local Loopback
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12922 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12922 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1213455 (1.1 MiB)  TX bytes:1213455 (1.1 MiB)

I am able to successfully log into MYSQL from a remote host, to the mysql server on the cloudstack
management server:

[root@localhost /]# mysql -u root -p -h
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.66 Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


I can access the UI at

Before I can access the UI after a restart, I always have to manually start the tomcat6 service,
mysqld service, and run cloud-setup-management once, but I can script all that later once
I get passed this basic issue I'm having...

I still can not log in, I get "Invalid username or password" with admin as the username and
password as the password.

Any other suggestions?

-Brandon Cross

-----Original Message-----
From: Marc Cirauqui [] 
Sent: Friday, November 23, 2012 1:27 AM
To: cloudstack-users; Christoffer Pedersen
Subject: Re: Centos 6.3 new install sql connection issue


From your MySQL logs:

   1. 121121 17:25:38 [ERROR] Can't start server: cannot resolve hostname!:
   2. 121121 17:25:38 [ERROR] Aborting

This and the fact that you are able to deploy only on localhost, seems your name resolution
is not fine. Check /etc/hosts and verify you have setup your hostname and fqdn.


On Fri, Nov 23, 2012 at 5:59 AM, Christoffer Pedersen <> wrote:

> Hi,
> Have you tried to do "cloud-setup-management"?
> - Christoffer
> Sendt fra Samsung mobilBrandon Cross <> wrote:Hi all, 
> I'm new here, but dedicated to becoming a contributor and excited 
> about Cloudstack. I'm trying to deploy it on a CentOS 6.3 management 
> node. I was able to get it deployed with Ubuntu but I'm having a 
> challenge with CentOS that must be something super trivial that's 
> missing...
> My problem is, after I complete the steps 3 and 4 in the installation 
> guide, I am unable to log in using admin and password. This only 
> applies to when I set it up using CentOS. I was successful in building 
> it on Ubuntu 12.04 and logging in, however I really want to run 
> CentOS. Do I need to roll back to 6.2 ?
> I think the problem looks like a database connectivity error. When I 
> look at the management-server.log I see
> 2012-11-22 05:11:34,217 ERROR [db.Transaction.Transaction] (main:null) 
> Unexpected exception:
> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
> Could not create connection to database server. Attempted reconnect 3 
> times. Giving up.
> Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
> Communications link failure
> 2012-11-22 05:11:34,223 ERROR [utils.db.DbUtil] (main:null) Unable to 
> acquire DB connection for global lock system
> 2012-11-22 05:11:34,230 ERROR [utils.component.ComponentLocator]
> (main:null) Problems with running checker:DatabaseIntegrityChecker
> Unable to acquire 
> lock to check for database integrity.
> A snippet of the management-server.log is here
> I'm able to get to the UI login, but it just won't accept my password.
> I've tried making sure remote mysql connections are enabled. One 
> interesting thing I've come across is how I'm crafting my 
> cloud-setup-databases command.
> When I run it like this, it fails:
> cloud-setup-databases cloud:cloud@ 
> --deploy-as=root:'rootpwd'
> but when I change the IP to localhost then it appears to deploy 
> successfully without errors, and builds the mysql. I've even logged in 
> and looked and found the admin username and encrypted password in the 
> table structure.
> cloud-setup-databases cloud:cloud@localhost --deploy-as=root:'rootpwd'
> my.cnf looks like this:
> [mysqld]
> datadir=/var/lib/mysql
> socket=/var/lib/mysql/mysql.sock
> user=mysql
> # Disabling symbolic-links is recommended to prevent assorted security 
> risks
> symbolic-links=0
> [mysqld_safe]
> log-error=/var/log/mysqld.log
> pid-file=/var/run/mysqld/
> I've also pasted my /var/log/mysqld.log here
> Any tips?
> -Brandon
View raw message