Not seen this issue in a while, but last time I did I found I had to add my FQDN to the loopback.  

I am assuming that the SQL server is on a different server.  But do you have the setup on MySQL to allow access from another IP?
---
Michael Hart-Jones BEng        
E-Mail: mhartjo...@accessit.co.uk
Tel: (01227) 750555
Fax: (01227) 750070
On 23/11/12 17:31, Brandon Cross wrote:
Here's the closest thing to a hint as to what's going on that I've come across... it denies my root user from deploying via the hostname or ip, but works successfully when doing it via localhost.
Yet I can make a remote mysql connection into this sql server from another computer as root with the same password. I've previously posted my iptables conf and my eth0 conf so maybe I'm missing something there... 

[root@nodedev4 management]# cloud-setup-databases cloud:cloud@192.168.2.220 --deploy-as=root:'myvalidsqlrootpwd'
Mysql user name:cloud                                                           [ OK ]
Mysql user password:cloud                                                       [ OK ]
Mysql server ip:192.168.2.220                                                   [ OK ]
Mysql server port:3306                                                          [ OK ]
Mysql root user name:root                                                       [ OK ]
Mysql root user password:myvalidsqlrootpwd                                      [ OK ]
Checking Cloud database files ...                                               [ OK ]
Checking local machine hostname ...                                             [ OK ]
Checking SELinux setup ...                                                      [ OK ]
Detected local IP address as 192.168.2.220, will use as cluster management server node IP[ OK ]
Preparing /etc/cloud/management/db.properties                                   [ OK ]
Applying /usr/share/cloud/setup/create-database.sql

We apologize for below error:
***************************************************************
Encountering an error when executing mysql script
----------------------------------------------------------------------
table:
/usr/share/cloud/setup/create-database.sql

Error:
ERROR 1045 (28000): Access denied for user 'root'@'nodedev4.node.local' (using password: YES)


Sql parameters:
{'passwd': 'myvalidsqlrootpwd', 'host': '192.168.2.220', 'user': 'root', 'port': 3306}
----------------------------------------------------------------------

***************************************************************
Please run:

    cloud-setup-database -h

for full help
[root@nodedev4 management]#






-----Original Message-----
From: Brandon Cross [mailto:bcr...@nodetx.com] 
Sent: Friday, November 23, 2012 11:09 AM
To: cloudstack-users@incubator.apache.org
Subject: RE: Centos 6.3 new install sql connection issue

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
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.2.220   nodedev4.node.local

I checked my hostname with the following command:

[root@nodedev4 sysconfig]# hostname --fqdn
nodedev4.node.local

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
*filter
:INPUT ACCEPT [825:78727]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [601:70882]
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p udp -m state --state NEW -m udp --dport 111 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p tcp -m state --state NEW -m tcp --dport 32803 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p udp -m state --state NEW -m udp --dport 32769 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p tcp -m state --state NEW -m tcp --dport 892 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p udp -m state --state NEW -m udp --dport 892 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p tcp -m state --state NEW -m tcp --dport 875 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p udp -m state --state NEW -m udp --dport 875 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -p tcp -m state --state NEW -m tcp --dport 662 -j ACCEPT
-A INPUT -s 192.168.2.0/24 -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
COMMIT
# 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
HWADDR=00:1E:4F:A4:90:95
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.2.220
PREFIX=24
GATEWAY=192.168.2.1
DNS1=192.168.2.10
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Auto eth0"
UUID=a49251de-3800-425c-8f49-fda566931478
_ONBOOT_=yes
LAST_CONNECT=1353580926

[root@nodedev4 network-scripts]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1E:4F:A4:90:95
          inet addr:192.168.2.220  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:4fff:fea4:9095/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          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)
          Interrupt:16

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          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 192.168.2.220
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
owners.

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

mysql>

I can access the UI at http://192.168.2.220:8080/client

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 [mailto:mcirau...@gmail.com] 
Sent: Friday, November 23, 2012 1:27 AM
To: cloudstack-users; Christoffer Pedersen
Subject: Re: Centos 6.3 new install sql connection issue

Hello,

>From your MySQL logs:


   1. 121121 17:25:38 [ERROR] Can't start server: cannot resolve hostname!:
   Success
   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.

thx

On Fri, Nov 23, 2012 at 5:59 AM, Christoffer Pedersen <v...@vrod.dk> wrote:

Hi,

Have you tried to do "cloud-setup-management"?

- Christoffer




Sendt fra Samsung mobilBrandon Cross <bcr...@nodetx.com> 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

com.cloud.utils.exception.CloudRuntimeException: Unable to acquire 
lock to check for database integrity.



A snippet of the management-server.log is here

http://pastebin.com/hkSNXmEu



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@192.168.2.220 
--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/mysqld.pid



I've also pasted my /var/log/mysqld.log here



http://pastebin.com/FWfhXAWY



Any tips?



-Brandon






*************************************************************************************************
Disclaimer: This message may only be read in context and with common sense. 
If concerned by it or in doubt, please destroy it. If this message is not meant for you, 
we have made a mistake and would appreciate your help. We promise that we mean 
no offence and will endeavour to rectify our mistake. 

Our full contact details can be found on www.accessit.co.uk

Company number: 3117204
*************************************************************************************************

Reply via email to