亚洲欧洲视频,三男玩一女摸吃奶,久久久久久久片,精品中文一区二区三区,美女在线国产,国产有码视频,亚洲激情五月

威勢網(wǎng)絡(luò),為您的企業(yè)和團(tuán)隊注入互聯(lián)網(wǎng)活力!
服務(wù)熱線:138-9741-0341

[原創(chuàng)] Unhandled exception. System.Net.Sockets.SocketException (13): Permission denied 原因

發(fā)布日期:2022/8/27 作者: 瀏覽:876

將項目部署到ubuntu上面以后,運(yùn)行,竟然報錯:

ubuntu@VM-4-11-ubuntu:~/publish$ uname -a
Linux VM-4-11-ubuntu 5.4.0-121-generic #137-Ubuntu SMP Wed Jun 15 13:33:07 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@VM-4-11-ubuntu:~/publish$ 

ubuntu@VM-4-11-ubuntu:~/publish$ ./qhxyhs

==================西寧威勢電子提供此程序==================

8/27/2022 7:07:25 PM:   數(shù)據(jù)庫初始化專題數(shù)量1條
8/27/2022 7:07:26 PM:   數(shù)據(jù)庫初始化頻道數(shù)量5條
8/27/2022 7:07:26 PM:   數(shù)據(jù)庫初始化系統(tǒng)權(quán)限模塊數(shù)量47條
8/27/2022 7:07:26 PM:   數(shù)據(jù)庫初始化系統(tǒng)用戶數(shù)量3條
8/27/2022 7:07:26 PM:   數(shù)據(jù)庫初始化用戶角色數(shù)量3條
8/27/2022 7:07:26 PM:   數(shù)據(jù)庫初始化API商家演示接口數(shù)量5條
8/27/2022 7:07:26 PM:   數(shù)據(jù)庫初始化頻道單頁面數(shù)量3條
8/27/2022 7:07:26 PM:   數(shù)據(jù)庫初始化頻道新聞頁面5條
8/27/2022 7:07:26 PM:   數(shù)據(jù)庫初始化完成.

Unhandled exception. System.Net.Sockets.SocketException (13): Permission denied
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError , String )
   at System.Net.Sockets.Socket.DoBind(EndPoint , SocketAddress )
   at System.Net.Sockets.Socket.Bind(EndPoint )
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken )
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost , CancellationToken )
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost , CancellationToken )
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost )
   at WinsMVC.Program.Main(String[] args) in X:\WEB\Program.cs:line 41
Aborted (core dumped)


看提示,應(yīng)該是權(quán)限拒絕引起的。在lunchSetting.json中有如下定義:

"applicationUrl": "https://www.xxx.com;http://www.xxx.com;",  

奇怪的是,將https協(xié)議剔除以后再次部署運(yùn)行,程序又可以正常啟動,但是端口被綁定到5000上面去了。于是在startup.cs中強(qiáng)行綁定端口試試:

webBuilder.UseKestrel() .UseUrls($"http://"+System.Net.IPAddress.Any+":80") .UseStartup<Startup>();

但是還是報同樣的錯。后來經(jīng)過一凡查閱資料與測試,發(fā)現(xiàn)綁定低端端口的時候就會報錯,將端口改為3389后再運(yùn)行,發(fā)現(xiàn)代碼又可以正常運(yùn)行了,高端口( >1024)沒有問題??磥泶_實是權(quán)限原因引起的,如果是root權(quán)限,應(yīng)該是沒問題的,條件不成熟,沒有測試。

這些是查閱到的資料


PROBLEM: Rancher reported "unable to start kestrel" and Access Denied
REASON: This happen because port 80 is low port and need adminstrator permissions
SOLUTION: Use port 8080


下拉加載更多評論
最新評論
暫無!