Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Error -32 EPIPE broken pipe #1978

Closed
wdmeest opened this issue Aug 2, 2017 · 2 comments
Closed

Error -32 EPIPE broken pipe #1978

wdmeest opened this issue Aug 2, 2017 · 2 comments

Comments

@wdmeest
Copy link

wdmeest commented Aug 2, 2017

I am doing a post request with ajax that should return a partialview but I always get following error in log:

Connection id "0HL6PHMI6GKUP" communication error.
Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -32 EPIPE broken pipe

When looking at the debug log, I see that it is loading the partialview data but than I get the error.

I can't find anything on the net about the -32 EPIPE error, could someone help me explain what this error means?

Ajax call

$( "#PostForm" ).submit(function( event ) {

    //Ajax call
    $.ajax({
        type: 'POST',
        url: "/url/path/", 
        data: {
            "id": $("#RackId").val(),
            "Name": $("#Name").val()
        },
        success: function(result){
            $("#modal").html(result);
        }
    });
});

Application info

Aspnet core: 1.1.0
OS: ubuntu 16.04

project.json

{
"dependencies": {
 "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
 "Microsoft.Extensions.Configuration.Json": "1.1.0",
 "Microsoft.Extensions.Configuration.CommandLine": "1.1.0",
 "Microsoft.Extensions.Configuration.UserSecrets": "1.1.0",
 "Microsoft.AspNetCore.Mvc": "1.1.0",
 "Microsoft.AspNetCore.Routing": "1.1.0",
 "Microsoft.AspNetCore.Localization": "1.1.0",
 "Microsoft.Extensions.Localization": "1.1.0",
 "Microsoft.AspNetCore.Authentication.Cookies": "1.1.0",
 "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
 "Microsoft.AspNetCore.StaticFiles": "1.1.0",
 "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.0",
 "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
 "Microsoft.EntityFrameworkCore": "1.1.0",
 "Microsoft.EntityFrameworkCore.Design": "1.1.0",
 "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
 "Npgsql.EntityFrameworkCore.PostgreSQL": "1.1.0",
 "Npgsql.EntityFrameworkCore.PostgreSQL.Design": "1.1.0",
 "Microsoft.Extensions.Logging.Debug": "1.1.0",
 "Microsoft.Extensions.Logging": "1.1.0",
 "Microsoft.Extensions.Logging.Console": "1.1.0",
 "Microsoft.AspNetCore.Diagnostics": "1.1.0",
 "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
 "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
 "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
 "Microsoft.AspNetCore.Hosting": "1.1.0",
 "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
 "Microsoft.AspNetCore.Rewrite": "1.0.2",
 "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0",
 "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
   "version": "1.1.0-preview4-final",
   "type": "build"
 },
 "Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
   "version": "1.1.0-preview4-final",
   "type": "build"
 },
 "JsonApiFramework.Core": "1.1.3-beta",
 "JsonApiFramework.Server": "1.1.3-beta",
 "Microsoft.AspNetCore.Authentication.JwtBearer": "1.1.0",
 "MailKit": "1.10.1",
 "System.IdentityModel.Tokens.Jwt": "5.1.2",
 "Microsoft.IdentityModel.Tokens": "5.1.2",
 "Markdown": "2.2.0",
 "LinqKit.Core": "1.1.8",
 "Newtonsoft.Json": "9.0.2-beta2",
 "Microsoft.AspNetCore.Session": "1.1.0",
 "Microsoft.Extensions.Caching.Memory": "1.1.0",
 "morelinq": "2.3.0",
 "NLog": "5.0.0-beta07",
 "NLog.Web.AspNetCore": "4.3.1",
 "NLog.Extensions.Logging": "1.0.0-rtm-beta3"
},
"tools": {
 "BundlerMinifier.Core": "2.2.306",
 "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final",
 "Microsoft.Extensions.SecretManager.Tools": "1.1.0-preview4-final",
 "Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
   "version": "1.1.0-preview4-final",
   "imports": [
     "portable-net45+win8"
   ]
 }
},
"frameworks": {
 "netcoreapp1.1": {
   "dependencies": {
     "Microsoft.NETCore.App": {
       "version": "1.1.0",
       "type": "platform"
     }
   },
   "imports": [
     "dotnet5.6",
     "portable-net45+win8"
   ]
 }
},
"buildOptions": {
 "emitEntryPoint": true,
 "preserveCompilationContext": true,
 "debugType": "portable"
},
"runtimeOptions": {
 "configProperties": {
   "System.GC.Server": true
 }
},
"publishOptions": {
 "include": [
   "wwwroot",
   "**/*.cshtml",
   "appsettings.json",
   "web.config",
   "Dockerfile.debug",
   "Dockerfile",
   "docker-compose.debug.yml",
   "docker-compose.yml",
   "nlog.config"
 ]
},
"scripts": {
 "precompile": [
   "dotnet bundle"
 ],
 "prepublish": [
   "bower install"
 ],
 "postpublish": [
   "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
 ]
},
"tooling": {
 "defaultNamespace": "application"
}
}
@halter73
Copy link
Member

halter73 commented Aug 3, 2017

The "communication error" usually comes in ECONNRESET, EPIPE, and ECANCELED varieties. Which one you get usually just depends on which platform you're running on, but all three generally mean the same thing: that the client closed the connection ungracefully.

I have a theory why this is happening. I think that the page might be getting reloaded mid-xhr causing the xhr to get aborted. This can be fixed by returning false from your jQuery submit callback.

I took all your dependencies and your jQuery snippet and demonstrated how this page reload can cause an EPIPE on linux and an ECANCELED on Windows in a sample repro at https://github.com/halter73/EPIPE. It uses csproj instead of project.json because I don't have an old CLI that supports project.json easily available.

Here's where I included your JavaScript snippet.

@wdmeest
Copy link
Author

wdmeest commented Aug 3, 2017

return false seems to work!

Thank you very much for your help and the information! ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants