java.net Connection Exception : connection refused

Update: This is a link to the post that contains the instructions we were following http://oxfordrepo.blogspot.com/2008/02/creating-web-application-from-scratch.html

We were setting up mysql for installing repository software as web interface for fedora.

As part of the process mysql was required, but we got stumped at the following error during the installation of Fedora:

java.net Connection Exception : connection refused and a stack trace.

This error indicated it was more a connectivity issue than software. To fix this we tried the following:

mysql -h 127.0.0.1 –user=user –password=pass databaseName

this gave us a similar error:

ERROR 2003 (HY000): Can’t connect to MySQL server on ‘127.0.0.1’ (110)

To fix this problem we modified the firewall to accept ALL traffic to localhost (on loopback)

# Allow unlimited traffic on loopback
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

It now connects and we can continue installing :)

Advertisements

4 thoughts on “java.net Connection Exception : connection refused

  1. Ah, okay – I missed those rules out, it seems. Sorry for wasting your time on it! I’ve added your fix to the published ‘script’ and added a disclaimer that the script may still be a little broken. I’ll test it out asap.

    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s