TNS-12545: Connect failed because target host or object does not exist
来源:互联网 发布:c语言boolean的用法 编辑:程序博客网 时间:2024/06/02 06:17
TNS-12545: Connect failed because target host or object does not exist
场景:修改了Linux的主机名,重启机器后,启动监听报错
$ lsnrctl startLSNRCTL for Linux: Version 12.1.0.2.0 - Production on 26-JUL-2017 09:53:42
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mengqf)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
。。。。。。
解决:
因只修改了机器的主机名,但host和listener.ora文件并没有修改,因此需要修改host和监听listener.ora
修改host文件
$ vi /etc/hosts
#127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
#::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 localhost mwd
192.168.78.17 meng
修改listener.ora文件
$ vi /u01/app/oracle/product/12.1/db1/network/admin/listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/12.1/db1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = meng)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
重启机器即可
# reboot
如果机器里有tnsnames.ora这个文件的HOST也需要修改,但是这个文件建议使用IP地址。
阅读全文
1 0
- TNS-12545: Connect failed because target host or object does not exist
- ORA-12545: Connect failed because target host or object does not exist
- ORA-12545: Connect failed because target host or object does not exist
- ORA-12545: Connect failed because target host or object does not exist
- Error listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) TNS-12545: Connect failed because tar
- 启动Tomcat报异常host-manager does not exist or is not a readable directory
- 启动Tomcat报异常host-manager does not exist or is not a readable directory
- 启动Tomcat报异常host-manager does not exist or is not a readable directory
- 启动tomcat报host-manager does not exist or is not a readable directory异常
- 启动Tomcat报异常host-manager does not exist or is not a readable directory
- 启动tomcat报host-manager does not exist or is not a readable directory异常
- 启动tomcat报host-manager does not exist or is not a readable directory异常
- 启动Tomcat 时报异常host-manager does not exist or is not a readable directory
- Tomcat 启动报错:host-manager does not exist or is not a readable directory
- 启动Tomcat报异常host-manager does not exist or is not a readable directory
- 启动Tomcat报异常host-manager does not exist or is not a readable directory
- ORA-20011: Approximate NDV failed: ORA-06564: object EXPDDDP does not exist
- One or more layers failed to draw. Spatial index does not exist
- PS
- SpringMVC —— @RequestParam @RequestBody @PathVariable 等参数绑定
- mycat分布式mysql中间件(分片规则)
- C语言阶乘level1.0
- FlowLayout遇到的坑
- TNS-12545: Connect failed because target host or object does not exist
- 4. Median of Two Sorted Arrays 详细解答
- Choosing the Right Cisco Compatible SFP Transceivers for Your Network
- 百练_4045:与3和5无关的数
- getParameter获取整数值
- JAVA、C# DES通用加解密
- MySQL5.7.19Win10免安装配置+登录+问题解决
- 百练_4067:回文数字(Palindrome Number)
- Problem 16 Power digit sum