【Oracle 11Gr1監聽報錯 TNS-12542 12560 00512】

 環境:Oracle 11Gr1+Linux Redhat 5

重啓機器後,數據庫監聽啓動報錯如下:

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

經過查看listener,ora 和日誌 都說是地址被佔用

可以用命令查看1521端口是否被程序佔用

netstat -ntulp|grep 1521

結果看到 4078/sshd 進程在佔用1521端口

想起前兩天爲了測試java進程,把1521端口加到sshd裏面的

查看/etc/ssh/sshd_conf

[root@localhost conf]# more /etc/ssh/sshd_config

#       $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $

 

# This is the sshd server system-wide configuration file.  See

# sshd_config(5) for more information.

 

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

 

# The strategy used for options in the default sshd_config shipped with

# OpenSSH is to specify options with their default value where

# possible, but leave them commented.  Uncommented options change a

# default value.

 

Port 22

Port 7088

Port 8088

Port 5222

Port 9880

Port 8091

Port 1521

Port 9080

Port 21

#Protocol 2,1

Protocol 2

#AddressFamily any

#ListenAddress 0.0.0.0

#ListenAddress ::

發現加了很多端口,其中包含1521也被sshd佔用,原先把sshd進程殺了,開監聽可以成功了,但sshd服務被殺了,遠程不了,就把如上文件的除 22 端口,其他都屏蔽了
再開啓監聽和sshd服務,任務完成
 
結論:netstat -ntulp|grep 1521 查看是否有程序進程在佔用 1521端口
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章