TNS-12545: Connect failed because target host or object does not exist
问题描述
$ lsnrctl start
LSNRCTL 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)))
。。。。。。
解决方案
主机名称:/etc/sysconfig/network
因只修改了机器的主机名,但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地址。
TNS-12545: Connect failed because target host or object does not exist的更多相关文章
- ORA-12545:Connect failed beacuse target host or object does not exist
更换计算机名,重新启动系统后 oracle 的监听器就无法正常启动, 总是提示ORA-12545:Connect failed beacuse target host or object does n ...
- ORA-12545: Connect failed because target host or object does not exist
[oracle@ybdbtest oradata]$ sqlplus /nolog SQL*Plus: Release 9.2.0.4.0 - Production on Thu Jun 26 10: ...
- connect() failed (111: Connection refused) while connecting to upstream
配置好lamp后,在浏览器中运行程序后,出现上面的错误. 转自:http://www.xuejiehome.com/blread-1828.html I'm experiencing 502 gate ...
- MSBuild could not create or connect to a task host with runtime "CLR2" and architecture "x86".
vs2010 and vs2012 are installed on target machine. Build c# project using vs2010, following error oc ...
- JedisConnectionException: Failed connecting to host localhost:6379
报错原因:没有启动服务,打开服务即可 redis.clients.jedis.exceptions.JedisConnectionException: Exception at redis.clien ...
- nginx 解决 connect() failed (111: Connection refused) while connecting to upstream,
嗯哼,刚装了个ubuntu的lnmp,我的天啊,踩的坑比我脂肪还多了 比如刚装完的时候访问显示502, 也不知道什么问题,就去看了一下nginx日志 /var/log/nginx/error.log ...
- [nginx] connect() failed (111: Connection refused) while connecting to upstream, client: 101.18.123.107, server: localhost,
nginx一直报错, 2016/12/02 10:23:19 [error] 1472#0: *31 connect() failed (111: Connection refused)while c ...
- org.apache.http.ProtocolException: Target host is not specified
对于httpClient4.3访问指定页面,可以从下面的demo抽取方法使用. 注意:对于URL必须使用 http://开始,否则会有如下报错信息: Caused by: org.apache.htt ...
- Target host is not specified错误
对于httpClient4.3访问指定页面,可以从下面的demo抽取方法使用. 注意:对于URL必须使用 http://开始,否则会有如下报错信息: 或者在设置cookie时带上domain: coo ...
随机推荐
- mysql 连接查询 转换group_concat, find_in_set
1.a表 2.b表 3.连接(a_u_id 对应b表的b_id) select a.a_id,a.a_u_id,group_concat(b.b_name) from a_tb a left join ...
- Picture POJ - 1177 线段树+离散化+扫描线 求交叉图像周长
参考 https://www.cnblogs.com/null00/archive/2012/04/22/2464876.html #include <stdio.h> #include ...
- 二维数组 A[m][n] 按行优先和按列优先的 下标地址转换公式
设二维数组 A[m][n] 按行优先存储, 每个元素占 p 个字节, 则 Loc(i, j) 的地址为 (i * n + m) * p, 第 i 行前面有 i 行, 每行有 n 个元素, 加上 第 i ...
- PHP0009:PHP基础-mysql
以管理员省份启动记事本 修改host文件 插入外部sql数据
- 拦截器——原理(AOP、责任链模式、配置)
1.Struts2拦截器概述: (1)Struts2框架封装中封装了很多功能,这些功能其实都是封装在Struts2的拦截器里面,Struts2里面有很多拦截器,每次不是这些拦截器都执行,每次只执行默认 ...
- 聊聊智能指针 auto_ptr、shared_ptr、weak_ptr和unique_ptr
本文为转载:https://www.cnblogs.com/zeppelin5/p/10083597.html,对作者有些地方做了修正. 手写代码是理解C++的最好办法,以几个例子说明C++四个智能指 ...
- 【卸载Pycharm】
一.卸载软件及安装目录 1. 控制面板中卸载 二.删除注册表信息 1. 备份注册表信息 2. 删除注册表信息
- Codeforces Round #622 (Div. 2).C2 - Skyscrapers (hard version)
第二次写题解,请多多指教! http://codeforces.com/contest/1313/problem/C2 题目链接 不同于简单版本的暴力法,这个数据范围扩充到了五十万.所以考虑用单调栈的 ...
- cmdb实现三种方式
为什么要做CMDB? 1.实现运维自动化,CMDB是实现运维自动化的基石 2.之前做资产统计的时候,使用execl来统计,为了年底资产审计方便 3.运维日常工作繁琐, 4.运行环境不统一 Agent方 ...
- [Python]pyhon去除txt文件重复行 python 2020.2.10
代码如下: import shutil readPath='E:/word4.txt' #要处理的文件 writePath='E:/word5.txt' #要写入的文件 lines_seen=set( ...