Problem:
when trying to restart Oracle 11g listener, got below error:
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
checked sqlnet.ora, listener.ora and ORACLE_HOME etc. environment variables, no incorrect/abnormal settings found
checked TCP/IP port usage by "lsof -i:1521" and "netstat -anp |grep 1521|grep LISTEN", didn't find any application listen on it.
checked /etc/hosts, seems normal
#more /etc/hosts
10.11.5.32 host.some.domain host
::1 localhost6.localdomain6 localhost6
#127.0.0.1 localhost.localdomain localhost <===== this is the root cause, but didn't think about it at first
checked /etc/nsswitch.conf and /etc/resolv.conf, normal
tried to start Oracle 10g listener on same machine, "lsnrctl start" finished without error, but listener was not running:
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
tried trace: strace -f lsnrctl start, at the end, it showed error
TNS-12560: TNS:protocol adapter error", but not other errors
TNS-12560: TNS:protocol adapter error", but not other errors
[pid 21229] <... futex resumed> ) = 0
[pid 21228] <... open resumed> ) = 11
[pid 21229] futex(0x3b65c1c480, FUTEX_WAIT_PRIVATE, 2, NULL
[pid 21228] read(11, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P#\0\0\0\0\0\0"..., 832) = 832
[pid 21228] fstat(11, {st_mode=S_IFREG|0644, st_size=63937, ...}) = 0
[pid 21228] mmap(NULL, 1082696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 11, 0) = 0x2aaaab1c1000
[pid 21228] mprotect(0x2aaaab1c9000, 1048576, PROT_NONE) = 0
[pid 21228] mmap(0x2aaaab2c9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 11, 0x8000) = 0x2aaaab2c9000
[pid 21228] close(11) = 0
[pid 21228] open("/u01/app/oracle/product/10.2.0/db_1/lib/libhasgen10.so", O_RDONLY) = 11
[pid 21228] read(11, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\246\2\0\0\0\0\0"..., 832) = 832
[pid 21228] fstat(11, {st_mode=S_IFREG|0644, st_size=1758137, ...}) = 0
[pid 21228] close(11) = 0
[pid 21228] mprotect(0x2aaaab1c1000, 32768, PROT_READ|PROT_WRITE) = 0
[pid 21228] mprotect(0x2aaaab1c1000, 32768, PROT_READ|PROT_EXEC) = 0
[pid 21228] futex(0x3b65c1c480, FUTEX_WAKE_PRIVATE, 1) = 1
[pid 21229] <... futex resumed> ) = 0
[pid 21229] futex(0x3b65c1c480, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 21229] exit_group(-1) = ?
Process 21229 detached
[pid 21226] <... read resumed> "", 2064) = 0
close(5) = 0
close(6) = 0
lseek(3, 39936, SEEK_SET) = 39936
read(3, "\r\0\3710\0\0V\0\3720\0\0k\0\3730\0\0\207\0\3740\0\0\245\0\3750\0\0\314\0"..., 512) = 512
lseek(3, 40448, SEEK_SET) = 40448
read(3, "\20\0\0061\0\0h\0\0071\0\0x\0\0101\0\0\213\0\n1\0\0\250\0\v1\0\0\322\0"..., 512) = 512
lseek(3, 14336, SEEK_SET) = 14336
read(3, "\17\0;\1\0\0b\0<\1\0\0\250\0=\1\0\0\314\0\365\1\0\0\360\0\366\1\0\0\6\1"..., 512) = 512
write(1, "TNS-12537: TNS:connection closed"..., 136TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
) = 136
munmap(0x2b6bfd730000, 135168) = 0
munmap(0x2b6bfd70f000, 135168) = 0
munmap(0x2b6bfd6ee000, 135168) = 0
munmap(0x2b6bfd6cd000, 135168) = 0
munmap(0x2b6bfd751000, 528384) = 0
exit_group(1) = ?
The only thing I thought may lead to this problem could be commented localhost entry in /etc/hosts, after uncommented the entry, problem disappeared.
Comments
Post a Comment