FAQ
Hello,
I'm attempting to run the scm_prepare_database.sh initialization script
against a MySQL server to host the Cloudera Manager backend.

I'm attempting to run the script with the following command below, and
receiving an error which is included further below.

I've confirmed access to the MySQL host from the CM server by installing
the MySQL client, and connecting to the MySQL host with the same connection
string and credentials without issue.

I have also confirmed that the mysql-connector-java RPM was installed
from yum into /usr/share/mysql. I also tried copying the
mysql-connector-java JAR into both the classpath of my JDK and JRE
(/usr/java/latest/lib, /usr/java/latest/jre/lib) and rerunning the script,
but also got the same error.

Does anyone have any ideas? Thanks

/usr/share/cmf/schema/scm_prepare_database.sh mysql -h <myMySQLHost> --port
<myPort> -u<myUser> -p<myPass> --scm-host <mySCMHost> <db> <user> <pass>

Verifying that we can write to /etc/cloudera-scm-server****

[ main] DbProvisioner ERROR
Exception when creating/dropping database.****

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
link failure****

** **

The last packet sent successfully to the server was 0 milliseconds ago. The
driver has not received any packets from the server.****

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)****

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
****

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
****

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)**
**

at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)***
*

at
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2260)****

at com.mysql.jdbc.ConnectionImpl.(JDBC4Connection.java:49)***
*

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)****

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
****

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
****

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)**
**

at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

at
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:357)****

at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)**
**

at java.sql.DriverManager.getConnection(DriverManager.java:582)****

at java.sql.DriverManager.getConnection(DriverManager.java:185)****

at
com.cloudera.enterprise.dbutil.DbProvisioner.executeSql(DbProvisioner.java:233)
****

at
com.cloudera.enterprise.dbutil.DbProvisioner.main(DbProvisioner.java:60)****

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure****

** **

The last packet sent successfully to the server was 0 milliseconds ago. The
driver has not received any packets from the server.****

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)****

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
****

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
****

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)**
**

at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)***
*

at com.mysql.jdbc.MysqlIO.(ConnectionImpl.java:2184)****

... 13 more****

Caused by: java.net.ConnectException: Connection refused****

at java.net.PlainSocketImpl.socketConnect(Native Method)****

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)****

at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)****

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)****

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)****

at java.net.Socket.connect(Socket.java:529)****

at java.net.Socket.connect(Socket.java:478)****

at java.net.Socket.(Socket.java:218)****

at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
****

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294)****

... 14 more****

[ main] DbProvisioner ERROR Stack
Trace:****

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
link failure****

** **

The last packet sent successfully to the server was 0 milliseconds ago. The
driver has not received any packets from the server.****

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)****

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
****

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
****

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)**
**

at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)***
*

at
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2260)****

at com.mysql.jdbc.ConnectionImpl.(JDBC4Connection.java:49)***
*

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)****

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
****

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
****

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)**
**

at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

at
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:357)****

at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)**
**

at java.sql.DriverManager.getConnection(DriverManager.java:582)****

at java.sql.DriverManager.getConnection(DriverManager.java:185)****

at
com.cloudera.enterprise.dbutil.DbProvisioner.executeSql(DbProvisioner.java:233)
****

at
com.cloudera.enterprise.dbutil.DbProvisioner.main(DbProvisioner.java:60)****

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure****

** **

The last packet sent successfully to the server was 0 milliseconds ago. The
driver has not received any packets from the server.****

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)****

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
****

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
****

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)**
**

at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)***
*

at com.mysql.jdbc.MysqlIO.(ConnectionImpl.java:2184)****

... 13 more****

Caused by: java.net.ConnectException: Connection refused****

at java.net.PlainSocketImpl.socketConnect(Native Method)****

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)****

at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)****

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)****

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)****

at java.net.Socket.connect(Socket.java:529)****

at java.net.Socket.connect(Socket.java:478)****

at java.net.Socket.(Socket.java:218)****

at
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
****

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294)****

... 14 more****

--> Error 1, giving up (use --force if you wish to ignore the error)

Search Discussions

  • Philip Langdale at Jan 24, 2013 at 6:28 pm
    Funnily enough, we just noticed this bug today. The --port parameter is
    broken, but you can work around it by passing "hostname:port" as the -h
    parameter.

    --phil

    On 23 January 2013 21:09, Joe Travaglini wrote:

    Hello,
    I'm attempting to run the scm_prepare_database.sh initialization script
    against a MySQL server to host the Cloudera Manager backend.

    I'm attempting to run the script with the following command below, and
    receiving an error which is included further below.

    I've confirmed access to the MySQL host from the CM server by
    installing the MySQL client, and connecting to the MySQL host with the same
    connection string and credentials without issue.

    I have also confirmed that the mysql-connector-java RPM was installed
    from yum into /usr/share/mysql. I also tried copying the
    mysql-connector-java JAR into both the classpath of my JDK and JRE
    (/usr/java/latest/lib, /usr/java/latest/jre/lib) and rerunning the script,
    but also got the same error.

    Does anyone have any ideas? Thanks

    /usr/share/cmf/schema/scm_prepare_database.sh mysql -h <myMySQLHost>
    --port <myPort> -u<myUser> -p<myPass> --scm-host <mySCMHost> <db> <user>
    <pass>

    Verifying that we can write to /etc/cloudera-scm-server****

    [ main] DbProvisioner ERROR
    Exception when creating/dropping database.****

    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
    link failure****

    ** **

    The last packet sent successfully to the server was 0 milliseconds ago.
    The driver has not received any packets from the server.****

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)****

    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    ****

    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    ****

    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    ****

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

    at
    com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)*
    ***

    at
    com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2260)****

    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:787)**
    **

    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)*
    ***

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)****

    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    ****

    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    ****

    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    ****

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

    at
    com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:357)****

    at
    com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
    ****

    at java.sql.DriverManager.getConnection(DriverManager.java:582)***
    *

    at java.sql.DriverManager.getConnection(DriverManager.java:185)***
    *

    at
    com.cloudera.enterprise.dbutil.DbProvisioner.executeSql(DbProvisioner.java:233)
    ****

    at
    com.cloudera.enterprise.dbutil.DbProvisioner.main(DbProvisioner.java:60)**
    **

    Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
    Communications link failure****

    ** **

    The last packet sent successfully to the server was 0 milliseconds ago.
    The driver has not received any packets from the server.****

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)****

    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    ****

    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    ****

    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    ****

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

    at
    com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)*
    ***

    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:344)****

    at
    com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2184)****

    ... 13 more****

    Caused by: java.net.ConnectException: Connection refused****

    at java.net.PlainSocketImpl.socketConnect(Native Method)****

    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)***
    *

    at
    java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)****

    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)****

    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)****

    at java.net.Socket.connect(Socket.java:529)****

    at java.net.Socket.connect(Socket.java:478)****

    at java.net.Socket.<init>(Socket.java:375)****

    at java.net.Socket.<init>(Socket.java:218)****

    at
    com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
    ****

    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294)****

    ... 14 more****

    [ main] DbProvisioner ERROR
    Stack Trace:****

    com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
    link failure****

    ** **

    The last packet sent successfully to the server was 0 milliseconds ago.
    The driver has not received any packets from the server.****

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)****

    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    ****

    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    ****

    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    ****

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

    at
    com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)*
    ***

    at
    com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2260)****

    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:787)**
    **

    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)*
    ***

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)****

    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    ****

    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    ****

    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    ****

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

    at
    com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:357)****

    at
    com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
    ****

    at java.sql.DriverManager.getConnection(DriverManager.java:582)***
    *

    at java.sql.DriverManager.getConnection(DriverManager.java:185)***
    *

    at
    com.cloudera.enterprise.dbutil.DbProvisioner.executeSql(DbProvisioner.java:233)
    ****

    at
    com.cloudera.enterprise.dbutil.DbProvisioner.main(DbProvisioner.java:60)**
    **

    Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
    Communications link failure****

    ** **

    The last packet sent successfully to the server was 0 milliseconds ago.
    The driver has not received any packets from the server.****

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)****

    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    ****

    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    ****

    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    ****

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)****

    at
    com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1122)*
    ***

    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:344)****

    at
    com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2184)****

    ... 13 more****

    Caused by: java.net.ConnectException: Connection refused****

    at java.net.PlainSocketImpl.socketConnect(Native Method)****

    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)***
    *

    at
    java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)****

    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)****

    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)****

    at java.net.Socket.connect(Socket.java:529)****

    at java.net.Socket.connect(Socket.java:478)****

    at java.net.Socket.<init>(Socket.java:375)****

    at java.net.Socket.<init>(Socket.java:218)****

    at
    com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
    ****

    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294)****

    ... 14 more****

    --> Error 1, giving up (use --force if you wish to ignore the error)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupscm-users @
categorieshadoop
postedJan 24, '13 at 5:09a
activeJan 24, '13 at 6:28p
posts2
users2
websitecloudera.com
irc#hadoop

2 users in discussion

Joe Travaglini: 1 post Philip Langdale: 1 post

People

Translate

site design / logo © 2022 Grokbase