错误
刚装了一个数据库,启动lsnrctl 报错:
[oracle@server1 ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-MAY-2019 07:34:15
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /u01/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
诊断
尝试使用tnslsnr确认
[oracle@server1 admin]$ tnslsnr
Unable to resolve address for localhost:6100
ONS runtime exiting
查看/ect/hosts 文件
[oracle@server1 admin]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 server1.oracle.com server1 ★
::1 localhost6.localdomain6 localhost6
192.168.56.11 server1.oracle.com server1
192.168.56.12 server2.oracle.com server2
解决
原来是在修改/ect/hosts 文件时把127.0.0.1这一行给改错了。
[oracle@server1 admin]$ su - root
Password:
[root@server1 ~]# vi /etc/hosts
[root@server1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.56.11 server1.oracle.com server1
192.168.56.12 server2.oracle.com server2
再次启动成功。
[oracle@server1 admin]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-MAY-2019 07:44:40
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /u01/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /u01/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/oracle/diag/tnslsnr/server1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=server1.oracle.com)(PORT=1521)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 26-MAY-2019 07:44:40
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/oracle/diag/tnslsnr/server1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=server1.oracle.com)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@server1 admin]$
版权声明:本文为博主原创文章,转载必须注明出处,本人保留一切相关权力!http://blog.csdn.net/lukeunique
欢迎关注微信订阅号:TeacherWhat
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/141610.html