2017-07-25 87 views
0

我真的面对奇怪的行为,当我尝试运行在Linux操作系统我泊坞窗图像 - 图像中包含的.Net核心Web API项目运行码头工人形象造成隼异常

这里是我的Program.cs

var host = new WebHostBuilder() 
.UseKestrel().UseStartup<Startup>().Build(); 
host.Run(); 

我的码头工人,compose.yml文件

version: '2' 
services: 
server: 
    image: repo.testCompany.com:1443/testCompany:6 
    ports: 
    - "60000:60000" 
    hostname: ucp.${HOST_HOSTNAME} 
    restart: unless-stopped 

的形象是建立和推动successfully.The问题就来当Web API的尝试运行容器内的项目,并且运行时异常为t hrown -

Unhandled Exception: System.AggregateException: One or more errors occurred. 
(Error -99 EADDRNOTAVAIL address not available) ---> 
Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error 
-99 EADDRNOTAVAIL address not available 
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.Check(Int32 
statusCode) 
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags) 
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address) 
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket() 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.<>c.<StartAsync>b__6_0(Object state) 
--- End of inner exception stack trace --- 
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) 
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) 
at System.Threading.Tasks.Task.Wait() 
at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelEngine.CreateServer(ServerAddress address) 
    at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[TContext](IHttpApplication`1 application) 
at Microsoft.AspNetCore.Hosting.Internal.WebHost.Start() 
at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host, CancellationToken token, String shutdownMessage) 
at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host) 
at Exactor.XeroConnector.API.Program.Main(String[] args) 

的主要问题是,错误不会重现我的本地机器上,但只有当图像是建立并通过詹金斯上传。 你能请别人提出建议吗。

+0

何你指定的主机和端口,在您的应用程序正在运行? –

+0

我试图添加 .UseUrls(“http:// *:60000”) 但错误仍然相同。 – NDym

回答

0

TNX寻找答案的问题是,不知何故詹金斯没有发布最新的图像....

相关问题