Skip to main content

Oracle listener startup failure

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


[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

Popular posts from this blog

How to send command / input to multiple Putty window simultaneously

Putty is one of the best and must-have freeware for people working on Linux/Unix but use Windows as client like me.  We need to manage many servers and sometimes we are hoping we can run/execute same command on multiple host at same time, or just input same thing to multiple host. I searched online for a tool can do this. And it looks like PuTTYCS (PuTTY Command Sender) is the only one existing. But I’m a little bit disappointing after tried the software, it’s good but not good enough. It can only send command to each window one by one, and you have to wait until last window got input. So I think I should do something, and puttyCluster was born ( https://github.com/mingbowan/puttyCluster ) interface is simple: When you input Windows title pattern in the text box, you will be prompt for how many windows matching the pattern, like this: and you click the edit box under “cluster input”, what ever key you pressed will pass to all those windows simultaneously, even “Ctrl-C”, “Esc” ...

enable special character support in Graphite metric name

Problem Graphite doesn’t support special characters like “ “ (empty space), “/” slash etc. Because it expect everything to be just ASCII to split/processing them, and then make directories based on metric name. For example:   Metric:     datacenter1.server1.app1.metric1.abc Will create datacenter1/server1/app1/metric1/abc.wsp But Metric: datacentter1.this is a test/with/path.app.test will fail when create directory So any special name not allow to appear in directory/file name is not supported by Graphite.   What we can do?   We can urlEncode the metric name which has special characters. So like “/var/opt” (not valid file name) will become “%2Fvar%2Fopt”(now valid), using urlEncode instead of others (like BASE64) is because this will keep most of data readable.   So what to change? 1. urlEncode metric name before send to Graphite (if you always sending metrics using text/line mode instead of pickle/batch mode, then you may consider modify ...