incubator-cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Cross" <bcr...@nodetx.com>
Subject RE: Centos 6.3 new install sql connection issue
Date Fri, 23 Nov 2012 17:57:29 GMT
Rohit, thanks for suggesting. I had run that, but I reran it and flushed
my priv's just to make sure. I tried to deploy my cloud database via the
server's IP again but it stills fails like before :( again, it deploys
the database without errors to localhost still. 

The suggestion from Michael on adding the fqdn to the local loopback I'm
still looking into...

Here's something else interesting. After I couldn't get it to work by
following the online documentation, I checked the INSTALL.md file in the
cloud-incubator source files, and it says to run the following command,
which if executed successfully means I should be able to log into the
UI:

mvn -pl :cloud-client-ui jetty:run

When I run that, I get this stack error:

ERROR [async.dao.SyncQueueItemDaoImpl] (AsyncJobMgr-Heartbeat-1:)
Unexpected sql excetpion,
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown
column 'q.queue_size' in 'where clause'
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:57)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:45)
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
        at
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
        at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:
2155)
        at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:231
8)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Delegat
ingPreparedStatement.java:96)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Delegat
ingPreparedStatement.java:96)
        at
com.cloud.async.dao.SyncQueueItemDaoImpl.getNextQueueItems(SyncQueueItem
DaoImpl.java:92)
        at
com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:34)
        at
com.cloud.async.SyncQueueManagerImpl.dequeueFromAny(SyncQueueManagerImpl
.java:141)
        at
com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:34)
        at
com.cloud.async.AsyncJobManagerImpl$2.run(AsyncJobManagerImpl.java:578)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:35
1)
        at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.acc
ess$201(ScheduledThreadPoolExecutor.java:165)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run
(ScheduledThreadPoolExecutor.java:267)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.jav
a:1110)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:603)
        at java.lang.Thread.run(Thread.java:679)

-Brandon Cross, MCSE
President, NODE LLC
309 Breesport
San Antonio, TX 78216
Skype ID: NODETX
Office Phone: (210)319-4382 Ext 102
WWW.NODETX.COM





-----Original Message-----
From: Rohit Yadav [mailto:rohit.yadav@citrix.com] 
Sent: Friday, November 23, 2012 11:40 AM
To: cloudstack-users@incubator.apache.org
Subject: RE: Centos 6.3 new install sql connection issue

Have you granted privileges to your mysql user? If not, hint:
GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'topsecret';

________________________________________
From: Brandon Cross [bcross@nodetx.com]
Sent: Friday, November 23, 2012 11:01 PM
To: cloudstack-users@incubator.apache.org
Subject: RE: Centos 6.3 new install sql connection issue

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:bcross@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:mcirauqui@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 <vrod@vrod.dk>
wrote:

> Hi,
>
> Have you tried to do "cloud-setup-management"?
>
> - Christoffer
>
>
>
>
> Sendt fra Samsung mobilBrandon Cross <bcross@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
>
>

Mime
View raw message