TNS-12518: TNS: Listeners cannot distribute client connections

Source: Internet
Author: User
Tags dedicated server

I encountered a strange error when I recently learned about Oracle Shared Server.

The following simulated errors and solutions are displayed:
Environment: winxp_sp2_chs + oracle_r2
The server is configured as a dedicated server and runs normally.

1: Use sqlplus to change the Shared Server

--------------------------------------------------------------------------------
D: \> sqlplus sys/sys @ orcl as sysdba

SQL * Plus: Release 10.2.0.1.0-production on Sunday July 15 18:08:43 2007

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connect:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the partitioning, OLAP and Data Mining options

SQL> alter system set shared_servers = 1;

The system has been changed.

SQL>

Then use LSNRCTL to check the listener status, and you will immediately find that many connections are rejected.

--------------------------------------------------------------------------------
D: \ Documents ents and Settings \ gdy> LSNRCTL Service

LSNRCTL for 32-bit windows: Version 10.2.0.1.0-production on-2007
1: 19

Copyright (c) 1991,200 5, Oracle. All rights reserved.

Connecting to (description = (address = (Protocol = IPC) (Key = extproc1 )))
Service summary ..
The Service "plsextproc" contains one routine.
Routine "plsextproc", status unknown, contains one processing of this service Program ...
Handler:
"Dedicated" created: 0 rejected: 0
Local Server
The Service "orcl" contains one routine.
Routine "orcl", status ready, contains three processing programs of this service...
Handler:
"Dedicated" created: 33 rejected: 0 status: Ready
Local Server
"D001" created: 0 rejected: 9 current: 0 maximum: 1002 status: Ready
Dispatcher <machine: netplus, PID: 3448>
(Address = (Protocol = TCPs) (host = netplus) (Port = 1934 ))
"D000" created: 1 rejected: 0 current: 1 Maximum: 1002 status: Ready
Dispatcher <machine: netplus, PID: 3996>
(Address = (Protocol = TCP) (host = netplus) (Port = 1933 ))
The Service "orcl_xpt" contains one routine.
Routine "orcl", status ready, contains three processing programs of this service...
Handler:
"Dedicated" created: 33 rejected: 0 status: Ready
Local Server
"D001" created: 0 rejected: 9 current: 0 maximum: 1002 status: Ready
Dispatcher <machine: netplus, PID: 3448>
(Address = (Protocol = TCPs) (host = netplus) (Port = 1934 ))
"D000" created: 1 rejected: 0 current: 1 Maximum: 1002 status: Ready
Dispatcher <machine: netplus, PID: 3996>
(Address = (Protocol = TCP) (host = netplus) (Port = 1933 ))
Command executed successfully

D: \ Documents ents and Settings \ gdy>
--------------------------------------------------------------------------------
The following error was found when viewing the listener log:
2007 18:12:43 * (CONNECT_DATA = (SID = orcl) (cid = (program = D: \ oracle \ product \ 10.2.0 \ db_1 \ bin \ emagent.exe) (host = netplus) (user = System) * (address = (Protocol = TCP) (host = 192.168.1.1) (Port = 2101) * establish * orcl * 12518
TNS-12518: TNS: Listeners cannot distribute client connections
ORA-28759: Unable to open file
TNS-12560: TNS: protocol adapter error.
TNS-00540: SSL protocol adapter Error

The following error is displayed in EM:
Proxy connection to the instance

Status failed

Details cannot connect to the database instance: ORA-12518: TNS: Listeners cannot distribute client connections (DBD error: ociserverattach ).

--------------------------------------------------------------------------------

After searching the Internet, the cause may be: After the customer connects to the listener, the listener redirects the customer to the scheduler port (probably not port 1521). Due to operating system problems, these connections are rejected.
To solve this problem, you only need to use listener. Add this line of direct_handoff_ttc_listener = off to the ora header.

2: Based on the search reason, we are in listener. Add this line to the ora Header

--------------------------------------------------------------------------------
# listener. ora network configuration file: D: \ oracle \ product \ 10.2.0 \ db_1 \ Network \ admin \ listener. ora
# generated by Oracle configuration tools.
direct_handoff_ttc_listener = off
sid_list_listener =
(sid_list =
(sid_desc =
(sid_name = plsextproc)
(ORACLE_HOME = D: \ oracle \ product \ 10.2.0 \ db_1)
(program = EXTPROC)

Listener =
(Description_list =
(Description =
(Address = (Protocol = IPC) (Key = extproc1 ))
)
(Description =
(Address = (Protocol = TCP) (host = 192.168.1.1) (Port = 1521 ))
)
)

--------------------------------------------------------------------------------

3: run the following command to restart the listener and em

--------------------------------------------------------------------------------
LSNRCTL stop
LSNRCTL start
Emctl stop dbconsole
Emctl start dbconsole

--------------------------------------------------------------------------------

4: Check the listener status and log on to Em. Check that the status is normal.

--------------------------------------------------------------------------------
D: \ Documents ents and Settings \ gdy> LSNRCTL Service

LSNRCTL for 32-bit windows: Version 10.2.0.1.0-production on-2007
8: 19

Copyright (c) 1991,200 5, Oracle. All rights reserved.

Connecting to (description = (address = (Protocol = IPC) (Key = extproc1 )))
Service summary ..
The Service "plsextproc" contains one routine.
Routine "plsextproc", status unknown, contains one handler of this service...
Handler:
"Dedicated" created: 0 rejected: 0
Local Server
The Service "orcl" contains one routine.
Routine "orcl", status ready, contains three processing programs of this service...
Handler:
"D001" created: 0 rejected: 0 current: 0 maximum: 1002 status: Ready
Dispatcher <machine: netplus, PID: 3448>
(Address = (Protocol = TCPs) (host = netplus) (Port = 1934 ))
"D000" created: 7 rejected: 0 current: 6 maximum: 1002 status: Ready
Dispatcher <machine: netplus, PID: 3996>
(Address = (Protocol = TCP) (host = netplus) (Port = 1933 ))
"Dedicated" created: 1 rejected: 0 status: Ready
Local Server
The Service "orcl_xpt" contains one routine.
Routine "orcl", status ready, contains three processing programs of this service...
Handler:
"D001" created: 0 rejected: 0 current: 0 maximum: 1002 status: Ready
Dispatcher <machine: netplus, PID: 3448>
(Address = (Protocol = TCPs) (host = netplus) (Port = 1934 ))
"D000" created: 7 rejected: 0 current: 6 maximum: 1002 status: Ready
Dispatcher <machine: netplus, PID: 3996>
(Address = (Protocol = TCP) (host = netplus) (Port = 1933 ))
"Dedicated" created: 1 rejected: 0 status: Ready
Local Server
Command executed successfully

D: \ Documents ents and Settings \ gdy>

--------------------------------------------------------------------------------

This issue was mentioned in the official forum.
Http://forums.oracle.com/forums/thread.jspa? Threadid = 267593

Other: http://www.itpub.net/521086.html

The most common cause of this problem is that the processes settings are insufficient. It is also common in the configuration of Shared Server.

It may also be due to a problem with the tnsnames. ora configuration on the client and server and a problem with the listener. ora configuration. paste this part.

In addition, you can add the following lines in listener. ora to open the trace to observe.

Trace_level_listener = user
Trace_directory_listener =/opt/Oracle/product/9ir2/Network/Trace
Trace_file_listener = listener1.trc

Processes = 400, currently only 120,

In addition, when a log file appears, it is always followed:
32-bit Windows Error: 233: Unknown error.

TNS-12518: TNS: Listeners cannot distribute client connections
TNS-12560: TNS: protocol adapter error.
TNS-00530: protocol adapter Error
32-bit Windows Error: 233: Unknown error

I will paste the configuration file later.

Thank you!

--------------------------------------------------------------------------------

 

The Windows platform is a bit hard to understand. It is an oracle problem to save it.

1. Is the configuration of Orale server dedicated or shared server?
2. What is the version used by the client?
3. Add the following line to listener. ora:
Direct_handoff_ttc _ = off
4. We can't really do trace. Let's analyze it.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.