Subject Can't connect to DB oln localhost - Linux issue?
Author muellerix2k
Hi !

I have a huge problem that I'm unable to solve.
I developed a Webapp using Tomcat 4.1.31 and Firebird 1.5 on Windows
which worked like a charm.
I used the newest Jaybird 1.5.4 and sice yesterday 1.5.5.

When I tried to deploy the app on a freshly installed Linux Server
(Debian Woody) I ran into big problems. I used the super-server
install of Firebird.

I'm using connection pooling as descriped in the documentation, but
since I wanted to narrow the possible solutions I tested a db-connect
with a small stand-alone-program which goes something like this:
--------------------------------
public class FBTest {
public FBTest() throws Exception{
Class.forName("org.firebirdsql.jdbc.FBDriver");
Connection conn =
DriverManager.getConnection(
"jdbc:firebirdsql://localhost:3050/opt/firebird/db/TEST.GDB",
"SYSDBA", "sysdba");
Statement stmt = conn.createStatement();
stmt.execute("SELECT * FROM HAUPTTABELLE");
}


public static void main(String[] args) throws Exception{
System.out.println("Versuche DB-Connection zu erhalten.");
FBTest t = new FBTest();
}
}
-------------------------
As soon as I try to open the connection I get the following exception:

Exception in thread "main" org.firebirdsql.jdbc.FBSQLException:
Resource Exception. Unable to complete network request to host
"localhost".
Reason: Unable to complete network request to host "localhost".
at
org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:112)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:189)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at FBTest.<init>(FBTest.java:25)
at FBTest.main(FBTest.java:36)
---------------------------------------------------------

I CAN open the DB using isql (also seeing the open connection using
netstat) so I'm pretty sure this has to be a Java issue.

Can anybody help me please?

Regards,
Michael