暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

TNS-01106 处理

原创 胡振兴 2023-03-28
3562

1.开启监听,报如下错误

TNS-01106: Listener using listener name LISTENER has already been started

[oracle@henry admin]$ lsnrctl start

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 28-MAR-2023 09:59:03

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

TNS-01106: Listener using listener name LISTENER has already been started

2.--通过ps 命令没有发现监听的进程

[oracle@henry ~]$ ps -ef | grep -i tns

root 35 2 0 09:52 ? 00:00:00 [netns]

oracle 4123 2573 0 10:11 pts/2 00:00:00 grep --color=auto -i tns

3.--这个问题原因基本就2个原因导致:

1./etc/hosts 文件中的 IP和主机名不一致

2.,listener.ora 中监听主机非当前主机.

4.查看 /etc/hosts 文件

[root@henry ~]# cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.6.131 henry


显示跟 IP不符

ens33: flags=4163 mtu 1500

inet 192.168.6.132 netmask 255.255.255.0 broadcast 192.168.6.255

inet6 fe80::9941:2693:38ba:317b prefixlen 64 scopeid 0x20

inet6 fe80::7a5e:cead:f696:b4e9 prefixlen 64 scopeid 0x20

ether 00:0c:29:1e:ab:40 txqueuelen 1000 (Ethernet)

RX packets 1907 bytes 160454 (156.6 KiB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 1537 bytes 222663 (217.4 KiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

5.修改 vi/ets/hosts, 重新启动监听正常

oracle@henry ~]$ lsnrctl start

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 28-MAR-2023 10:01:33

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

Starting /oracle/app/oracle/product/19.3.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production

System parameter file is /oracle/app/oracle/product/19.3.0/dbhome_1/network/admin/listener.ora

Log messages written to /oracle/app/oracle/diag/tnslsnr/henry/listener/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=henry)(PORT=1521)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=henry)(PORT=1521))) STATUS of the LISTENER

Alias LISTENER

Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production

Start Date 28-MAR-2023 10:01:34

Uptime 0 days 0 hr. 0 min. 10 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /oracle/app/oracle/product/19.3.0/dbhome_1/network/admin/listener.ora

Listener Log File /oracle/app/oracle/diag/tnslsnr/henry/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=henry)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary...

Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s).

Instance "cdb19c", status READY, has 1 handler(s) for this service...

Service "cdb19c" has 1 instance(s).

Instance "cdb19c", status READY, has 1 handler(s) for this service...


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论