java.net.BindException: bind failed: EADDRINUSE (Address already in use)
来源:互联网 发布:卖les衣服的淘宝商城 编辑:程序博客网 时间:2024/05/22 07:03
http://blog.csdn.net/joyce_qin_1986/article/details/8296047
E/NMPWIFI ( 1189): java.net.BindException: bind failed: EADDRINUSE (Address already in use)
W/System.err( 1189): java.net.BindException: bind failed: EADDRINUSE (Address already in use)
W/System.err( 1189): at libcore.io.IoBridge.bind(IoBridge.java:89)
W/System.err( 1189): at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:68)
W/System.err( 1189): at java.net.DatagramSocket.createSocket(DatagramSocket.java:133)
W/System.err( 1189): at java.net.DatagramSocket.<init>(DatagramSocket.java:78)
W/System.err( 1189): at com.nmp.nmpdmc.NMPWIFI$ReceiveUdp.run(NMPWIFI.java:276)
W/System.err( 1189): Caused by: libcore.io.ErrnoException: bind failed: EADDRINUSE (Address already in use)
W/System.err( 1189): at libcore.io.Posix.bind(Native Method)
W/System.err( 1189): at libcore.io.ForwardingOs.bind(ForwardingOs.java:39)
W/System.err( 1189): at libcore.io.IoBridge.bind(IoBridge.java:87)
W/System.err( 1189): ... 4 more
解决方法:
将:udpSocket = new DatagramSocket(DEFAULT_PORT );
改为:
if(udpSocket==null){
udpSocket = new DatagramSocket(null);
udpSocket.setReuseAddress(true);
udpSocket.bind(new InetSocketAddress(DEFAULT_PORT));
}
- java.net.BindException: bind failed: EADDRINUSE (Address already in use)
- java.net.BindException: bind failed: EADDRINUSE (Address already in use)
- java.net.BindException: bind failed: EADDRINUSE (Address already in use)
- java.net.BindException: bind failed: EADDRINUSE (Address already in use)
- java.net.BindException: bind failed: EADDRINUSE (Address already in use)解决办法
- Android 关于java.net.BindException: bind failed: EADDRINUSE (Address already in use)
- android java.net.BindException: bind failed: EADDRINUSE (Address already in use)
- {已经解决}android java.net.BindException: bind failed: EADDRINUSE (Address already in use)
- java.net.BindException: Address already in use (Bind failed)
- java.net.BindException: Address already in use: Cannot bind
- java.net.BindException: Address already in use: bind
- java.net.BindException: Address already in use: bind
- Caused by: java.net.BindException: Address already in use: bind
- java.net.BindException: Address already in use: bind
- Netty报java.net.BindException: Address already in use: bind
- java.net.BindException: Address already in use
- Tomcat启动时报java.net.BindException:Address already in use:JVM Bind:8443错误的解决方法
- 端口占有解决办法 java.net.BindException: Address already in use: bind
- android dumpsys 使用
- 文章标题
- Java学习笔记——两个变量值的三种替换方法
- ExpandableListView的基本用法
- 百度地图调用报230错误
- java.net.BindException: bind failed: EADDRINUSE (Address already in use)
- 访问他人mysql不成功,提示error 1045,@ip拒绝访问
- 通过tsm 接口调用rman备份oracle脚本
- 泛函编程(6)-数据结构-List基础
- android:versionCode和android:versionName 用途
- 安卓第11记,创建超级链接的方法
- How to Registe A Twitter Account
- 美国军方军用软件剖析
- 钽电容封装