When can I get the "java.net.SocketException: Permission denied:connect" message? And how

Posted 魏大宾

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了When can I get the "java.net.SocketException: Permission denied:connect" message? And how 相关的知识,希望对你有一定的参考价值。

The "java.net.SocketException: Permission denied: connect" exception message may happen when you are working in Application Server or with a client/server environment via VPN connection and you are using Java 7.

The reason is that isCOBOL uses the IPv4 type of sockets and Java 7 brings support for IPv6 sockets on Windows.
So, when you attempt to connect to an IPv4 address then "behind the scenes" it will use an IPv4-mapped IPv6 address.
And if the VPN product doesn't support the IPv6 sockets this exception will happen.

For example, if you want to connect via thin-client and you use any of the following commands:

iscclient -hostname host -port port progname
java com.iscobol.gui.client.Client -hostname host -port port progname

Or if you want to access the Veryant UDBC server started on the server machine and you run the command:

visql -cstring jdbc:veryant:udbc-server-ip:udbc-server-port:database -u user
To solve this problem you have to use the java property java.net.preferIPv4Stack=true
iscclient -J-Djava.net.preferIPv4Stack=true com.iscobol.gui.client.Client -hostname 10.234.10.18 MAIN_PROGR
java -Djava.net.preferIPv4Stack=true com.iscobol.gui.client.Client -hostname 10.234.10.18 MAIN_PROGR
visql -J-Djava.net.preferIPv4Stack=true -cstring jdbc:veryant:10.234.10.18:6789:VERYSAMPLE -u admin

以上是关于When can I get the "java.net.SocketException: Permission denied:connect" message? And how 的主要内容,如果未能解决你的问题,请参考以下文章

Git does not apply deleted files when merging an old branch into the master. How can I tell Git to a

where can I get the idea?

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when I

android webview can‘t get vertx session

The problem: somthing wrong when my computer excute the command "git clone XXXX"

SourceTree - 正在检查源... When cloning a repository, "Checking Source" spins forever