Cannot start the coordinator node

Hello,

I download the tarball 0.8.0, then follow the steps in this link to set up a druid cluster: http://druid.io/docs/0.8.0/tutorials/tutorial-the-druid-cluster.html:

  1. mysql -u root to grant priviledge and create database

  2. start zookeeper

  3. then I tried to start the coordinator node: java -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -classpath config/_common:config/coordinator:lib/* io.druid.cli.Main server coordinator

But I got below error. Please help me have a look. Thanks.

2015-07-27T13:15:12,760 INFO [main] com.metamx.common.lifecycle.Lifecycle$AnnotationBasedHandler - Invoking start method[public void io.druid.client.ServerInventoryView.start() throws java.lang.Exception] on object[io.druid.client.BatchServerInventoryView@571217e5].

2015-07-27T13:15:12,764 INFO [main-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)

2015-07-27T13:15:12,782 INFO [main-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn - Socket connection established to localhost/127.0.0.1:2181, initiating session

2015-07-27T13:15:12,795 INFO [main-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x14ec9b1e6950011, negotiated timeout = 30000

2015-07-27T13:15:12,774 WARN [main] io.druid.metadata.SQLMetadataConnector - Exception creating table

org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: java.sql.SQLException: Cannot create PoolableConnectionFactory (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 org.skife.jdbi.v2.DBI.open(DBI.java:210) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.withHandle(DBI.java:257) ~[jdbi-2.32.jar:?]

at io.druid.metadata.SQLMetadataConnector.createTable(SQLMetadataConnector.java:88) [druid-server-0.8.0.jar:0.8.0]

at io.druid.metadata.SQLMetadataConnector.createRulesTable(SQLMetadataConnector.java:143) [druid-server-0.8.0.jar:0.8.0]

at io.druid.metadata.SQLMetadataConnector.createRulesTable(SQLMetadataConnector.java:304) [druid-server-0.8.0.jar:0.8.0]

at io.druid.metadata.SQLMetadataRuleManagerProvider$1.start(SQLMetadataRuleManagerProvider.java:70) [druid-server-0.8.0.jar:0.8.0]

at com.metamx.common.lifecycle.Lifecycle.start(Lifecycle.java:250) [java-util-0.27.0.jar:?]

at io.druid.guice.LifecycleModule$2.start(LifecycleModule.java:136) [druid-api-0.3.8.jar:0.8.0]

at io.druid.cli.GuiceRunnable.initLifecycle(GuiceRunnable.java:71) [druid-services-0.8.0.jar:0.8.0]

at io.druid.cli.ServerRunnable.run(ServerRunnable.java:38) [druid-services-0.8.0.jar:0.8.0]

at io.druid.cli.Main.main(Main.java:91) [druid-services-0.8.0.jar:0.8.0]

Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (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 org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2152) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1903) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:36) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.open(DBI.java:192) ~[jdbi-2.32.jar:?]

… 10 more

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) ~[?:1.7.0_79]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_79]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_79]

at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_79]

at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[?:?]

at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1036) ~[?:?]

at com.mysql.jdbc.MysqlIO.(MysqlIO.java:338) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2232) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2265) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:790) ~[?:?]

at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44) ~[?:?]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_79]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_79]

at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_79]

at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395) ~[?:?]

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325) ~[?:?]

at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:205) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2162) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2148) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1903) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:36) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.open(DBI.java:192) ~[jdbi-2.32.jar:?]

… 10 more

Caused by: java.net.ConnectException: Connection refused

at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.7.0_79]

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) ~[?:1.7.0_79]

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) ~[?:1.7.0_79]

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) ~[?:1.7.0_79]

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.7.0_79]

at java.net.Socket.connect(Socket.java:579) ~[?:1.7.0_79]

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:213) ~[?:?]

at com.mysql.jdbc.MysqlIO.(MysqlIO.java:297) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2232) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2265) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:790) ~[?:?]

at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44) ~[?:?]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_79]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_79]

at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_79]

at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395) ~[?:?]

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325) ~[?:?]

at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:205) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2162) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2148) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1903) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:36) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.open(DBI.java:192) ~[jdbi-2.32.jar:?]

… 10 more

2015-07-27T13:15:12,799 INFO [main-EventThread] org.apache.curator.framework.state.ConnectionStateManager - State change: CONNECTED

2015-07-27T13:15:12,800 ERROR [main] io.druid.cli.CliCoordinator - Error when starting up. Failing.

org.skife.jdbi.v2.exceptions.UnableToObtainConnectionException: java.sql.SQLException: Cannot create PoolableConnectionFactory (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 org.skife.jdbi.v2.DBI.open(DBI.java:210) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.withHandle(DBI.java:257) ~[jdbi-2.32.jar:?]

at io.druid.metadata.SQLMetadataRuleManager.createDefaultRule(SQLMetadataRuleManager.java:78) ~[druid-server-0.8.0.jar:0.8.0]

at io.druid.metadata.SQLMetadataRuleManagerProvider$1.start(SQLMetadataRuleManagerProvider.java:71) ~[druid-server-0.8.0.jar:0.8.0]

at com.metamx.common.lifecycle.Lifecycle.start(Lifecycle.java:250) ~[java-util-0.27.0.jar:?]

at io.druid.guice.LifecycleModule$2.start(LifecycleModule.java:136) ~[druid-api-0.3.8.jar:0.8.0]

at io.druid.cli.GuiceRunnable.initLifecycle(GuiceRunnable.java:71) [druid-services-0.8.0.jar:0.8.0]

at io.druid.cli.ServerRunnable.run(ServerRunnable.java:38) [druid-services-0.8.0.jar:0.8.0]

at io.druid.cli.Main.main(Main.java:91) [druid-services-0.8.0.jar:0.8.0]

Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (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 org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2152) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1903) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:36) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.open(DBI.java:192) ~[jdbi-2.32.jar:?]

… 8 more

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) ~[?:1.7.0_79]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_79]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_79]

at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_79]

at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[?:?]

at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1036) ~[?:?]

at com.mysql.jdbc.MysqlIO.(MysqlIO.java:338) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2232) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2265) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:790) ~[?:?]

at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44) ~[?:?]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_79]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_79]

at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_79]

at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395) ~[?:?]

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325) ~[?:?]

at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:205) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2162) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2148) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1903) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:36) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.open(DBI.java:192) ~[jdbi-2.32.jar:?]

… 8 more

Caused by: java.net.ConnectException: Connection refused

at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.7.0_79]

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) ~[?:1.7.0_79]

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) ~[?:1.7.0_79]

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) ~[?:1.7.0_79]

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.7.0_79]

at java.net.Socket.connect(Socket.java:579) ~[?:1.7.0_79]

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:213) ~[?:?]

at com.mysql.jdbc.MysqlIO.(MysqlIO.java:297) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2232) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2265) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:790) ~[?:?]

at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44) ~[?:?]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_79]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_79]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_79]

at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_79]

at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) ~[?:?]

at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395) ~[?:?]

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325) ~[?:?]

at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:205) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2162) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2148) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1903) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413) ~[commons-dbcp2-2.0.1.jar:2.0.1]

at org.skife.jdbi.v2.DataSourceConnectionFactory.openConnection(DataSourceConnectionFactory.java:36) ~[jdbi-2.32.jar:?]

at org.skife.jdbi.v2.DBI.open(DBI.java:192) ~[jdbi-2.32.jar:?]

… 8 more

The “Connection refused” looks like a problem contacting the mysql server. Is it listening on the address and port that you’re trying to contact it on? Perhaps it’s only listening on localhost but you’re trying to contact it using a hostname?