Error -99 EADDRNOTAVAIL address not available

原文地址:https://pdf-lib.org/Home/Details/4836

Error -99 EADDRNOTAVAIL address not available

最近项目部署到Ubuntu上的时候报如下错误:

Unable to bind to http://localhost:5000 on the IPv6 loopback interface: 'Error -99 EADDRNOTAVAIL address not available'.


出现问题的原因:

IPV6s回送的时候不可达。


解决问题的方案:

public static void Main(string[] args)
{
    var host = new WebHostBuilder()
        .UseUrls("http://*:5000")
        .UseKestrel()
        .UseContentRoot(Directory.GetCurrentDirectory())
        .UseIISIntegration()
        .UseStartup<Startup>()
        .Build();

    host.Run();
}


2025-12-08 10:48:43.3516|Info|loaded plugin for resource AntiUAV.DevicePlugin.Obstruct14.dll. 2025-12-08 10:48:45.3482|Info|device server initialization finished. (devId:20,devCategory:30203) Unhandled exception. System.Net.Sockets.SocketException (99): Cannot assign requested address at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at System.Net.Sockets.UdpClient..ctor(IPEndPoint localEP) at AntiUAV.DeviceServer.Abstractions.HostService.ServiceImpl.PeerServerUdp.Star() in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer.Abstractions\HostService\ServiceImpl\PeerServerUdp.cs:line 48 at AntiUAV.DevicePlugin.Obstruct14.DeviceHostService.Start() at AntiUAV.DeviceServer.DeviceServerExtension.DevServRun(IServiceProvider provider) in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer.Abstractions\DeviceServerExtension.cs:line 125 at AntiUAV.DeviceServer.Program.Main(String[] args) in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer\Program.cs:line 82 at AntiUAV.DeviceServer.Program.<Main>(String[] args) Aborted (core dumped) 2025-12-08 10:48:58.0611|Info|loaded plugin for resource AntiUAV.DevicePlugin.Obstruct14.dll. 2025-12-08 10:48:59.7031|Info|device server initialization finished. (devId:20,devCategory:30203) Unhandled exception. System.Net.Sockets.SocketException (99): Cannot assign requested address at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at System.Net.Sockets.UdpClient..ctor(IPEndPoint localEP) at AntiUAV.DeviceServer.Abstractions.HostService.ServiceImpl.PeerServerUdp.Star() in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer.Abstractions\HostService\ServiceImpl\PeerServerUdp.cs:line 48 at AntiUAV.DevicePlugin.Obstruct14.DeviceHostService.Start() at AntiUAV.DeviceServer.DeviceServerExtension.DevServRun(IServiceProvider provider) in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer.Abstractions\DeviceServerExtension.cs:line 125 at AntiUAV.DeviceServer.Program.Main(String[] args) in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer\Program.cs:line 82 at AntiUAV.DeviceServer.Program.<Main>(String[] args) Aborted (core dumped) 2025-12-08 10:49:11.4666|Info|loaded plugin for resource AntiUAV.DevicePlugin.Obstruct14.dll. 2025-12-08 10:49:13.1405|Info|device server initialization finished. (devId:20,devCategory:30203) Unhandled exception. System.Net.Sockets.SocketException (99): Cannot assign requested address at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at System.Net.Sockets.UdpClient..ctor(IPEndPoint localEP) at AntiUAV.DeviceServer.Abstractions.HostService.ServiceImpl.PeerServerUdp.Star() in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer.Abstractions\HostService\ServiceImpl\PeerServerUdp.cs:line 48 at AntiUAV.DevicePlugin.Obstruct14.DeviceHostService.Start() at AntiUAV.DeviceServer.DeviceServerExtension.DevServRun(IServiceProvider provider) in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer.Abstractions\DeviceServerExtension.cs:line 125 at AntiUAV.DeviceServer.Program.Main(String[] args) in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer\Program.cs:line 82 at AntiUAV.DeviceServer.Program.<Main>(String[] args) Aborted (core dumped) 2025-12-08 10:49:24.8300|Info|loaded plugin for resource AntiUAV.DevicePlugin.Obstruct14.dll. 2025-12-08 10:49:26.5531|Info|device server initialization finished. (devId:20,devCategory:30203) Unhandled exception. System.Net.Sockets.SocketException (99): Cannot assign requested address at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at System.Net.Sockets.UdpClient..ctor(IPEndPoint localEP) at AntiUAV.DeviceServer.Abstractions.HostService.ServiceImpl.PeerServerUdp.Star() in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer.Abstractions\HostService\ServiceImpl\PeerServerUdp.cs:line 48 at AntiUAV.DevicePlugin.Obstruct14.DeviceHostService.Start() at AntiUAV.DeviceServer.DeviceServerExtension.DevServRun(IServiceProvider provider) in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer.Abstractions\DeviceServerExtension.cs:line 125 at AntiUAV.DeviceServer.Program.Main(String[] args) in G:\anti-uav\Server\AntiUAV.DeviceServer\AntiUAV.DeviceServer\Program.cs:line 82 at AntiUAV.DeviceServer.Program.<Main>(String[] args) Aborted (core dumped)
最新发布
12-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值