重庆思庄Oracle、Redhat认证学习论坛
标题: tnsping fail :Message 3511 not found ,Message 3512 not found [打印本页]
作者: 郑全 时间: 2018-9-13 16:34
标题: tnsping fail :Message 3511 not found ,Message 3512 not found
本帖最后由 郑全 于 2018-9-13 16:35 编辑
如题:
在进行tnsping tnsname时,报以下错误:
tnsping Fails With "Message 3511 not found; No message file for product=network, facility=TNS
Message 3512 not found; No message file for product=network, facility=TNS"
No message file for product=network, facility=TNSAttempting to
contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
Message 3509 not found; No message file for product=network, facility=TNS
On ORACLE 10.2.0.4
现在想来,与 数据库版本关系不大,只是message的数字变化而已。
作者: 郑全 时间: 2018-9-13 16:38
查看监听和停监听,都一样 ,看来这个lsnrctl出现了问题
$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 13-SEP-2018 16:22:01
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Message 1053 not found; No message file for product=network, facility=TNSMessage 1020 not found; No message file for product=network, facility=TNSMessage 1021 not found; No message file for product=network, facility=TNSMessage 1022 not found; No message file for product=network, facility=TNSMessage 1023 not found; No message file for product=network, facility=TNSMessage 1026 not found; No message file for product=network, facility=TNSMessage 1034 not found; No message file for product=network, facility=TNSMessage 1024 not found; No message file for product=network, facility=TNSMessage 1025 not found; No message file for product=network, facility=TNSMessage 1040 not found; No message file for product=network, facility=TNSMessage 1033 not found; No message file for product=network, facility=TNSMessage 1028 not found; No message file for product=network, facility=TNSMessage 1415 not found; No message file for product=network, facility=TNS Message 1050 not found; No message file for product=network, facility=TNS
Message 1050 not found; No message file for product=network, facility=TNS
Message 1029 not found; No message file for product=network, facility=TNSMessage 1411 not found; No message file for product=network, facility=TNS
Message 1408 not found; No message file for product=network, facility=TNS
Message 1411 not found; No message file for product=network, facility=TNS
Message 1408 not found; No message file for product=network, facility=TNS
Message 1411 not found; No message file for product=network, facility=TNS
Message 1408 not found; No message file for product=network, facility=TNS
Message 1411 not found; No message file for product=network, facility=TNS
Message 1408 not found; No message file for product=network, facility=TNS
Message 1052 not found; No message file for product=network, facility=TNS
作者: 郑全 时间: 2018-9-13 17:01
lsnrctl stop,也一样的错误,
手工kill -9 lsnrctl 进程,再去启动,还是报同样的信息。
不过,报错归报错,不影响系统使用。看来这个只是一个报错信息而已。
作者: 郑全 时间: 2018-9-13 17:21
这个问题怎么解决呢?
作者: 郑全 时间: 2018-9-13 17:50
本帖最后由 郑全 于 2018-9-13 17:54 编辑
好了,我们使用 strace工具来跟踪一下 tnsping过程。
下面我换成我自己的测试机器来模拟这个问题:
strace -f -o /tmp/tnsping.strace $ORACLE_HOME/bin/tnsping sztech1
查看 /tmp/tnsping.strace 文件:
[oracle@dbserver mesg]$ cat /tmp/tnsping.strace |grep -C 3 -i message
2577 open("/u01/app/oracle/product/11.2.0/db_1/network/mesg/tnsus.msb", O_RDONLY) = -1 ENOENT (No such file or directory)
2577 open("/u01/app/oracle/product/11.2.0/db_1/network/mesg/tnsus.msb", O_RDONLY) = -1 ENOENT (No such file or directory)
2577 gettimeofday({1536831624, 675572}, NULL) = 0
2577 write(1, "Message 3511 not found; No messa"..., 293) = 293
2577 munmap(0xb5443000, 266240) = 0
2577 munmap(0xb53e5000, 266240) = 0
2577 munmap(0xb54af000, 35744) = 0
[oracle@dbserver mesg]$
确认一下 /u01/app/oracle/product/11.2.0/db_1/network/mesg/tnsus.msb 文件,
[oracle@dbserver mesg]$ ls -ltr /u01/app/oracle/product/11.2.0/db_1/network/mesg/tnsus.msb
ls: cannot access /u01/app/oracle/product/11.2.0/db_1/network/mesg/tnsus.msb: No such file or directory
看来确实不在了,
ls $ORACLE_HOME/network/mesg|wc -l
12
正常的情况下,
ls $ORACLE_HOME/network/mesg|wc -l
26
看来文件少了。
[oracle@dbserver mesg]$ ls -l $ORACLE_HOME/network/mesg
total 672
-rw-r--r--. 1 oracle oinstall 9728 Jul 17 2013 naukus.msb
-rw-r--r--. 1 oracle oinstall 9954 May 13 2008 naukus.msg
-rw-r--r--. 1 oracle oinstall 6656 Jul 17 2013 ncrus.msb
-rw-r--r--. 1 oracle oinstall 18822 May 28 2004 ncrus.msg
-rw-r--r--. 1 oracle oinstall 5632 Jul 17 2013 ncrzhs.msb
-rw-r--r--. 1 oracle oinstall 9728 Jul 17 2013 niqus.msb
-rw-r--r--. 1 oracle oinstall 51997 Dec 17 2002 niqus.msg
-rw-r--r--. 1 oracle oinstall 8192 Jul 17 2013 niqzhs.msb
-rw-r--r--. 1 oracle oinstall 12288 Jul 17 2013 nlus.msb
-rw-r--r--. 1 oracle oinstall 16342 Feb 22 2013 nlus.msg
-rw-r--r--. 1 oracle oinstall 9728 Jul 17 2013 nlzhs.msb
-rw-r--r--. 1 oracle oinstall 3584 Jul 17 2013 nmpus.msb
-rw-r--r--. 1 oracle oinstall 5895 May 29 1996 nmpus.msg
-rw-r--r--. 1 oracle oinstall 3584 Jul 17 2013 nmpzhs.msb
-rw-r--r--. 1 oracle oinstall 4608 Jul 17 2013 nmrus.msb
-rw-r--r--. 1 oracle oinstall 12464 May 29 1996 nmrus.msg
-rw-r--r--. 1 oracle oinstall 8704 Jul 17 2013 nnfus.msb
-rw-r--r--. 1 oracle oinstall 17859 Apr 28 1998 nnfus.msg
-rw-r--r--. 1 oracle oinstall 8192 Jul 17 2013 nnfzhs.msb
-rw-r--r--. 1 oracle oinstall 67325 Oct 8 2001 nnlus.msg
-rw-r--r--. 1 oracle oinstall 6144 Jul 17 2013 snlus.msb
-rw-r--r--. 1 oracle oinstall 4658 May 29 1996 snlus.msg
-rw-r--r--. 1 oracle oinstall 5632 Jul 17 2013 snlzhs.msb
-rw-r--r--. 1 oracle oinstall 47104 Jul 17 2013 tnsus.msb.bak
-rw-r--r--. 1 oracle oinstall 247092 Jul 17 2013 tnsus.msg
-rw-r--r--. 1 oracle oinstall 35328 Jul 17 2013 tnszhs.msb
解决办法:
从其他相同版本的机器上拷贝对应的文件过来即可。
之后,再去测试,不再报错。
[oracle@dbserver mesg]$ tnsping sztech1
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 13-SEP-2018 17:53:14
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = sztech1)))
OK (10 msec)
作者: 郑全 时间: 2018-9-13 17:55
这里,最大的亮点,应该就是 strace了。不错的工具 。
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) |
Powered by Discuz! X3.2 |