aspose file tools*
The moose likes JDBC and the fly likes Two Servers: Network Adapter error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Two Servers: Network Adapter error" Watch "Two Servers: Network Adapter error" New topic
Author

Two Servers: Network Adapter error

Albert Finnegan
Greenhorn

Joined: Sep 03, 2001
Posts: 5
Two linux machines, A & B, both running Oracle 8.1.7.
One Win2K machine, C, not running Oracle server but acts as a client.
All machines can ping each other, dbastudio runs on both linux machines and can login to either machines' databases.
1.) The problem is JDBC going from machine A to machine B.
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
From machine A, dbastudio can see machine B and connect to the server, but JDBC cannot see machine B. The URL in the connection string is correct.
2.) Connections from machine B to machine A work fine: dbastudio and JDBC run fine.
3.) From the Win2K machine, JDBC connections to machine A work fine. Connections to machine B fail. Same problem as #1 above.
Summary: JDBC from machine B to machine B works, but JDBC from machine A or C to machine B fails. However, dbastudio from machine A or C to machine B works. SQL*Plus from machine A or C will also connect to machine B. The only thing that does not work is JDBC. Listener service is obviously running.
Any suggestions?
Albert Finnegan
Greenhorn

Joined: Sep 03, 2001
Posts: 5
What I forget to mention was: tnsping from machine A to B works.
Also, the listener.log for machine B does contain the connection attempts from machine A and C, but the connection info (other than IP address) is identical to machine B connecting via JDBC to itself.
This is a private LAN so there is no firewall between the machines.
Mo Ibrahim
Greenhorn

Joined: Jul 10, 2001
Posts: 28
Okay, I had similar problem. I cinfigured my client machine to hardcoded ip address and other settings for default gateway, network mask and dns settings.
After I made the changes, I do not get the Network adapter error anymore.
Albert Finnegan
Greenhorn

Joined: Sep 03, 2001
Posts: 5
The problem is solved by running netasst and adjusting the Net8 settings. I removed ONAMES from the naming methods, moved HOSTNAME to the top, and TNSNAMES second.
Since this is a small development LAN, there is no Oracle Name Server running. I rely upon the hostfile instead. So I added an alias in my /etc/hosts file for the global database name and now everything works fine.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Two Servers: Network Adapter error