Chinaunix首页 | 论坛 | 博客
  • 博客访问: 20704
  • 博文数量: 3
  • 博客积分: 85
  • 博客等级: 民兵
  • 技术积分: 35
  • 用 户 组: 普通用户
  • 注册时间: 2011-11-10 16:31
文章分类

全部博文(3)

文章存档

2011年(3)

我的朋友

分类: Oracle

2011-11-22 17:41:26

今天一天34数据库登录不上,报TNS-12541: TNS:no listener
到服务器上看下监听器状态
  1. oracle@linux-34:~> lsnrctl status
  2. LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 14-OCT-2011 09:12:37
  3. Copyright (c) 1991, 2007, Oracle. All rights reserved.
  4. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux-34.site)(PORT=1521)))
  5. TNS-12541: TNS:no listener
  6. TNS-12560: TNS:protocol adapter error
  7. TNS-00511: No listener
  8. Linux Error: 111: Connection refused
  9. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
  10. TNS-12541: TNS:no listener
  11. TNS-12560: TNS:protocol adapter error
  12. TNS-00511: No listener
  13. Linux Error: 111: Connection refused

启动下试试

 

  1. oracle@linux-34:~> lsnrctl start
  2. LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 14-OCT-2011 09:12:45
  3. Copyright (c) 1991, 2007, Oracle. All rights reserved.
  4. Starting /home/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait...
  5. TNSLSNR for Linux: Version 11.1.0.6.0 - Production
  6. System parameter file is /home/oracle/product/11.1.0/db_1/network/admin/listener.ora
  7. Log messages written to /home/oracle/diag/tnslsnr/linux-34/listener/alert/log.xml
  8. Error listening on: (ADDRESS=(PROTOCOL=ipc)(PARTIAL=yes)(QUEUESIZE=1))
  9. No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux-34.site)(PORT=1521)))
  10. TNS-12546: TNS:permission denied
  11. TNS-12560: TNS:protocol adapter error
  12. TNS-00516: Permission denied
  13. Linux Error: 13: Permission denied
  14. Listener failed to start. See the error message(s) above...

竟然报TNS-12546: TNS:permission denied
查看下 /var/tmp/.oracle、/tmp/.oracle 这两个目录的权限访问。

 

  1. linux-34:~ # ls -lrtd /tmp/.oracle
  2. drwxrwxrwx 2 root root 4096 May 9 16:01 /tmp/.oracle
  3. linux-34:~ # ls -lrtd /var/tmp/.oracle
  4. drwxr-xr-x 2 root root 4096 Oct 14 09:45 /var/tmp/.oracle

原因应该就在这了,/var/tmp/.oracle是755权限,把它修改为777。

 

  1. linux-34:~ # chmod -R 777 /var/tmp/.oracle

然后再启动监听试试。

 

  1. oracle@linux-34:~> lsnrctl start
  2. LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 14-OCT-2011 09:45:04
  3. Copyright (c) 1991, 2007, Oracle. All rights reserved.
  4. Starting /home/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait...
  5. TNSLSNR for Linux: Version 11.1.0.6.0 - Production
  6. System parameter file is /home/oracle/product/11.1.0/db_1/network/admin/listener.ora
  7. Log messages written to /home/oracle/diag/tnslsnr/linux-34/listener/alert/log.xml
  8. Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux-34.site)(PORT=1521)))
  9. Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  10. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux-34.site)(PORT=1521)))
  11. STATUS of the LISTENER
  12. ------------------------
  13. Alias LISTENER
  14. Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
  15. Start Date 14-OCT-2011 09:45:04
  16. Uptime 0 days 0 hr. 0 min. 0 sec
  17. Trace Level off
  18. Security ON: Local OS Authentication
  19. SNMP OFF
  20. Listener Parameter File /home/oracle/product/11.1.0/db_1/network/admin/listener.ora
  21. Listener Log File /home/oracle/diag/tnslsnr/linux-34/listener/alert/log.xml
  22. Listening Endpoints Summary...
  23. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux-34.site)(PORT=1521)))
  24. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  25. The listener supports no services
  26. The command completed successfully
  27. oracle@linux-34:~> lsnrctl status
  28. LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 14-OCT-2011 09:46:02
  29. Copyright (c) 1991, 2007, Oracle. All rights reserved.
  30. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux-34.site)(PORT=1521)))
  31. STATUS of the LISTENER
  32. ------------------------
  33. Alias LISTENER
  34. Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
  35. Start Date 14-OCT-2011 09:45:04
  36. Uptime 0 days 0 hr. 0 min. 58 sec
  37. Trace Level off
  38. Security ON: Local OS Authentication
  39. SNMP OFF
  40. Listener Parameter File /home/oracle/product/11.1.0/db_1/network/admin/listener.ora
  41. Listener Log File /home/oracle/diag/tnslsnr/linux-34/listener/alert/log.xml
  42. Listening Endpoints Summary...
  43. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux-34.site)(PORT=1521)))
  44. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  45. Services Summary...
  46. Service "orarpt" has 1 instance(s).
  47. Instance "orarpt", status READY, has 1 handler(s) for this service...
  48. Service "orarpt_XPT" has 1 instance(s).
  49. Instance "orarpt", status READY, has 1 handler(s) for this service...
  50. The command completed successfully
问题解决。
阅读(3690) | 评论(0) | 转发(0) |
0

上一篇:Oracle GoldenGate和Dataguard以及stream复制的区别

下一篇:没有了

给主人留下些什么吧!~~