Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 15th, 2005, 08:26 PM
merl merl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 51 merl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 34 sec
Reputation Power: 7
ORA-12535: TNS:operation timed out

Hi all,

I recently set up a database on a new server (SID=RRNEW), and can connect to it fine with sqlplus on the server. But I cannot connect to it from my pc with sqlplus.

The server has an active firewall, but port 1521 is open. I can successfully tnsping the database from my pc.

Initially I was getting this error message (from sqlnet.log on my pc)

Fatal NI connect error 12560, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)(ARGS='(DESCRIPTION=(LOCAL=YES )(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=C:\oracle\Ora92\bin\sqlplus.exe)( HOST=MERL)(USER=DaUser))))

VERSION INFORMATION:
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 9.2.0.1.0 - Production
Time: 16-MAR-2005 13:58:03
Tracing not turned on.
Tns error struct:
nr err code: 0
ns main err code: 12560
TNS-12560: TNSrotocol adapter error
ns secondary err code: 0
nt main err code: 530
TNS-00530: Protocol adapter error
nt secondary err code: 126
nt OS err code: 0

I went and reconfigured the Oracle Listener with the Net Configuration Assistant, and restarted the listener. Now I get this error attempting to login:

Fatal NI connect error 12535, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.64)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=RRNew )(CID=(PROGRAM=C:\oracle\Ora92\bin\sqlplus.exe)(HOST=MERL)(USER=DaUser))))

VERSION INFORMATION:
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 9.2.0.1.0 - Production
Time: 16-MAR-2005 15:16:30
Tracing not turned on.
Tns error struct:
nr err code: 0
ns main err code: 12535
TNS-12535: TNSperation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 60
nt OS err code: 0

Any ideas what is stopping me from connecting?

Thanks in advance.

Reply With Quote
  #2  
Old March 16th, 2005, 04:01 PM
merl merl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 51 merl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 34 sec
Reputation Power: 7
Ok, I have more information now. I turned tracing on on the client.

The connection to oracle on port 1521 works, but it then gets re-directed to port 1922 (a different port every login attempt). Obviously this gets blocked by the firewall, since that port is closed.

Possible solutions:
1. Turn the firewall off (unacceptable medium to longterm)
2. Restrict whatever allocates the second port to a narrow range, and open those ports on the firewall.

Does anybody know what allocates those ports when clients are connecting?

Excerpt from trace file from client:

[17-MAR-2005 10:47:49:156] nigini: Count in NI global area now: 1
[17-MAR-2005 10:47:49:156] nigini: Count in NI global area now: 1
[17-MAR-2005 10:47:49:156] nrigbni: Unable to get data from navigation file tnsnav.ora
[17-MAR-2005 10:47:49:156] niotns: niotns: setting up interrupt handler...
[17-MAR-2005 10:47:49:156] niotns: Not trying to enable dead connection detection.
[17-MAR-2005 10:47:49:156] niotns: Calling address: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.64)(PORT=1521)))(CONNECT_DATA=(SER VICE_NAME=RRNew)(CID=(PROGRAM=C:\oracle\Ora92\bin\sqlplus.exe)(HOST=MERL)(USER=Administrator))))
[17-MAR-2005 10:47:49:156] nscall: connecting...
[17-MAR-2005 10:47:49:156] nttgetport: port resolved to 1521
[17-MAR-2005 10:47:49:156] nttbnd2addr: using host IP address: 192.168.1.64
[17-MAR-2005 10:47:49:156] nsopen: opening transport...
[17-MAR-2005 10:47:49:166] nttcnp: Validnode Table IN use; err 0x0
[17-MAR-2005 10:47:49:166] nttcni: trying to connect to socket 820.
[17-MAR-2005 10:47:49:166] nttcni: connected on ipaddr 192.168.1.51
[17-MAR-2005 10:47:49:166] nttcon: set TCP_NODELAY on 820
[17-MAR-2005 10:47:49:166] nsopen: transport is open
[17-MAR-2005 10:47:49:166] nsnainit: inf->nsinfflg[0]: 0x61 inf->nsinfflg[1]: 0x61
[17-MAR-2005 10:47:49:166] nsopen: global context check-in (to slot 0) complete
[17-MAR-2005 10:47:49:166] nscon: doing connect handshake...
[17-MAR-2005 10:47:49:166] nscon: sending NSPTCN packet
[17-MAR-2005 10:47:49:196] nscon: got NSPTRD packet
[17-MAR-2005 10:47:49:196] nscall: redirected
[17-MAR-2005 10:47:49:196] nstimarmed: no timer allocated
[17-MAR-2005 10:47:49:196] nsclose: closing transport
[17-MAR-2005 10:47:49:196] nsclose: global context check-out (from slot 0) complete
[17-MAR-2005 10:47:49:196] nscall: connecting...
[17-MAR-2005 10:47:49:196] nttgetport: port resolved to 1922
[17-MAR-2005 10:47:49:196] nttbnd2addr: using host IP address: 192.168.1.64
[17-MAR-2005 10:47:49:196] nsopen: opening transport...
[17-MAR-2005 10:47:49:196] nttcnp: Validnode Table IN use; err 0x0
[17-MAR-2005 10:47:49:196] nttcni: trying to connect to socket 860.
[17-MAR-2005 10:48:10:236] ntt2err: soc 860 error - operation=1, ntresnt[0]=505, ntresnt[1]=60, ntresnt[2]=0
[17-MAR-2005 10:48:10:236] nserror: nsres: id=0, op=65, ns=12535, ns2=12560; nt[0]=505, nt[1]=60, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0

[17-MAR-2005 10:48:10:236] nsopen: unable to open transport
[17-MAR-2005 10:48:10:236] nioqper: error from nscall
[17-MAR-2005 10:48:10:236] nioqper: nr err code: 0
[17-MAR-2005 10:48:10:246] nioqper: ns main err code: 12535
[17-MAR-2005 10:48:10:246] nioqper: ns (2) err code: 12560
[17-MAR-2005 10:48:10:246] nioqper: nt main err code: 505
[17-MAR-2005 10:48:10:246] nioqper: nt (2) err code: 60
[17-MAR-2005 10:48:10:246] nioqper: nt OS err code: 0
[17-MAR-2005 10:48:10:246] niqme: reporting NS-12535 error as ORA-12535
[17-MAR-2005 10:48:10:246] niomapnserror: returning error 12535
[17-MAR-2005 10:48:10:246] niotns: Couldn't connect, returning 12535
[17-MAR-2005 10:48:10:246] nigtrm: Count in the NI global area is now 0
[17-MAR-2005 10:48:10:246] nigtrm: Count in the NL global area is now 0

Reply With Quote
  #3  
Old March 16th, 2005, 04:15 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,906 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 6 h 56 m 54 sec
Reputation Power: 279
This should do the trick, it's client oriented but it explains pretty clearly how the ports are chosen.
Please report your experience.

Another article
suggests a server side solution (and also lists some caveats)
Quote:
An in-house approach involves the explicit configuration of the ports that dispatchers are to use--dispatchers can be configured to listen on named ports within firewalled environments. The following sample configuration (for Oracle8i and higher) illustrates how to configure a dispatcher to listen on a specific port:

local_listener="(address=(PROTOCOL=tcp)(host=hostname) (port=1521))" dispatchers="(address=(partial=true) (protocol=tcp) \ (host=hostname)(port=5000))(dispatchers=1)"

This configuration is done in the initialization parameter file that contains the default and nondefault settings for an Oracle instance. In addition, changes are needed in the listener configuration file to preconfigure the service names associated with the database and its service handlers. Then, the firewall can be configured to listen on these now-known ports.
Comments on this post
merl disagrees: You rock. Thanks

Last edited by pabloj : March 16th, 2005 at 04:18 PM.

Reply With Quote
  #4  
Old March 16th, 2005, 04:37 PM
merl merl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 51 merl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 34 sec
Reputation Power: 7
I'm an idiot. That looks like it should solve my problem, but I was too hasty in saying that it solved it.

After setting USE_SHARED_SOCKET=TRUE in the registry on both the client and the server (and rebooting both) it still is getting redirected to another port that is closed.

[17-MAR-2005 15:48:40:216] nigini: Count in NI global area now: 1
[17-MAR-2005 15:48:40:216] nigini: Count in NI global area now: 1
[17-MAR-2005 15:48:40:216] nrigbni: Unable to get data from navigation file tnsnav.ora
[17-MAR-2005 15:48:40:216] niotns: niotns: setting up interrupt handler...
[17-MAR-2005 15:48:40:216] niotns: Not trying to enable dead connection detection.
[17-MAR-2005 15:48:40:216] niotns: Calling address: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.64)(PORT=1521)))(CONNECT_DATA=(SER VICE_NAME=RRNew)(CID=(PROGRAM=C:\oracle\Ora92\bin\sqlplus.exe)(HOST=MERL)(USER=Administrator))))
[17-MAR-2005 15:48:40:216] nscall: connecting...
[17-MAR-2005 15:48:40:216] nttgetport: port resolved to 1521
[17-MAR-2005 15:48:40:226] nttbnd2addr: using host IP address: 192.168.1.64
[17-MAR-2005 15:48:40:226] nsopen: opening transport...
[17-MAR-2005 15:48:40:226] nttcnp: Validnode Table IN use; err 0x0
[17-MAR-2005 15:48:40:226] nttcni: trying to connect to socket 820.
[17-MAR-2005 15:48:40:226] nttcni: connected on ipaddr 192.168.1.51
[17-MAR-2005 15:48:40:226] nttcon: set TCP_NODELAY on 820
[17-MAR-2005 15:48:40:226] nsopen: transport is open
[17-MAR-2005 15:48:40:226] nsnainit: inf->nsinfflg[0]: 0x61 inf->nsinfflg[1]: 0x61
[17-MAR-2005 15:48:40:226] nsopen: global context check-in (to slot 0) complete
[17-MAR-2005 15:48:40:226] nscon: doing connect handshake...
[17-MAR-2005 15:48:40:226] nscon: sending NSPTCN packet
[17-MAR-2005 15:48:40:246] nscon: got NSPTRD packet
[17-MAR-2005 15:48:40:246] nscall: redirected
[17-MAR-2005 15:48:40:246] nstimarmed: no timer allocated
[17-MAR-2005 15:48:40:246] nsclose: closing transport
[17-MAR-2005 15:48:40:246] nsclose: global context check-out (from slot 0) complete
[17-MAR-2005 15:48:40:246] nscall: connecting...
[17-MAR-2005 15:48:40:246] nttgetport: port resolved to 2151
[17-MAR-2005 15:48:40:246] nttbnd2addr: using host IP address: 192.168.1.64
[17-MAR-2005 15:48:40:246] nsopen: opening transport...
[17-MAR-2005 15:48:40:246] nttcnp: Validnode Table IN use; err 0x0
[17-MAR-2005 15:48:40:246] nttcni: trying to connect to socket 860.
[17-MAR-2005 15:49:01:256] ntt2err: soc 860 error - operation=1, ntresnt[0]=505, ntresnt[1]=60, ntresnt[2]=0
[17-MAR-2005 15:49:01:256] nserror: nsres: id=0, op=65, ns=12535, ns2=12560; nt[0]=505, nt[1]=60, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
[17-MAR-2005 15:49:01:256] nsopen: unable to open transport
[17-MAR-2005 15:49:01:256] nioqper: error from nscall
[17-MAR-2005 15:49:01:256] nioqper: nr err code: 0
[17-MAR-2005 15:49:01:256] nioqper: ns main err code: 12535
[17-MAR-2005 15:49:01:256] nioqper: ns (2) err code: 12560
[17-MAR-2005 15:49:01:256] nioqper: nt main err code: 505
[17-MAR-2005 15:49:01:256] nioqper: nt (2) err code: 60
[17-MAR-2005 15:49:01:256] nioqper: nt OS err code: 0
[17-MAR-2005 15:49:01:256] niqme: reporting NS-12535 error as ORA-12535
[17-MAR-2005 15:49:01:256] niomapnserror: returning error 12535
[17-MAR-2005 15:49:01:256] niotns: Couldn't connect, returning 12535
[17-MAR-2005 15:49:01:256] nigtrm: Count in the NI global area is now 0
[17-MAR-2005 15:49:01:256] nigtrm: Count in the NL global area is now 0

Reply With Quote
  #5  
Old March 17th, 2005, 02:53 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,906 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 6 h 56 m 54 sec
Reputation Power: 279
The first solution I posted is for the client (i.e. personal firewall) the second is for the server, you shouldn't mix them up.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > ORA-12535: TNS:operation timed out


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway