Analysis of slow start-up of ORACLE snooping in Linux Environment
Virtual machine environment, OEL7.2, ORACLE 12.1. After rebooting the host, it was found that the listener started for nearly 1 minute.
The following is the analysis process:
If you perform the listening startup operation, you will hang up for a period of time, and finally the listening starts successfully.
[oracle@sky-oel7 ~] $lsnrctl start
Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=sky-oel7) (PORT=1521)
STATUS of the LISTENER
-
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0-Production
Start Date 12-JAN-2016 16:42:57
Uptime 0 days 0 hr. 0 min. 40 sec
It takes 40 seconds to start.
Specifies that the log level for monitoring is 16
[oracle@sky-oel7 trace] $cat / oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
# listener.ora Network Configuration File: / oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = sky-oel7) (PORT = 1521))
)
)
TRACE_LEVEL_LISTENER=16
Restart the listener, log
[oracle@sky-oel7 trace] $tail-f listener.log
Log messages written to / oracle/app/oracle/diag/tnslsnr/sky-oel7/listener/alert/log.xml
Trace information written to / oracle/app/oracle/diag/tnslsnr/sky-oel7/listener/trace/ora_4179_140717186082304.trc
Trace level is currently 16
Started with pid=4179
Listening on: (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=sky-oel7) (PORT=1521)
TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
WARNING: Subscription for node down event still pending
12-JAN-2016 16:10:14 * (CONNECT_DATA= (CID= (PROGRAM=) (HOST=sky-oel7) (USER=oracle)) (COMMAND=status) (ARGUMENTS=64) (SERVICE=LISTENER) (VERSION=202375680)) * status * 0
[oracle@sky-oel7 admin] $vi / oracle/app/oracle/diag/tnslsnr/sky-oel7/listener/trace/ora_4179_140717186082304.trc
2016-01-12 16 rime 09 purl 34.211259: nttcnp:binding an address to a socket.
2016-01-12 16 09 purl 34.211275: nttcnp:listening on a bound socket.
2016-01-12 16 purl 09 purl 34.211324: nttcnp:getting sockname
2016-01-12 16 purl 09 purl 34.211342: nttcnp:getting peername
2016-01-12 16 purl 09 purl 34.211355: nttcnp:exit
2016-01-12 16 purl 09 purl 34.211368: snlinGetAddrInfo:entry
2016-01-12 16 10 14. 256096: snlinGetAddrInfo:getaddrinfo () failed with error-3
2016-01-12 16 10 14. 256193: snlinGetAddrInfo:exit
2016-01-12 16 10 14. 256215: nttcon:exit
2016-01-12 16 10 14. 256241: nsopen:transport is open
2016-01-12 16 10 14. 256261: nsoptions:entry
There is no more information available.
Analysis of process startup information through strace
[oracle@sky-oel7] $strace-f-t-o ~ / listener.trc lsnrctl start
View strace log information
5042 16:42:57 socket (PF_INET, SOCK_DGRAM | SOCK_NONBLOCK, IPPROTO_IP) = 13
5042 16:42:57 connect (13, {sa_family=AF_INET, sin_port=htons (53), sin_addr=inet_addr ("172.24.97.1")}, 16) = 0
5042 16:42:57 poll ([{fd=13, events=POLLOUT}], 1, 0) = 1 ([{fd=13, revents=POLLOUT}])
5042 16:42:57 sendto (13, ":\ 26\ 1\ 0\ 0\ 1\ 0\ 0\ 0\ 0\ 0\ 0\ 10sky-oel7\ tworkgroup\ 0", 36, MSG_NOSIGNAL, NULL, 0) = 36
5042 16:42:57 poll ([{fd=13, events=POLLIN}], 1, 5000) = 0 (Timeout)
5042 16:43:02 socket (PF_INET, SOCK_DGRAM | SOCK_NONBLOCK, IPPROTO_IP) = 14
5042 16:43:02 connect (14, {sa_family=AF_INET, sin_port=htons (53), sin_addr=inet_addr ("192.168.191.1")}, 16) = 0
5042 16:43:02 poll ([{fd=14, events=POLLOUT}], 1, 0) = 1 ([{fd=14, revents=POLLOUT}])
5042 16:43:02 sendto (14, ":\ 26\ 1\ 0\ 0\ 1\ 0\ 0\ 0\ 0\ 0\ 0\ 10sky-oel7\ tworkgroup\ 0", 36, MSG_NOSIGNAL, NULL, 0) = 36
5042 16:43:02 poll ([{fd=14, events=POLLIN}], 1, 5000) = 0 (Timeout)
The above information shows that the network timeout is caused by the failure of address resolution.
These addresses are the DNS address information automatically generated during installation. Due to the change of environment, the DNS address is different, resulting in access operations.
[root@sky-oel7 ~] # cat / etc/resolv.conf
# Generated by NetworkManager
Search workgroup
Nameserver 172.24.97.1
Nameserver 192.168.191.1
After blocking these addresses, listener starts normally.