Oracle 11Gr1监听报错TNS-12542 12560 00512

62 篇文章 0 订阅
42 篇文章 0 订阅
环境: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端口
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值