java.net.ConnectException: Connection refused with Hsqldb 2.2.8 during mock tests

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

java.net.ConnectException: Connection refused with Hsqldb 2.2.8 during mock tests

lewis john mcgibbney
Hi Everyone,

We are using the above Hsql distribution over at Apache Nutch (Nutchgora branch) [0], to test the Crawler API. We recently upgraded to 2.2.8 from 2.0.0 as we were made aware of a bug which had knock on effects elsewhere. Now we are experiencing some irregular problems [1] which fails our test suite in an unpredictable fashion. The actual tests which are being run can be seen here [2].

It would be great if I could get some feedback as to what to do to address this behaviour as it doesn't look too much like a bug (ahem), more a lack on configuration on our side of things.

Thank you very much in advance for any help and/or information you guys are able to produce.

Kind Regards

Lewis

[0] https://svn.apache.org/viewvc/nutch/branches/nutchgora/
[1] https://builds.apache.org/view/M-R/view/Nutch/job/Nutch-nutchgora/ws/nutchgora/build/test/TEST-org.apache.nutch.api.TestAPI.txt
[2] https://svn.apache.org/viewvc/nutch/branches/nutchgora/src/test/org/apache/nutch/api/TestAPI.java?view=markup


--
Lewis


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|

Re: java.net.ConnectException: Connection refused with Hsqldb 2.2.8 during mock tests

Fred Toussi-2
I looked at the links earlier, but the output [1] has now disappeard.
 
The reported error was raised when connecting to the database. Please let me know which classes or config files in your project contain the user name and password for database connection, and the code that connects to the database.
 
Fred
 
On Sat, Apr 7, 2012, at 12:08, Lewis John Mcgibbney wrote:
Hi Everyone,

We are using the above Hsql distribution over at Apache Nutch (Nutchgora branch) [0], to test the Crawler API. We recently upgraded to 2.2.8 from 2.0.0 as we were made aware of a bug which had knock on effects elsewhere. Now we are experiencing some irregular problems [1] which fails our test suite in an unpredictable fashion. The actual tests which are being run can be seen here [2].

It would be great if I could get some feedback as to what to do to address this behaviour as it doesn't look too much like a bug (ahem), more a lack on configuration on our side of things.

Thank you very much in advance for any help and/or information you guys are able to produce.

Kind Regards

Lewis

[0] https://svn.apache.org/viewvc/nutch/branches/nutchgora/
[1] https://builds.apache.org/view/M-R/view/Nutch/job/Nutch-nutchgora/ws/nutchgora/build/test/TEST-org.apache.nutch.api.TestAPI.txt
[2] https://svn.apache.org/viewvc/nutch/branches/nutchgora/src/test/org/apache/nutch/api/TestAPI.java?view=markup


--
Lewis

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
_______________________________________________
Hsqldb-user mailing list
 

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|

Re: java.net.ConnectException: Connection refused with Hsqldb 2.2.8 during mock tests

lewis john mcgibbney
In reply to this post by lewis john mcgibbney
Hi Fred,

I get these through as batch emails so apologies for taking a bit of time to get back to you, they only come through once a week or something.

On Fri, Apr 13, 2012 at 7:31 AM, <[hidden email]> wrote:

I looked at the links earlier, but the output [1] has now
disappeard.

Yeah sorry about this, the link is rebuilt after every CI iteration, and I've been having problems with the fingerprinting for aggregated test builds. For the time being we disabled this particular test as you can see here [0], but please see my comments below.

The reported error was raised when connecting to the database.
Please let me know which classes or config files in your project
contain the user name and password for database connection, and
the code that connects to the database.

OK so it appears that we set some primitive properties to connect to the HSQLDB for the tests, these can be seen here [1]. I assume that we are required to set the user and password properties for the SqlStore implementation as well as the jdbc.driver and jdbc.url properties? The actual tests are here [2] and the classes being tested can be found here [3]

I think we would override the properties in [1] for the tests as we wish to keep these values empty in the main project configuration files so users can do set specific security settings by themselves.

What do you think? It would be great to hear your comments.

Thank you again in advance.

lewis

[0] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/src/test/org/apache/nutch/api/TestAPI.java
[1] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/conf/gora.properties
[2] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/src/test/org/apache/nutch/api/TestAPI.java
[3] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/src/java/org/apache/nutch/api/

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|

Re: java.net.ConnectException: Connection refused with Hsqldb 2.2.8 during mock tests

Fred Toussi-2
It is probably a user login/password issue. 

- make sure the server is started on localhost, try connecting with DatabaseManager (GUI app) to check
- if the server is started with no username or password, these default to SA and empty password
- try using SA as username, possibly in the gora.properties file snippet below.

Fred

###############################
# Default SqlStore properties #
###############################

gora.sqlstore.jdbc.driver=org.hsqldb.jdbcDriver
gora.sqlstore.jdbc.url=jdbc:hsqldb:hsql://localhost/nutchtest
# gora.sqlstore.jdbc.user=

gora.sqlstore.jdbc.user=SA

# gora.sqlstore.jdbc.password=
 
 
On Fri, Apr 13, 2012, at 15:02, Lewis John Mcgibbney wrote:
Hi Fred,

I get these through as batch emails so apologies for taking a bit of time to get back to you, they only come through once a week or something.

On Fri, Apr 13, 2012 at 7:31 AM, <[hidden email]> wrote:

I looked at the links earlier, but the output [1] has now
disappeard.

Yeah sorry about this, the link is rebuilt after every CI iteration, and I've been having problems with the fingerprinting for aggregated test builds. For the time being we disabled this particular test as you can see here [0], but please see my comments below.

The reported error was raised when connecting to the database.
Please let me know which classes or config files in your project
contain the user name and password for database connection, and
the code that connects to the database.
 
OK so it appears that we set some primitive properties to connect to the HSQLDB for the tests, these can be seen here [1]. I assume that we are required to set the user and password properties for the SqlStore implementation as well as the jdbc.driver and jdbc.url properties? The actual tests are here [2] and the classes being tested can be found here [3]

I think we would override the properties in [1] for the tests as we wish to keep these values empty in the main project configuration files so users can do set specific security settings by themselves.

What do you think? It would be great to hear your comments.

Thank you again in advance.

lewis

[0] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/src/test/org/apache/nutch/api/TestAPI.java
[1] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/conf/gora.properties
[2] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/src/test/org/apache/nutch/api/TestAPI.java
[3] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/src/java/org/apache/nutch/api/
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
_______________________________________________
Hsqldb-user mailing list
 

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|

Re: java.net.ConnectException: Connection refused with Hsqldb 2.2.8 during mock tests

lewis john mcgibbney
Hi Fred,

Thanks for the speedy feedback. Let me try it out and I'll pop the list a line to say how I got on.

Thank you and have a great weekend.

Lewis

On Fri, Apr 13, 2012 at 3:42 PM, Fred Toussi <[hidden email]> wrote:
It is probably a user login/password issue. 

- make sure the server is started on localhost, try connecting with DatabaseManager (GUI app) to check
- if the server is started with no username or password, these default to SA and empty password
- try using SA as username, possibly in the gora.properties file snippet below.

Fred

###############################
# Default SqlStore properties #
###############################

gora.sqlstore.jdbc.driver=org.hsqldb.jdbcDriver
gora.sqlstore.jdbc.url=jdbc:hsqldb:hsql://localhost/nutchtest
# gora.sqlstore.jdbc.user=

gora.sqlstore.jdbc.user=SA

# gora.sqlstore.jdbc.password=
 
 
On Fri, Apr 13, 2012, at 15:02, Lewis John Mcgibbney wrote:
Hi Fred,

I get these through as batch emails so apologies for taking a bit of time to get back to you, they only come through once a week or something.

On Fri, Apr 13, 2012 at 7:31 AM, <[hidden email]> wrote:

I looked at the links earlier, but the output [1] has now
disappeard.

Yeah sorry about this, the link is rebuilt after every CI iteration, and I've been having problems with the fingerprinting for aggregated test builds. For the time being we disabled this particular test as you can see here [0], but please see my comments below.

The reported error was raised when connecting to the database.
Please let me know which classes or config files in your project
contain the user name and password for database connection, and
the code that connects to the database.
 
OK so it appears that we set some primitive properties to connect to the HSQLDB for the tests, these can be seen here [1]. I assume that we are required to set the user and password properties for the SqlStore implementation as well as the jdbc.driver and jdbc.url properties? The actual tests are here [2] and the classes being tested can be found here [3]

I think we would override the properties in [1] for the tests as we wish to keep these values empty in the main project configuration files so users can do set specific security settings by themselves.

What do you think? It would be great to hear your comments.

Thank you again in advance.

lewis

[0] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/src/test/org/apache/nutch/api/TestAPI.java
[1] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/conf/gora.properties
[2] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/src/test/org/apache/nutch/api/TestAPI.java
[3] https://svn.apache.org/repos/asf/nutch/branches/nutchgora/src/java/org/apache/nutch/api/
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
_______________________________________________
Hsqldb-user mailing list
 



--
Lewis


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Reply | Threaded
Open this post in threaded view
|

Re: java.net.ConnectException: Connection refused with Hsqldb 2.2.8 during mock tests

lewis john mcgibbney
Hi Fred,

I made the changes that you suggested but still getting the connection refused stack traces. I've attached these so you can see for yourself. If the mailing list doesn't permit attachments then please say and I'll put it in a paste bin.

Thank you

Lewis

On Fri, Apr 13, 2012 at 4:14 PM, Lewis John Mcgibbney <[hidden email]> wrote:

On Fri, Apr 13, 2012 at 3:42 PM, Fred Toussi <[hidden email]> wrote:
It is probably a user login/password issue. 

- make sure the server is started on localhost, try connecting with DatabaseManager (GUI app) to check
- if the server is started with no username or password, these default to SA and empty password
- try using SA as username, possibly in the gora.properties file snippet below.

Fred

###############################
# Default SqlStore properties #
###############################

gora.sqlstore.jdbc.driver=org.hsqldb.jdbcDriver
gora.sqlstore.jdbc.url=jdbc:hsqldb:hsql://localhost/nutchtest
# gora.sqlstore.jdbc.user=

gora.sqlstore.jdbc.user=SA

# gora.sqlstore.jdbc.password=
 


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user

TEST-org.apache.nutch.api.TestAPI.txt (23K) Download Attachment