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

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值