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

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1043|回复: 0
打印 上一主题 下一主题

TNS-12542: TNS:address already in use

[复制链接]
跳转到指定楼层
楼主
发表于 2021-11-3 09:44:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
早上起来,用户说数据库连不上,发现U01磁盘空间慢了,处理后,发现还是连接不上,

如下
ora.LISTENER.lsnr
               ONLINE  INTERMEDIATE ythpt01                  Not All Endpoints Re
                                                             gistered,STABLE
               ONLINE  INTERMEDIATE ythpt02                  Not All Endpoints Re
                                                             gistered,STABLE


ora.LISTENER_SCAN1.lsnr
      1        ONLINE  INTERMEDIATE ythpt01                  Not All Endpoints Re
                                                             gistered,STABLE


[grid@ythpt01 ~]$ lsnrctl status LISTENER_SCAN1

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 03-NOV-2021 09:16:24

Copyright (c) 1991, 2020, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                03-NOV-2021 08:45:47
Uptime                    0 days 0 hr. 30 min. 36 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/19.0.0.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/ythpt01/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
The listener supports no services
The command completed successfully


看监听日志:

Error listening on: (ADDRESS=(PROTOCOL=TCP)(RATE_LIMIT=YES)(HOST=203.1.1.51)(PORT=1521)(IP=FIRST))
Error listening on: (ADDRESS=(PROTOCOL=TCP)(RATE_LIMIT=YES)(HOST=203.1.1.53)(PORT=1521))
03-NOV-2021 09:08:03 * (ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)) * service_register * LsnrAgt * 12542
TNS-12542: TNS:address already in use
TNS-12560: TNS:protocol adapter error
  TNS-00512: Address already in use
   Linux Error: 98: Address already in use
    TNS-12542: TNS:address already in use
     TNS-12560: TNS:protocol adapter error
      TNS-00512: Address already in use
       Linux Error: 98: Address already in use


[oracle@ythpt01 ~]$ ps -ef|grep tns
root       425     2  0 08:41 ?        00:00:00 [netns]
oracle    1027 76460  0 09:25 pts/0    00:00:00 grep --color=auto tns
oracle   19015     1  0 08:44 ?        00:00:00 /u01/app/oracle/product/19.0.0.0/dbhome_1/bin/tnslsnr LISTENER -inherit
grid     23485     1  0 08:45 ?        00:00:00 /u01/app/19.0.0.0/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
grid     24189     1  0 08:45 ?        00:00:00 /u01/app/19.0.0.0/grid/bin/tnslsnr LISTENER_SCAN1 -no_crs_notify -inherit
grid     34130     1  0 09:13 ?        00:00:00 /u01/app/19.0.0.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit


杀掉oracle_home监听后,监听日志中正常了。

kill -9 19015

[root@ythpt01 ~]# ps -ef|grep tns
root       425     2  0 08:41 ?        00:00:00 [netns]
root      3143 12854  0 09:25 pts/0    00:00:00 grep --color=auto tns
grid     23485     1  0 08:45 ?        00:00:00 /u01/app/19.0.0.0/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
grid     24189     1  0 08:45 ?        00:00:00 /u01/app/19.0.0.0/grid/bin/tnslsnr LISTENER_SCAN1 -no_crs_notify -inherit
grid     34130     1  0 09:13 ?        00:00:00 /u01/app/19.0.0.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit


[oracle@ythpt01 ~]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 03-NOV-2021 09:29:18

Copyright (c) 1991, 2020, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                03-NOV-2021 09:13:08
Uptime                    0 days 0 hr. 16 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/19.0.0.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/ythpt01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=203.1.1.50)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=203.1.1.52)(PORT=1521)))
Services Summary...
Service "+APX" has 1 instance(s).
  Instance "+APX1", status READY, has 1 handler(s) for this service...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_RECO" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...

Service "ythptdb" has 1 instance(s).
  Instance "ythptdb1", status READY, has 1 handler(s) for this service...
Service "ythptdbXDB" has 1 instance(s).
  Instance "ythptdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@ythpt01 ~]$



就是有人把数据库路径的监听给打开了导致。


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-28 14:59 , Processed in 0.091140 second(s), 19 queries .

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

© 2001-2020

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