重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 6314|回复: 5
打印 上一主题 下一主题

[参考文档] tnsping fail :Message 3511 not found ,Message 3512 not found

[复制链接]
跳转到指定楼层
楼主
发表于 2018-9-13 16:34:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 郑全 于 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的数字变化而已。
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2018-9-13 16:38:36 | 只看该作者
查看监听和停监听,都一样 ,看来这个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:13 | 只看该作者
lsnrctl stop,也一样的错误,
手工kill -9 lsnrctl 进程,再去启动,还是报同样的信息。
不过,报错归报错,不影响系统使用。看来这个只是一个报错信息而已。
回复 支持 反对

使用道具 举报

地板
 楼主| 发表于 2018-9-13 17:21:18 | 只看该作者
这个问题怎么解决呢?
回复 支持 反对

使用道具 举报

5#
 楼主| 发表于 2018-9-13 17:50:59 | 只看该作者
本帖最后由 郑全 于 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)



回复 支持 反对

使用道具 举报

6#
 楼主| 发表于 2018-9-13 17:55:36 | 只看该作者
这里,最大的亮点,应该就是 strace了。不错的工具 。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-26 22:36 , Processed in 0.091332 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表