监听自动关闭(TNS-12537/TNS-12560/TNS-00507/Linux Error: 29: Illegal seek)

遇到一个监听问题:
环境:Oracle Enterprise Linux 5.4 + 11.2.0.3.14
问题:使用lsnrctl 指令启动监听没问题,过十几秒后监听自动关闭,再启动,反复出现该问题。

根据经验,监听问题一般和/etc/hosts文件有关,瞄了一眼,似乎没有问题。

接下来第一时间当然去看日志啦。
$ORACLE_HOME/network/trace目录下找到了日志,并没有什么有用的信息。

------------监听日志在哪?(trace和log查看方式差不多)

点击(此处)折叠或打开

  1. [oracle@oracle151 trace]$ lsnrctl

  2. LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-DEC-2015 15:12:31

  3. Copyright (c) 1991, 2011, Oracle. All rights reserved.

  4. Welcome to LSNRCTL, type "help" for information.

  5. LSNRCTL> show
  6. The following operations are available after show
  7. An asterisk (*) denotes a modifier or extended command:

  8. rawmode displaymode
  9. rules trc_file
  10. trc_directory trc_level
  11. log_file log_directory
  12. log_status current_listener
  13. inbound_connect_timeout startup_waittime
  14. snmp_visible save_config_on_stop
  15. dynamic_registration enable_global_dynamic_endpoint
  16. oracle_home pid
  17. connection_rate_limit

  18. LSNRCTL> show log_directory
  19. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle151.example.com)(PORT=1521)))
  20. LISTENER parameter "log_directory" set to /u01/app/oracle/diag/tnslsnr/oracle151/listener/alert
  21. The command completed successfully
  22. LSNRCTL> show log_status
  23. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle151.example.com)(PORT=1521)))
  24. LISTENER parameter "log_status" set to ON
  25. The command completed successfully
  26. LSNRCTL> show log_file
  27. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle151.example.com)(PORT=1521)))
  28. LISTENER parameter "log_file" set to /u01/app/oracle/diag/tnslsnr/oracle151/listener/alert/log.xml
  29. The command completed successfully
  于是开始怀疑防火墙,检查了一下发现没关,使用chkconfig指令把防火墙关了,还是不行,于是重启,出现了新的报错:

点击(此处)折叠或打开

  1. [oracle@oracle152 log]$ lsnrctl start

  2. LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-DEC-2015 15:14:27

  3. Copyright (c) 1991, 2011, Oracle. All rights reserved.
  4. Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...
  5. TNS-12537: TNS:connection closed
  6. TNS-12560: TNS:protocol adapter error
  7. TNS-00507: Connection closed
  8. Linux Error: 29: Illegal seek
    不死心,又回去翻/etc/hosts文件,天了噜!似乎发现了错误:
 

点击(此处)折叠或打开

  1. [oracle@oracle152 log]$ more /etc/hosts
  2. # Do not remove the following line, or various programs
  3. # that require network functionality will fail.
  4. 10.3.52.151 oracle151.example.com oracle151
  5. 10.3.52.152 oracle152.example.com oracle152
   文件少了一行127.0.0.1的记录,重新加上:

点击(此处)折叠或打开

  1. [oracle@oracle152 log]$ more /etc/hosts
  2. # Do not remove the following line, or various programs
  3. # that require network functionality will fail.
  4. 127.0.0.1 localhost.localdomain localhost
  5. 10.3.52.151 oracle151.example.com oracle151
  6. 10.3.52.152 oracle152.example.com oracle152
  再次启动监听

点击(此处)折叠或打开

  1. [oracle@oracle152 log]$ lsnrctl start

  2. LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-DEC-2015 15:18:32

  3. Copyright (c) 1991, 2011, Oracle. All rights reserved.

  4. Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...

  5. TNSLSNR for Linux: Version 11.2.0.3.0 - Production
  6. System parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
  7. Log messages written to /u01/app/oracle/diag/tnslsnr/oracle152/listener/alert/log.xml
  8. Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle152.example.com)(PORT=1521)))

  9. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle152.example.com)(PORT=1521)))
  10. STATUS of the LISTENER
  11. ------------------------

  12. Alias LISTENER
  13. Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
  14. Start Date 05-DEC-2015 15:18:33
  15. Uptime 0 days 0 hr. 0 min. 0 sec
  16. Trace Level off
  17. Security ON: Local OS Authentication
  18. SNMP OFF
  19. Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
  20. Listener Log File /u01/app/oracle/diag/tnslsnr/oracle152/listener/alert/log.xml
  21. Listening Endpoints Summary...
  22.   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle152.example.com)(PORT=1521)))
  23. The listener supports no services
  24. The command completed successfully
  监听成功启动。
  注:The listener supports no services是因为没有做静态注册,并没有问题。

  总结:二十多年白活了,粗心的毛病还是没有改掉,第一次看的时候居然没有发现错误。别拉着我,让我哭一会。






来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29781254/viewspace-1854008/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29781254/viewspace-1854008/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值