listener TNS-01189 问题

时间:2021-02-06 15:00:25

-- 启动监听,提示已经启动.

[oracle@sh ~]$ lsnrctl start

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 06-FEB-2017 15:30:14

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

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

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

[root@sh ~]# ps -ef | grep -i tns
root        36     2  0 Jan26 ?        00:00:00 [netns]
root     14995 14824  0 15:30 pts/1    00:00:00 grep -i tns

-- 查看监听状态,报错; TNS-01189

[oracle@sh ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 06-FEB-2017 15:57:39

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=wh)(PORT=1521)))

TNS-01189: The listener could not authenticate the user

-- 这个问题基本2个原因导致,

1,  /etc/hosts 文件中的 ip和主机名不一致

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

listener.ora的位置在:/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin 目录

通过检查, 是 listener.ora  监听主机填写错误错误

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = sh)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

修改为当前主机名后,重启监听恢复正常.