20171000011201_disable inbound_connect_timeoutset.txt,
20171000011201_disable inbound_connect_timeoutset.txt
-- // Read the previous post in the morning, found the link: http://www.itpub.net/thread-2066758-1-1.html
-- // Let's take a closer look at it today. Only after looking at others' replies can we find some details. The original link is as follows:
-- // Http://www.cnblogs.com/kerrycode/p/5224483.html
The sqlnet. INBOUND_CONNECT_TIMEOUT parameter of SQLNET. ora indicates the waiting time for user authentication timeout. The unit is seconds. The default value is 60 seconds.
The server log alert. log displays error information "WARNING: inbound connection timed out (ORA-3136)", sqlnet. log contains the TNS-12535:
TNS: operation timed out error message.
For the listener. ora parameter inbound_connect_timeout _ listener name, it indicates the waiting time for user connection request timeout, in seconds. The default value is 60 seconds.
When the request times out, the listener log listener. log displays the error message "TNS-12525: TNS: listener has not received client's request in time
Allowed ".
The parameters in sqlnet. ora are SQLNET. INBOUND_CONNECT_TIMEOUT, and the parameters in listener. ora are set
INBOUND_CONNECT_TIMEOUT_listener_name, in which the listener_name is replaced by the listener name. The official document introduces the two as follows:
SQLNET. INBOUND_CONNECT_TIMEOUT parameter in sqlnet. ora on the database server
Specify the time, in seconds, for a client to connect with the database server and provide the necessary authentication
Information. If the client fails to establish a connection and complete authentication in the time specified, then
Database server terminates the connection. In addition, the database server logs the IP address of the client and
ORA-12170: TNS: Connect timeout occurred error message to the sqlnet. log file. The client has es either an ORA-12547:
TNS: lost contact or an ORA-12637: Packet receive failed error message.
INBOUND_CONNECT_TIMEOUT_listener_name in listener. ora
Specify the time, in seconds, for the client to complete its connect request to the listener after the network
Connection had been established.
If the listener does not receive the client request in the time specified, then it terminates the connection. In
Addition, the listener logs the IP address of the client and an ORA-12525: TNS: listener has not attached ed client's
Request in time allowed error message to the listener. log file
View inbound_connect_timeout Value
1: Check the setting value of SQLNET. INBOUND_CONNECT_TIMEOUT. Generally, go to $ ORACLE_HOME/network/admin and check the sqlnet. ora parameter file.
2: view the INBOUND_CONNECT_TIMEOUT parameter of the listener. You can view the listener. ora parameter file. But sometimes, for example, by default, this is not set in the parameter file
Parameters, or some dynamic listeners do not have listener. ora configured, you can use the lsnrctl command to view the information, as shown below:
-- // In the afternoon, I checked it carefully and found that my previous test error was there. I thought both of them could be tested using telnet ip port. Understanding the error. ^_^.
-- // In fact, the document clearly states that reading the document is not serious enough and understanding is not thorough enough.
-- // Test SQLNET. INBOUND_CONNECT_TIMEOUT. An error is reported only when the network connection times out.
1. test environment:
SCOTT @ book> @ & r/ver1
PORT_STRING VERSION BANNER
----------------------------------------------------------------------------------------------------------------------------
X86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production
2. Test 1:
-- // Do not set anything first (default)
-- // Session 3:
$ Ps-ef | grep oracleboo [k]
-- // Currently, there is no network connection to the database.
-- // Open several sessions:
-- // Session 1:
$ Tail-f alert *. log
-- // Session 2:
$ Cd/u01/app/oracle/product/11.2.0.4/dbhome_1/network/log
-- // Note: To listen to the directory location of listener. log, I add DIAG_ADR_ENABLED_LISTENER = OFF in the listener Configuration.
$ Tail-f sqlnet. log listener. log
$ Date; sqlplus scott/xxxxx @ book
Mon Nov 20 16:30:37 CST 2017
SQL * Plus: Release 11.2.0.4.0 Production on Mon Nov 20 16:30:38 2017
Copyright (c) 1982,201 3, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
-- // Do not perform any operation. Wait 60 seconds ....
-- // Session 3:
$ Ps-ef | grep oracleboo [k]
Oracle 56566 1 0? 00:00:00 oraclebook (LOCAL = NO)
-- // One process is enabled on the server.
$ Tail-f alert *. log
Mon Nov 20 16:31:38 2017
WARNING: inbound connection timed out (ORA-3136)
$ Tail-f sqlnet. log listener. log
==> Sqlnet. log <=
**************************************** *******************************
Fatal NI connect error 12170.
Version information:
TNS for Linux: Version 11.2.0.4.0-Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0-Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0-Production
Time: 20-NOV-2017 16:31:38
Tracing not turned on.
Tns error struct:
Ns main err code: 12535
TNS-12535: TNS: operation timed out
Ns secondary err code: 12606
Nt main err code: 0
Nt secondary err code: 0
Nt OS err code: 0
Client address: (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.100.78) (PORT = 42714 ))
-- // Listener. log has no relevant output.
-- // Pay attention to the viewing time. The subtraction is 60 seconds.
$ Ps-ef | grep oracleboo [k]
-- // No output. The process has been over.
-- // That is, when a network connection error times out, oracle must use the SQLNET. INBOUND_CONNECT_TIMEOUT parameter to determine the time-out authentication time.
-- // Test the connection through telnet (note client ip: 192.168.100.40:
# Date; time: telnet 192.168.100.78 1521
Mon Nov 20 16:44:12 CST 2017
Trying 192.168.100.78...
Connected to gxqyydg4 (192.168.100.78 ).
Escape character is '^]'.
-- // Session 3:
$ Ps-ef | grep oracleboo [k]
-- // No related process is found.
# Lsof-P-n-I | grep 192.168.100.40
Tnslsnr 56702 oracle 15u IPv4 37111676 0t0 TCP 192.168.100.78: 1521-> 192.168.100.40: 40923 (ESTABLISHED)
# Ps-ef | grep 5670 [2]
Oracle 56702 1 0 Nov20? 00:00:01/u01/app/oracle/product/11.2.0.4/dbhome_1/bin/tnslsnr LISTENER-inherit
-- // Process number for listening process.
# Date; time: telnet 192.168.100.78 1521
Tue Nov 21 08:41:12 CST 2017
Trying 192.168.100.78...
Connected to gxqyydg4 (192.168.100.78 ).
Escape character is '^]'.
Connection closed by foreign host.
Real 1m0. 106 s
User 0m0. 001 s
Sys 0m0. 001 s
-- // You can find that the server process has not been enabled on the server and there is only one network connection. In this case, the listener actually configures the inbound_connect_timeout _ listener name.
-- // Used. The default value is 60 seconds.
-- // In Front Of sqlplus scott/xxxxx @ book, both the network connection and the server process are enabled. 2 tests are easy to understand.
-- // Understand this, and the subsequent tests will be easy to understand.
-- // Session 2:
$ Tail-f sqlnet. log listener. log
==> Listener. log <=
21-NOV-2017 08:39:22 * service_update * book * 0
21-NOV-2017 08:42:12 * <unknown connect data> * (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.100.40) (PORT = 40923) * establish * <unknown sid> * 12525
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
TNS-12525: TNS: listener has not supplied ed client's request in time allowed
TNS-12535: TNS: operation timed out
TNS-12606: TNS: Application timeout occurred
-- // Check the underline content. sid = <unknown sid>, <unknown connect data>, and PORT = 40923 can also be matched.
-- // Sqlnet. log has no relevant output.
-- // The inbound_connect_timeout _ listener name in the listener Configuration listener. ora is the timeout limit when the user connects to the listener.
-- // Sqlnet. INBOUND_CONNECT_TIMEOUT in SQLNET. ora is the waiting time for user authentication timeout (note that it has passed the network connection ).
-- // Continue to perform a test to explain the problem (Note: use local connection. do not perform any operation)
$ Date; sqlplus scott/xxxxx
Mon Nov 20 17:07:08 CST 2017
SQL * Plus: Release 11.2.0.4.0 Production on Mon Nov 20 17:07:08 2017
Copyright (c) 1982,201 3, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
$ Ps-ef | grep oracleboo [k]
Oracle 61056 61055 0? At 00:00:00 oraclebook (DESCRIPTION = (LOCAL = YES) (ADDRESS = (PROTOCOL = beq )))
# Lsof-P-n-I | greenp 6105 [56]
-- // Note that the preceding connections are different and are not connected through the network.
$ Sleep 60
$ Ps-ef | grep oracleboo [k] |
Oracle 61056 61055 0? At 00:00:00 oraclebook (DESCRIPTION = (LOCAL = YES) (ADDRESS = (PROTOCOL = beq )))
-- // You can find that such a process will not kill, that is, it will not take effect if it does not pass the network.
-- // Understand the above test. In fact, two parameters correspond to different settings, one for listening and the other for user authentication.
3. Test 2:
-- // Modify sqlnet. ora to add:
SQLNET. INBOUND_CONNECT_TIMEOUT = 30
-- // Modify listener. ora and restart the listener:
INBOUND_CONNECT_TIMEOUT_LISTENER = 10
$ Lsnrctl stop; sleep 1; lsnrctl start
# Date; time: telnet 192.168.100.78 1521
Tue Nov 21 08:52:52 CST 2017
Trying 192.168.100.78...
Connected to gxqyydg4 (192.168.100.78 ).
Escape character is '^]'.
Connection closed by foreign host.
Real 0m10. 015 s
User 0m0. 002 s
Sys 0m0. 000 s
-- // Use telnet for the test. The test is to set the parameter INBOUND_CONNECT_TIMEOUT_LISTENER to 10.
$ Date; sqlplus scott/xxxxx @ book
Tue Nov 21 08:54:29 CST 2017
SQL * Plus: Release 11.2.0.4.0 Production on Tue Nov 21 08:54:29 2017
Copyright (c) 1982,201 3, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
-- // Alter. log output:
==> Sqlnet. log <=
Tue Nov 21 08:54:59 2017
WARNING: inbound connection timed out (ORA-3136)
-- // Sqlnet. log output:
==> Sqlnet. log <=
**************************************** *******************************
Fatal NI connect error 12170.
Version information:
TNS for Linux: Version 11.2.0.4.0-Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.4.0-Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.4.0-Production
Time: 21-NOV-2017 08:54:59
Tracing not turned on.
Tns error struct:
Ns main err code: 12535
TNS-12535: TNS: operation timed out
Ns secondary err code: 12606
Nt main err code: 0
Nt secondary err code: 0
Nt OS err code: 0
Client address: (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.100.78) (PORT = 54593 ))
-- // The time minus is 30 seconds. This indicates that the user authentication for network connection is tested.
-- // For more information, see http://www.cnblogs.com/kerrycode/p/5224483.html.
Summary:
I made a conceptual error and thought that this parameter INBOUND_CONNECT_TIMEOUT is the same for timeout authentication. In fact, there are two different users.
One indicates the waiting time for user authentication timeout, And the other indicates the waiting time for user connection request timeout.
To put it bluntly, one is for listening and one is for user authentication (the network connection has been established ).
Another document is more important to read other people's documents, so that errors can be quickly discovered. In short, you still have confusion about some concepts...
I don't know how to authenticate these parameters !!