Problem to Run Example Server

Hi guys,

I need you help please. I tried to do the tutorial “Hello Druid” but I’m newbie in Druid.Io. i have a problem to do that ./run_example_server.sh

When i ran this there there is a loop…

Can you explain my problem ? and help to resolve this one?

This is my log:

2015-09-02T19:21:48,178 INFO [wikipedia-2015-09-02T19:05:00.000Z-persist-n-merge] io.druid.segment.IndexIO$DefaultIndexIOHandler - Skipped files[[index.drd, inverted.drd, spatial.drd]]

2015-09-02T19:21:48,183 ERROR [wikipedia-2015-09-02T19:05:00.000Z-persist-n-merge] io.druid.metadata.SQLMetadataSegmentPublisher - Exception inserting into DB

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.SQLMetadataSegmentPublisher.publishSegment(SQLMetadataSegmentPublisher.java:67) [druid-server-0.8.0.jar:0.8.0]

at io.druid.segment.realtime.plumber.RealtimePlumber$4.doRun(RealtimePlumber.java:461) [druid-server-0.8.0.jar:0.8.0]

at io.druid.common.guava.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:40) [druid-common-0.8.0.jar:0.8.0]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_60]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_60]

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]

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:?]

… 7 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.8.0_60]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_60]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_60]

at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_60]

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.8.0_60]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_60]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_60]

at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_60]

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:?]

… 7 more

Caused by: java.net.ConnectException: Connection refused

at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_60]

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_60]

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_60]

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_60]

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_60]

at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_60]

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.8.0_60]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_60]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_60]

at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_60]

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:?]

… 7 more

2015-09-02T19:21:48,196 ERROR [wikipedia-2015-09-02T19:05:00.000Z-persist-n-merge] io.druid.segment.realtime.plumber.RealtimePlumber - Failed to persist merged index[wikipedia]: {class=io.druid.segment.realtime.plumber.RealtimePlumber, exceptionType=class java.lang.RuntimeException, exceptionMessage=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.), interval=2015-09-02T19:05:00.000Z/2015-09-02T19:10:00.000Z}

java.lang.RuntimeException: 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 io.druid.metadata.SQLMetadataSegmentPublisher.publishSegment(SQLMetadataSegmentPublisher.java:112) ~[druid-server-0.8.0.jar:0.8.0]

at io.druid.segment.realtime.plumber.RealtimePlumber$4.doRun(RealtimePlumber.java:461) [druid-server-0.8.0.jar:0.8.0]

at io.druid.common.guava.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:40) [druid-common-0.8.0.jar:0.8.0]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_60]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_60]

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]

Caused by: 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.SQLMetadataSegmentPublisher.publishSegment(SQLMetadataSegmentPublisher.java:67) ~[druid-server-0.8.0.jar:0.8.0]

… 5 more

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:?]

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

at io.druid.metadata.SQLMetadataSegmentPublisher.publishSegment(SQLMetadataSegmentPublisher.java:67) ~[druid-server-0.8.0.jar:0.8.0]

… 5 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.8.0_60]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_60]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_60]

at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_60]

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.8.0_60]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_60]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_60]

at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_60]

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:?]

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

at io.druid.metadata.SQLMetadataSegmentPublisher.publishSegment(SQLMetadataSegmentPublisher.java:67) ~[druid-server-0.8.0.jar:0.8.0]

… 5 more

Caused by: java.net.ConnectException: Connection refused

at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_60]

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_60]

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_60]

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_60]

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_60]

at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_60]

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.8.0_60]

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_60]

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_60]

at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[?:1.8.0_60]

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:?]

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

at io.druid.metadata.SQLMetadataSegmentPublisher.publishSegment(SQLMetadataSegmentPublisher.java:67) ~[druid-server-0.8.0.jar:0.8.0]

… 5 more

Thanks you !

Hey Julien, those errors are MySQL-related, and druid-0.8.0 uses Derby for the tutorials. I’m wondering if you have a different configuration than the tutorials are expecting. Can you try re-downloading the release tarball from here and see if that helps? http://druid.io/downloads.html