java 网络适配器无法建立连接DSRA0010E: SQL State = null, Error Code = 17,002″
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27394587/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The Network Adapter could not establish the connectionDSRA0010E: SQL State = null, Error Code = 17,002″
提问by Saurabh Gupta
I am facing below issue. 1- I have data source on my local websphere6.1 and when i do test connection from web console server ,it was successful but when i tried to do the same from my application code it giving me error
我面临以下问题。1- 我的本地 websphere6.1 上有数据源,当我从 Web 控制台服务器测试连接时,它成功了,但是当我尝试从我的应用程序代码中执行相同操作时,它给了我错误
java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionDSRA0010E: SQL State = null, Error Code = 17,002
Note : I am connecting to remote oracle db in my machine , I have only raid,toad & web sphere installed.
注意:我在我的机器上连接到远程 oracle db,我只安装了 raid、toad 和 web sphere。
I have already tried following things but issue is yet not resolved.
我已经尝试过以下事情,但问题尚未解决。
- Replace my server names with the ip addresses.
- Change minimum connection setting from web sphere server configuration
- The same configuration is running to my other colleague but issue is occurring only on my laptop.
- 用 IP 地址替换我的服务器名称。
- 从 Web Sphere 服务器配置更改最小连接设置
- 我的其他同事正在运行相同的配置,但问题仅出现在我的笔记本电脑上。
Please any body help me. Advance thank you
请任何机构帮助我。提前谢谢
回答by Mustafa sabir
Some things you can try, seeing your error:-
你可以尝试一些事情,看到你的错误:-
-> Verify that oracledb is started, also verify the port db is listening on is correct.
-> 验证 oracledb 是否已启动,同时验证 db 正在侦听的端口是否正确。
-> If you have firewall in between and you can disable it, disable it and try. Or else try adding the WAS ports in authorized lists of firewall.
-> 如果中间有防火墙并且可以禁用它,请禁用它并尝试。或者尝试在防火墙的授权列表中添加 WAS 端口。
回答by Saurabh Gupta
After lot of searching and did lots of trick , i resolved this issue and this solution is Formatting my machine. Some time there might be issue with network adapter due to this it create problem . I have tried below thing before formatting my machine. 1- Disable my symantic anti-virus but not work. 2- Adding oracle db ip in antivirus configuration and allow all traffic. 3-Tried to change from server admin console by changing (min connection ,max connection , componenet managed authentication 4- Finally ,un-install RAID/websphere . Still again problem persist. I have spent lot of time and do Much R&D but finally solution come by formatting my laptop.
经过大量搜索并做了很多技巧,我解决了这个问题,这个解决方案是格式化我的机器。有时网络适配器可能会出现问题,因为它会产生问题。在格式化我的机器之前,我已经尝试过下面的事情。1-禁用我的symantic防病毒但不起作用。2- 在防病毒配置中添加 oracle db ip 并允许所有流量。3-尝试通过更改(最小连接、最大连接、组件管理的身份验证)从服务器管理控制台进行更改 4-最后,卸载 RAID/websphere。问题仍然存在。我花了很多时间,做了很多研发,但最终解决了来格式化我的笔记本电脑。
回答by Gianluigi Marotta
I resolved the issue after that I've changed the database port that I used to connect at the bd. Check on whitch port your db has been started.
在我更改了用于在 bd 上连接的数据库端口之后,我解决了这个问题。检查您的数据库已启动的哪个端口。
You can check the official IBM developer network issue at: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014687717
您可以查看官方 IBM 开发者网络问题:https: //www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014687717
Regards.
问候。
回答by piyush jain
Please change the JVM argument through the WAS Admin console while connecting the JNDI connection. Below is value :
请在连接 JNDI 连接时通过 WAS 管理控制台更改 JVM 参数。以下是价值:
-Djava.net.preferIPv4Stack=true
Path to set JVM:
设置JVM的路径:
- Go to the server and select Websphere application server and select server name like server1
- Select Java and Process Management at the right side
- Select Process definition
- Select Java Virtual Machine
- 转到服务器并选择 Websphere 应用程序服务器并选择服务器名称,如 server1
- 在右侧选择 Java 和进程管理
- 选择流程定义
- 选择 Java 虚拟机
Enter above value (-Djava.net.preferIPv4Stack=true
) in Generic JVM arguments and Save it and restart the server.
-Djava.net.preferIPv4Stack=true
在 Generic JVM arguments 中输入上述值 ( ) 并保存并重新启动服务器。
It resolved my problem!
它解决了我的问题!