Io 异常: The Network Adapter could not establish the connection
来源:互联网 发布:midascft是什么软件 编辑:程序博客网 时间:2024/04/26 05:26
解决步骤:
1、一般此类异常是连接的url配置有误,确认是否有误?
我的配置:jdbc:oracle:thin:@localhost:1521:orcl
2、检查oracle监听服务是否启动(在windows服务或DOS下都可查看)
3、确认监听终端IP及端口是否正确(DOS下查看)
C:\Documents and Settings\Administrator>cd \
C:\>lsnrctl
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-11月-2010 10:3
1:26
Copyright (c) 1991, 2005, Oracle. All rights reserved.
欢迎来到LSNRCTL, 请键入"help"以获得信息。
LSNRCTL> status
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
LISTENER 的 STATUS
------------------------
别名 LISTENER
版本 TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
启动日期 06-11月-2010 10:10:18
正常运行时间 0 天 0 小时 21 分 15 秒
跟踪级别 off
安全性 ON: Local OS Authentication
SNMP OFF
监听程序参数文件 D:\oracle\product\10.2.0\db_1\network\admin\listener.o
ra
监听程序日志文件 D:\oracle\product\10.2.0\db_1\network\log\listener.log
监听端点概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.2)(PORT=1521)))
服务摘要..
服务 "PL***tProc" 包含 1 个例程。
例程 "PL***tProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
服务 "orcl" 包含 1 个例程。
例程 "orcl", 状态 READY, 包含此服务的 1 个处理程序...
服务 "orclXDB" 包含 1 个例程。
例程 "orcl", 状态 READY, 包含此服务的 1 个处理程序...
服务 "orcl_XPT" 包含 1 个例程。
例程 "orcl", 状态 READY, 包含此服务的 1 个处理程序...
命令执行成功
--- 一切正常,可仔细查看,却发现IP为:192.168.0.2,而jdbc连接url为localhost,一般windows操作系统都是将localhost域名解析为127.0.0.1,而本次安装的oracle监听的却是本机的IP? 为什么会如此? 我还没有细查。
不过问题已经找到,将url更改为:jdbc:oracle:thin:@192.168.0.2:1521:orcl
OK,测试,一切正常!
1、一般此类异常是连接的url配置有误,确认是否有误?
我的配置:jdbc:oracle:thin:@localhost:1521:orcl
2、检查oracle监听服务是否启动(在windows服务或DOS下都可查看)
3、确认监听终端IP及端口是否正确(DOS下查看)
C:\Documents and Settings\Administrator>cd \
C:\>lsnrctl
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-11月-2010 10:3
1:26
Copyright (c) 1991, 2005, Oracle. All rights reserved.
欢迎来到LSNRCTL, 请键入"help"以获得信息。
LSNRCTL> status
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
LISTENER 的 STATUS
------------------------
别名 LISTENER
版本 TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
启动日期 06-11月-2010 10:10:18
正常运行时间 0 天 0 小时 21 分 15 秒
跟踪级别 off
安全性 ON: Local OS Authentication
SNMP OFF
监听程序参数文件 D:\oracle\product\10.2.0\db_1\network\admin\listener.o
ra
监听程序日志文件 D:\oracle\product\10.2.0\db_1\network\log\listener.log
监听端点概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.2)(PORT=1521)))
服务摘要..
服务 "PL***tProc" 包含 1 个例程。
例程 "PL***tProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
服务 "orcl" 包含 1 个例程。
例程 "orcl", 状态 READY, 包含此服务的 1 个处理程序...
服务 "orclXDB" 包含 1 个例程。
例程 "orcl", 状态 READY, 包含此服务的 1 个处理程序...
服务 "orcl_XPT" 包含 1 个例程。
例程 "orcl", 状态 READY, 包含此服务的 1 个处理程序...
命令执行成功
--- 一切正常,可仔细查看,却发现IP为:192.168.0.2,而jdbc连接url为localhost,一般windows操作系统都是将localhost域名解析为127.0.0.1,而本次安装的oracle监听的却是本机的IP? 为什么会如此? 我还没有细查。
不过问题已经找到,将url更改为:jdbc:oracle:thin:@192.168.0.2:1521:orcl
OK,测试,一切正常!
阅读全文
0 0
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- Io 异常: The Network Adapter could not establish the connection
- 第3课 03 JS中级课程-事件流-事件冒泡机制-3
- 第3课 04 JS中级课程-事件绑定的第二种形式-4
- 【简记】Operating System—— virtual memory
- C++基础复习
- 学Python写算法系列(一) | 直接插入排序
- Io 异常: The Network Adapter could not establish the connection
- Revit二次开发——读取构件的材料外观信息
- Python Requests库简明使用教程
- 《大唐姻缘传》(李治篇)第三章 顺朕意媚娘进宫 诞龙儿福运连连
- jquery学习之几种过滤选择器
- POJ 3190 Stall Reservations (贪心+优先队列)
- Redis数据结构和内部编码--有序集合(SortedSet)
- 从linux进程的角度看Docker
- OpenCV 图像清晰度评价(相机自动对焦)