Java中对ipv6套接字的权限被拒绝 [英] Permission denied on ipv6 Socket in Java
问题描述
我在ipv6连接上有一个奇怪的问题.
I have a strange problem on ipv6 connection.
我用Java写下了一个简单的客户端服务器,它在ipv4中运行良好,但是当我尝试将其与ipv6地址一起使用时,会收到一个 "java.net.SocketException:权限被拒绝".
I write down a simple client server in Java, it works perfectly in ipv4 but when I try to use it with an Ipv6 address I receive a "java.net.SocketException: Permission denied".
如果我尝试在同一台计算机的客户端和服务器上运行,那么它也可以与ipv4和ipv6一起使用,因此我认为这是操作系统.问题.
If I try to run on the same machine client and server it works with ipv4 and ipv6 as well so i think that is a O.S. problem.
一些信息:
Ping6在机器之间工作 iptables已停止 O.s.是RedHat 6.2
Ping6 works between machines Iptables is stopped O.s. is RedHat 6.2
有什么想法吗? 谢谢
安东尼奥
推荐答案
我发现了问题.在RHEL上,有两个默认运行的防火墙.我只是关闭了IPv6 iptables.
I found the problem. There are two firewalls running as default on RHEL. I simply shutted down the IPv6 iptables.
服务ip6tables停止
这篇关于Java中对ipv6套接字的权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!