TNS-01189: The listener could not authenticate the user

时间:2023-05-03 14:55:26

查看监听时,发现监听状态异常,报TNS-01189: The listener could not authenticate the user错误

$ lsnrctl stat 

LSNRCTL for Linux: Version 11.2.0.4. - Production on -AUG- ::

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=testdb)(PORT=)))
TNS-: The listener could not authenticate the user

原因,本机器是克隆而来,修改了ip地址之后,没有修改对应的hosts文件

# ifconfig
eth1 Link encap:Ethernet HWaddr :::A0::9A
inet addr:10.11.12.190 Bcast:10.11.12.255 Mask:255.255.255.0
inet6 addr: fe80:::56ff:fea0:729a/ Scope:Link
UP BROADCAST RUNNING MULTICAST MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (282.2 MiB) TX bytes: (5.9 MiB) # more /etc/hosts
10.11.12.180 testdb
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: localhost localhost.localdomain localhost6 localhost6.localdomain6

修改方法:

修改host配置

# more /etc/hosts
10.11.12.190 testdb
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: localhost localhost.localdomain localhost6 localhost6.localdomain6