Subject Re: [Firebird-Java] Unable to complete network request to host
Author Mark Rotteveel
Does your /etc/hosts contain an entry for localhost? I remember seeing issues where not being able to (reverse)resolve the hostname of the IP address caused problems.

Are you able to connect from another computer to the Firebird on this server (and from this server to a Firebird instance on another server)? What happens if you use the actual hostname?

Mark

> Hi,
>
> I don´t know how to solve this problem. I´m trying to connect to a
> database in the localhost, and i know all parameters are ok, the application is
> ok, but it refuses to connect (just in one server)
>
> It connects through ISQL:
>
> # isql 127.0.0.1:teste -user sysdba -pass keymaster
> Database: 127.0.0.1:teste, User: sysdba
> SQL> exit;
>
> I´m using the last Firebird version:
>
> # gfix -z
> gfix version LI-V2.1.3.18185 Firebird 2.1
>
> The last Java version:
>
> # java -version
> java version "1.6.0_18"
> Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
> Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)
>
> The last JayBird version (2.1.6)
>
> There are no iptables rules set on this host, nor hosts.deny ou
> hosts.allow entries.
>
> But it refuses to connect:
>
> # java -jar GestorProvedor.jar -jdbc
> 'jdbc:firebirdsql:127.0.0.1/3050:teste' -porta 8081
> Feb 12, 2010 8:24:03 PM br.com.personalsoft.gestor.GestorProvedor main
> SEVERE: Ocorreu um erro ao conectar-se ao banco de dados
> GDS Exception. 335544721. Unable to complete network request to host
> "127.0.0.1".
> Reason: Unable to complete network request to host "127.0.0.1".
> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544721. Unable to
> complete network request to host "127.0.0.1".
> Reason: Unable to complete network request to host "127.0.0.1".
>
> The application is the most simple app i could create:
>
> public static void main(String[] args) throws Exception {
> Class.forName("org.firebirdsql.jdbc.FBDriver");
>
> DriverManager.getConnection("jdbc:firebirdsql://127.0.0.1/teste?charset=ISO8859_1;userName=sysdba;password=masterkey;roleName=public");
> System.out.println("Conexao OK");
> }
>
> But when i run in this host i get:
>
> # java -jar Test.jar
> Exception in thread "main" java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
> Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544721.
> Unable to complete network request to host "127.0.0.1".
> Reason: Unable to complete network request to host "127.0.0.1".
> at
> org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:122)
> at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:131)
> at java.sql.DriverManager.getConnection(Unknown Source)
> at java.sql.DriverManager.getConnection(Unknown Source)
> at Test.main(Test.java:8)
>
> If i run in another host (same Java version, same Firebird version,
> etc...):
>
> # java -jar Test.jar
> Conexao OK
>
> Do someone have some clue about this? Am i doing something stupid?
>
> Regards,
>
> Fabiano
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
--
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/atbrowser