2017-02-21 58 views
1

首先,我意识到,在Mono上不再支持或测试AspNetCore。Kestrel no Mono错误-14系统调用参数中的EFAULT错误地址

不过,我有一个现有的项目(AspNet 1.0.0-rc1-final),它的目标是net461,我需要将它迁移到AspNetCore 1.1.0。经过几个小时的奋斗之后,我做到了,只为惊讶于它不再使用Mono。

我试着切换到netcoreapp1.1,但在DLL地狱结束np - 许多不受支持的库去它的方式。

我使用泊坞窗使用Mono和附加LibUV安装

FROM debian:wheezy 

MAINTAINER Jo Shields <[email protected]> 

#based on dockerfile by Michael Friis <[email protected]> 

ENV MONO_VERSION 4.6.2.7 

RUN apt-get update \ 
    && apt-get install -y curl \ 
    && rm -rf /var/lib/apt/lists/* 

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF 

RUN echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/$MONO_VERSION main" > /etc/apt/sources.list.d/mono-xamarin.list \ 
    && apt-get update \ 
    && apt-get install -y binutils mono-devel ca-certificates-mono fsharp mono-vbnc nuget referenceassemblies-pcl \ 
    && rm -rf /var/lib/apt/lists/* /tmp/* 


# Install libuv for Kestrel from source code (binary is not in wheezy and one in jessie is still too old) 
# Combining this with the uninstall and purge will save us the space of the build tools in the image 
RUN LIBUV_VERSION=1.9.1 \ 
    && apt-get -qq update \ 
    && apt-get -qqy install autoconf automake build-essential libtool \ 
    && curl -sSL https://github.com/libuv/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \ 
    && cd /usr/local/src/libuv-$LIBUV_VERSION \ 
    && sh autogen.sh && ./configure && make && make install \ 
    && rm -rf /usr/local/src/libuv-$LIBUV_VERSION \ 
    && ldconfig \ 
    && apt-get -y purge autoconf automake build-essential libtool \ 
    && apt-get -y autoremove \ 
    && apt-get -y clean \ 
    && rm -rf /var/lib/apt/lists/* 

每个HTTP请求到我的应用程序会导致错误的红隼:

info: Microsoft.AspNetCore.Server.Kestrel[14] 
     Connection id "0HL2PMPE1RGS7" communication error. 
Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -14 EFAULT bad address in system call argument 
info: Microsoft.AspNetCore.Server.Kestrel[20] 
     Connection id "0HL2PMPE1RGS7" request processing ended abnormally. 
System.IO.IOException: Error -14 EFAULT bad address in system call argument ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -14 
EFAULT bad address in system call argument 
    --- End of inner exception stack trace --- 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketInput.CheckConnectionError() [0x00020] in <43555eec0dc34d2abb4f01227fa5a2e9>:0 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketInput.GetResult() [0x00013] in <43555eec0dc34d2abb4f01227fa5a2e9>:0 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1+<RequestProcessingAsync>d__2[TContext].MoveNext() [0x00194] in <43555eec0dc34d2abb4f01227fa5a2e9 
>:0 
info: Microsoft.AspNetCore.Server.Kestrel[14] 
     Connection id "0HL2PMPE1RGS8" communication error. 
Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -14 EFAULT bad address in system call argument 
info: Microsoft.AspNetCore.Server.Kestrel[20] 
     Connection id "0HL2PMPE1RGS8" request processing ended abnormally. 
System.IO.IOException: Error -14 EFAULT bad address in system call argument ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -14 
EFAULT bad address in system call argument 
    --- End of inner exception stack trace --- 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketInput.CheckConnectionError() [0x00020] in <43555eec0dc34d2abb4f01227fa5a2e9>:0 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketInput.GetResult() [0x00013] in <43555eec0dc34d2abb4f01227fa5a2e9>:0 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1+<RequestProcessingAsync>d__2[TContext].MoveNext() [0x00194] in <43555eec0dc34d2abb4f01227fa5a2e9 
>:0 
info: Microsoft.AspNetCore.Server.Kestrel[14] 
     Connection id "0HL2PMPE1RGS9" communication error. 
Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -14 EFAULT bad address in system call argument 
info: Microsoft.AspNetCore.Server.Kestrel[20] 
     Connection id "0HL2PMPE1RGS9" request processing ended abnormally. 
System.IO.IOException: Error -14 EFAULT bad address in system call argument ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -14 
EFAULT bad address in system call argument 
    --- End of inner exception stack trace --- 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketInput.CheckConnectionError() [0x00020] in <43555eec0dc34d2abb4f01227fa5a2e9>:0 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketInput.GetResult() [0x00013] in <43555eec0dc34d2abb4f01227fa5a2e9>:0 
    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Frame`1+<RequestProcessingAsync>d__2[TContext].MoveNext() [0x00194] in <43555eec0dc34d2abb4f01227fa5a2e9 
>:0 

没有人设法在做AspNetCore 1.1版运行单?任何帮助赞赏。

+0

https://github.com/aspnet/Mvc/issues/5088 – stuartd

+0

@stuartd您的意思是'techcap评论于2016年8月5日'(创建符号链接)的评论?如果是这样,它什么都没变。 :( – gisek

+0

我有同样的问题,你有解决它吗? – Alex

回答

0

我的临时解决方案:

  1. 降级Microsoft.AspNetCore.Server.Kestrel至1.0.3
  2. 从输出删除System.Runtime.InteropServices.RuntimeInformation.dll(因为DOTNET的/ corefx#9012)
  3. 降级Microsoft.Extensions.Logging.Console到1.0.2(因为1.1.1拒绝使用System.Runtime.InteropServices.RuntimeInformation.dll从单声道,但是1.0.2 - 不)
  4. 它的工作原理!