connection refused error when running Nutch 2
Asked Answered
E

2

6

I am trying to run Nutch 2 crawler on my system but I get the following error:

Exception in thread "main" org.apache.gora.util.GoraException: java.io.IOException: java.sql.SQLTransientConnectionException: java.net.ConnectException: Connection refused
at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:167)
at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135)
at org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:69)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:243)
at org.apache.nutch.crawl.Crawler.runTool(Crawler.java:68)
at org.apache.nutch.crawl.Crawler.run(Crawler.java:136)
at org.apache.nutch.crawl.Crawler.run(Crawler.java:250)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.crawl.Crawler.main(Crawler.java:257)
Caused by: java.io.IOException: java.sql.SQLTr
ansientConnectionException: java.net.ConnectException: Connection refused
    at org.apache.gora.sql.store.SqlStore.getConnection(SqlStore.java:747)
    at org.apache.gora.sql.store.SqlStore.initialize(SqlStore.java:160)
    at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102)
    at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161)
    ... 8 more
Caused by: java.sql.SQLTransientConnectionException: java.net.ConnectException: Connection refused
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source)
    at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
    at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:620)
    at java.sql.DriverManager.getConnection(DriverManager.java:200)
    at org.apache.gora.sql.store.SqlStore.getConnection(SqlStore.java:739)
    ... 11 more
Caused by: org.hsqldb.HsqlException: java.net.ConnectException: Connection refused
    at org.hsqldb.ClientConnection.openConnection(Unknown Source)
    at org.hsqldb.ClientConnection.initConnection(Unknown Source)
    at org.hsqldb.ClientConnection.<init>(Unknown Source)
    ... 17 more
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
    at java.net.Socket.connect(Socket.java:546)
    at java.net.Socket.connect(Socket.java:495)
    at java.net.Socket.<init>(Socket.java:392)
    at java.net.Socket.<init>(Socket.java:206)
    at org.hsqldb.server.HsqlSocketFactory.createSocket(Unknown Source)
    ... 20 more

what is the problem? my internet connection is direct.

Exportation answered 25/9, 2012 at 10:53 Comment(5)
You seem to be having a problem with the Database, I am not familiar with Notch but it is having problems connecting to the DB not the Network. Have you had a look in the instructions if there is any DB properties that you may have to setup?Martinemartineau
And have you followed all the instructions listed here: wiki.apache.org/nutch/NutchTutorial#StepsMartinemartineau
There is a db config file conf/gora.properties but I left it to the defaults. Because it wasn't mentioned in the tutorial!Exportation
I also checked the link and I did all the steps and still I'm getting the errorExportation
I got the exactly same issue, and thinking the default configuration in gora.properties requires the SqlStore properties. Unlucky, cannot figure out how to update them in Mac.Leslie
R
2

I had the same error. I changed the connection URL from

<property name="connection.url">jdbc:hsqldb:hsql://localhost</property>

to

<property name="connection.url">jdbc:hsqldb:mem://localhost</property>

and it did the trick.

Robomb answered 21/6, 2013 at 20:10 Comment(0)
D
0

Had the same error. I forgot 'configuration' tag at conf/nutch-site.xml:

<configuration>
    <property>
        <name>storage.data.store.class</name>
        <value>org.apache.gora.hbase.store.HBaseStore</value>
        <description>Default class for storing data</description>
    </property>
</configuration>
Discretionary answered 29/12, 2012 at 15:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.