yanzhenjie / AndServer

:cherries: Web server and web framework of Android platform.
https://yanzhenjie.com/AndServer
Apache License 2.0
3.74k stars 755 forks source link

bind failed: EADDRNOTAVAIL (Cannot assign requested address) #524

Open binrong opened 11 months ago

binrong commented 11 months ago

java.net.BindException: bind failed: EADDRNOTAVAIL (Cannot assign requested address) at libcore.io.IoBridge.bind(IoBridge.java:103) at java.net.PlainSocketImpl.socketBind(PlainSocketImpl.java:157) at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:427) at java.net.ServerSocket.bind(ServerSocket.java:377) at com.yanzhenjie.andserver.server.ProxyServer$HttpServer.startServer(ProxyServer.java:258) at com.yanzhenjie.andserver.server.ProxyServer$1.run(ProxyServer.java:132) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764) Caused by: android.system.ErrnoException: bind failed: EADDRNOTAVAIL (Cannot assign requested address) at libcore.io.Linux.bind(Native Method) at libcore.io.ForwardingOs.bind(ForwardingOs.java:60) at libcore.io.IoBridge.bind(IoBridge.java:99) ... 8 more 这个报错可以在ProxyServer里面通过ServerListener的onException返回吗