Resolving the "Cannot handle address family" issue when Dnu restore

Source: Internet
Author: User

The previous few days when installing the NuGet package with the Dnu Restore command in mono-based DNX, I encountered an "cannot handle address family" error with the following error details:

Cannot handle address family 61712stacktrace:at <unknown> <0xffffffff> at (wrapper managed-to-native) Syste M.net.dns.gethostbyname_internal (string,string&,string[]&,string[]&) <0xffffffff> at System.Net.Dns.GetHostByName (String) <0x00054> at System.Net.ServicePoint.get_HostEntry () <0x00219> at System.Net.WebConnection.Connect (System.Net.HttpWebRequest) <0x001d4> at System.Net.WebConnection.InitConnection (object) <0x002ea> at system.net.webconnection.<webconnection> M__0 (object) <0x00024> at System.Runtime.Remoting.Messaging.AsyncResult.WaitCallback_Context (object) < 0x00058> at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext, System.threading.contextcallback,object,bool) <0x001c6> at System.Threading.ExecutionContext.Run ( System.threading.executioncontext,system.threading.contextcallback,object,bool) <0x00020> at System.Runtime.Remoting.Messaging.AsyncResUlt.<asyncresult>m__0 (object) <0x00022> at (wrapper Runtime-invoke) <module>.runtime_invoke_void_ _this___object (object,intptr,intptr,intptr) <0xffffffff>native Stacktrace:mono () [0x4a1ce8]/lib/x86_64- linux-gnu/libpthread.so.0 (+0x10340) [0x7f96c8e7e340]/lib/x86_64-linux-gnu/libc.so.6 (gsignal+0x39) [ 0x7f96c8adfcc9]/lib/x86_64-linux-gnu/libc.so.6 (abort+0x148) [0x7f96c8ae30d8]mono () [0x6318c6]mono () [0X6316B3] Mono () [0x631769]mono () [0x62b0b5]mono () [0x57a5e6][0x40bb793e]debug info from gdb:================================= ================================got a SIGABRT while executing native code. This usually Indicatesa fatal error on the Mono runtime or one of the native libraries used by your application.========== =======================================================

After submitting the issue on GitHub, I learned from the reply that this is a bug of mono, someone has submitted this bug to mono, see use "Dns.gethostentry" or "Dns.gethostbyname", Sometim E throw error "Cannot handle address family xxxxx".

There was always a mistake, and I couldn't finish dnu restore. Later, after a period of time to operate again, suddenly good.

Later, encountered several times this problem, all is the mistake, after a period of time is good.

Today again encountered, suddenly think, is not the reason for DNS caching, clear the DNS cache to try.

Service NSCD Restart

After restarting NSCD, the error disappears immediately.

To further confirm that this was really the reason, a method was found to reproduce the problem-delete the ~/.dnx/packages folder and recompile the DNX.

During the DNX compilation process Dnu restore, multiple occurrences of the "Cannot handle address family" issue, each time can be resolved through the service NSCD restart.

Resolving the "Cannot handle address family" issue when Dnu restore

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.