Operating System - HP-UX
1752301 Members
4937 Online
108786 Solutions
New Discussion юеВ

Re: network adapter could not establish the connection

 
SOLVED
Go to solution
attilio_1
Frequent Advisor

network adapter could not establish the connection

Hello,

With a java application located in the lan there is a error with the connection to a oracle db:
"network adapter could not establish the connection"
The database is a oracle 9.2.0.7 release.
The parameter are correct, and with a connection to a db release 8.1.7 the
connection work.
The oralce 9i work with sqlplus or toad, but it doesn't work with jdbc connection.
Someone can help me ?
Thanks
Dartan

3 REPLIES 3
Ben Dehner
Trusted Contributor
Solution

Re: network adapter could not establish the connection

Which JDBC driver are you using? The thin driver or the oci driver?

There is a problem that I've found with 9i JDBC thin drivers connecting to a 9i database using shared servers. This problem is specific to the JDBC thin drivers; both SQL*Plus and Toad use the OCI layer, as well as the JDBC oci driver. I don't know what the problem is, I only saw it from a JDBC client on a Windows system. Since the connection string and driver specification were buried within a 3rd party application, I had limited ability to troubleshoot. The work-around I finally found was to start up a second listener on a different port that allowed the JDBC client to bypass the shared server configuration.
Trust me, I know what I'm doing
attilio_1
Frequent Advisor

Re: network adapter could not establish the connection

Thanks Ben,

I have changed the listener changing the file listener.ora and it works.
To use 2 different listner for the two oracle release that I have, it isn't suffucient change the listener.ora ? If I change it and start the two listener, the second start failed saying that the listener is already up.
Only one is start.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=name)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
HPUX Error: 239: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for HPUX: Version 9.2.0.7.0 - Production
Start Date 04-JUL-2007 08:26:37
Uptime 0 days 0 hr. 15 min. 1 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /appl/oracle9i/product/9i/network/admin/listener.ora
Listener Log File /appl/oracle9i/product/9i/network/log/listener.log
Services Summary...
PLS has 1 service handler(s)
edw2 has 1 service handler(s)

How can I start the second listener ?
Thanks
Dartan
Ninad_1
Honored Contributor

Re: network adapter could not establish the connection

It is not necessary to have seperate listeners. Usually you can define all the listener enrties for all databases and versions in the listener.ora of the highest version of them all on that server. Thus you have to start/stop using the listener of the highest version of oracle on that server and your problem will be solved.
If you indeed want to keep two seperate listeners - then you have to make sure that both of them are using seperate ports to listen. e.g. one is using 1521 , then you can configure otehr to use say 1523 ro whatever.
Also while starting the listener you need to ensure that you have set all the correct relevant environment variables - like ORACLE_HOME, TNS_ADMIN, PATH (which will include the ORACLE_HOME/bin), SHLIB_PATH (to include the lib and lib32 of Oracle installation) ORACLE_SID.

Hope this clarifies,
Ninad