New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"An existing connection was forcibly closed by the remote host." error is presented when launching any WSL 2 distro #4105
Comments
Me too. Same build 18917 and Debian, I converted it to Wsl version 2 but the Appx can't run after this convertion... Then I returned to Wsl version 1. The issue can be the ext4.vhdx disk image that can't be open from Appx (Debian or Ubuntu) with Wsl2, before the linux files could be open via explorer with Wsl1. Windows Insider forum : https://answers.microsoft.com/en-us/insider/forum/all/an-existing-connection-was-forcibly-closed-by-the-remote-host |
Thanks for filing. From the trace it looks like your instance is being terminated during creation. Does the following command work? If so can you give me the output? When you're in this state, can you look in task manager and see if there is a vmmem process running? wsl.exe -u root -e dmesg Thanks! |
That command doesn't work; I'm still getting the original |
Great thank you. It looks like the utility VM is still alive, it's the distro itself that is running into an issue. I'll dig into this a bit today. |
Would it be possible for somebody hitting the "An existing connection was forcibly closed by the remote host" issue to export your distribution and share the tar file? This will contain your entire root file system so if there is private information please send it to secure@microsoft.com.
|
Can be with WSL 1 actived or must be only wsl2 ? I can run "wsl.exe --export DistroName FileName.tar" with my Debian in WSL1 ? and Then send to you |
I think he wants it in WSL2 format. |
Then only the ext4.Vhdx image converted (after change to WSL2) would be need |
Idk about you, but I'm experiencing it on a plain clean downloaded Ubuntu and Debian (and Kali) WSL instance so I'm not sure why it's needed at all. |
I understood. Only problem with wsl2 is that it create a disk image and the Appx (Debian or Ubuntu) can't run |
If it helps, I don't think other optional features are interfering as I spent 15 mins switching between to see and no change. It's not due to other Hyper-V either. |
Me too. I tried enable & disable Hyper-V feature with Virtual Machine Platform enabled but This disk image "ext4.vhdx" Can't be Mounted |
wsl --export creates a tar regardless if the distro is WSL1 or WSL2. What I suspect is there's something in the root file system that /init does not like. The VM looks like it's being created and the distro is able to be converted, but launching the distro fails. |
Hello I sent you my distribution tarballs to secure@microsoft.com |
@steven-peralta - Awesome, thank you very much. Hopefully I am able to reproduce, if not I may need to add some more diagnostics... |
I can't email my distro tarball because it's 600+MB Also why can't we see the VM in Hyper-V Manager? |
Hello I sent you my distribution tarballs to secure@microsoft.com |
Use mega.nz or something similar. It’s not a traditional VM and it’s using a different platform (Virtual Machine Platform) which is the third? platform for Hyper-V virtualisation in Windows as you can see in Control Panel > Programs > Manage Optional Features. The other two are default Hyper-V (the one you see in the manager) and Hypervisor Platform (Android emulator uses this but doesn’t appear in manager too). |
The problem is that the Appx (Ubuntu or Debian) can't open this new VM (image disk ext4.vhdx) because the App was built to execute the root files with NT filesystem more users with similar issues : https://github.com/microsoft/WSL/issues maybe would be good to suspend the release of wsl2 for this moment |
Is there any solutions? |
Not that I've seen. Stay subscribed so as to not miss words of wisdom…
…On Sat, Jun 15, 2019 at 10:44 PM 天命剑主 ***@***.***> wrote:
Is there any solutions?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4105?email_source=notifications&email_token=AAHE7PQIVDLP4C5Q27IVMA3P2XALTA5CNFSM4HXVMHE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXZFCKI#issuecomment-502419753>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHE7PWUSX5XGOY7JXSQ553P2XALTANCNFSM4HXVMHEQ>
.
|
This sucks. I was really looking forward to WSL2 and now I can't even use it. Is there any way to view verbose logs of the Virtualized container? |
So I just checked my Windows Event Viewer. Everytime I try to launch wsl, I get a Critical error from "Hyper-V Worker". Error one is - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Microsoft-Windows-Hyper-V-Worker" Guid="{51ddfa29-d5c8-4803-be4b-2ecb715570fe}" />
<EventID>18590</EventID>
<Version>0</Version>
<Level>1</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2019-06-16T23:55:46.904189500Z" />
<EventRecordID>123</EventRecordID>
<Correlation />
<Execution ProcessID="3508" ThreadID="7108" />
<Channel>Microsoft-Windows-Hyper-V-Worker-Admin</Channel>
<Computer>MyComputer</Computer>
<Security UserID="S-1-5-83-1-3007749068-1438516645-4015698613-3105166896" />
</System>
- <UserData>
- <VmlEventLog xmlns="http://www.microsoft.com/Windows/Virtualization/Events">
<VmName>Virtual Machine</VmName>
<VmId>B3469BCC-05A5-55BE-B5B2-5AEF301615B9</VmId>
<VmErrorCode0>0x0</VmErrorCode0>
<VmErrorCode1>0x0</VmErrorCode1>
<VmErrorCode2>0x0</VmErrorCode2>
<VmErrorCode3>0x0</VmErrorCode3>
<VmErrorCode4>0x0</VmErrorCode4>
<VmErrorMessage><5>[ 0.208903] Key type ceph registered <6>[ 0.209117] libceph: loaded (mon/osd proto 15/24) <6>[ 0.209118] hv_vmbus: registering driver hv_sock <6>[ 0.209240] NET: Registered protocol family 40 <6>[ 0.209506] registered taskstats version 1 <5>[ 0.209510] Loading compiled-in X.509 certificates <6>[ 0.209705] Btrfs loaded, crc32c=crc32c-generic <6>[ 0.210457] rtc_cmos 00:00: setting system clock to 2019-06-16 23:54:45 UTC (1560729285) <4>[ 0.210468] Unstable clock detected, switching default tracing clock to "global" <4>[ 0.210468] If you want to keep using the local clock, then add: <4>[ 0.210468] "trace_clock=local" <4>[ 0.210468] on the kernel command line <6>[ 0.213020] Freeing unused kernel image memory: 1348K <6>[ 0.272405] Write protecting the kernel read-only data: 18432k <6>[ 0.272906] Freeing unused kernel image memory: 2008K <6>[ 0.273151] Freeing unused kernel image memory: 1836K <6>[ 0.273280] Run /init as init process <6>[ 0.277394] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready <5>[ 0.288347] scsi 0:0:0:0: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5 <5>[ 0.288721] sd 0:0:0:0: Attached scsi generic sg0 type 0 <5>[ 0.289446] sd 0:0:0:0: [sda] 536870912 512-byte logical blocks: (275 GB/256 GiB) <5>[ 0.289447] sd 0:0:0:0: [sda] 4096-byte physical blocks <5>[ 0.289534] sd 0:0:0:0: [sda] Write Protect is off <7>[ 0.289535] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00 <5>[ 0.289705] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA <5>[ 0.293086] sd 0:0:0:0: [sda] Attached SCSI disk <6>[ 0.309515] EXT4-fs (sda): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered <11>[ 0.349846] init: (1) ERROR: InitEntryUtilityVm:2425: read failed 17 <6>[ 0.685387] EXT4-fs (sda): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered <11>[ 0.703667] init: (1) ERROR: InitEntryUtilityVm:2425: read failed 17 <6>[ 1.201115] EXT4-fs (sda): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro,data=ordered <11>[ 1.220820] init: (1) ERROR: InitEntryUtilityVm:2425: read failed 17 <6>[ 1.232353] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready <6>[ 49.034941] hv_balloon: Max. dynamic memory size: 15306 MB <5>[ 61.322809] sd 0:0:0:0: [sda] Synchronizing SCSI cache <6>[ 61.325856] ACPI: Preparing to enter system sleep state S5 <0>[ 61.325898] reboot: Power down <7>[ 61.335904] acpi_power_off called <0>[ 61.335934] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 <0>[ 61.335934] <1>[ 61.335938] CPU: 0 PID: 1 Comm: init Not tainted 4.19.43-microsoft-standard #1 <1>[ 61.335939] Call Trace: <1>[ 61.335947] dump_stack+0x5c/0x7b <1>[ 61.335951] panic+0xe4/0x232 <1>[ 61.335953] do_exit+0xb27/0xb30 <1>[ 61.335956] __do_sys_reboot+0x129/0x1d0 <1>[ 61.335958] ? kmem_cache_free+0x17e/0x1b0 <1>[ 61.335959] ? kmem_cache_free+0x17e/0x1b0 <1>[ 61.335961] ? __dentry_kill+0x116/0x150 <1>[ 61.335963] ? default_file_splice_write+0x20/0x20 <1>[ 61.335965] ? __ia32_sys_fdatasync+0x20/0x20 <1>[ 61.335966] ? iterate_supers+0x9b/0xf0 <1>[ 61.335968] ? iterate_bdevs+0xee/0x130 <1>[ 61.335970] do_syscall_64+0x55/0x110 <1>[ 61.335973] entry_SYSCALL_64_after_hwframe+0x44/0xa9 <1>[ 61.335976] RIP: 0033:0x2050cc <1>[ 61.335979] Code: Bad RIP value. <1>[ 61.335980] RSP: 002b:00007fff31ea0378 EFLAGS: 00000217 ORIG_RAX: 00000000000000a9 <1>[ 61.335982] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00000000002050cc <1>[ 61.335983] RDX: 000000004321fedc RSI: 0000000028121969 RDI: 00000000fee1dead <1>[ 61.335984] RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 <1>[ 61.335985] R10: 0000000000000000 R11: 0000000000000217 R12: 00007fff31ea0388 <1>[ 61.335986] R13: 00007fff31ea04a0 R14: 0000000000000005 R15: 0000000000000003 <0>[ 61.337906] Kernel Offset: disabled</VmErrorMessage>
</VmlEventLog>
</UserData>
</Event> Error two is - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Microsoft-Windows-Hyper-V-Worker" Guid="{51ddfa29-d5c8-4803-be4b-2ecb715570fe}" />
<EventID>18590</EventID>
<Version>0</Version>
<Level>1</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2019-06-16T23:55:46.902217800Z" />
<EventRecordID>122</EventRecordID>
<Correlation />
<Execution ProcessID="3508" ThreadID="7108" />
<Channel>Microsoft-Windows-Hyper-V-Worker-Admin</Channel>
<Computer>MyComputer</Computer>
<Security UserID="S-1-5-83-1-3007749068-1438516645-4015698613-3105166896" />
</System>
- <UserData>
- <VmlEventLog xmlns="http://www.microsoft.com/Windows/Virtualization/Events">
<VmName>Virtual Machine</VmName>
<VmId>B3469BCC-05A5-55BE-B5B2-5AEF301615B9</VmId>
<VmErrorCode0>0x0</VmErrorCode0>
<VmErrorCode1>0x81000004132b0000</VmErrorCode1>
<VmErrorCode2>0x2050cc</VmErrorCode2>
<VmErrorCode3>0xffffffffffffffda</VmErrorCode3>
<VmErrorCode4>0x7fff31ea0378</VmErrorCode4>
<VmErrorMessage />
</VmlEventLog>
</UserData>
</Event> Here is another set of messages from a similar error:
|
I guess it's also worth mentioning that I previously didn't have Windows Sandbox enabled, and I just enabled it to try to see how it reacts. The Sandbox will launch initially, but then I get the same |
hmm, interesting that you mention that, actually. i was having the same issue, but i just chalked it up to the sandbox being slow and buggy. i did not think that it would be related to the WSL 2 issues i am having now |
Nope. Broke Pastebin also😢
…On Sat, Sep 14, 2019 at 2:54 PM Ben Hillis ***@***.***> wrote:
@hsmyers <https://github.com/hsmyers> - pastebin?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4105?email_source=notifications&email_token=AAHE7PUSOE7P427WFWJARM3QJVFRFA5CNFSM4HXVMHE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XEAQA#issuecomment-531513408>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHE7PQTIF5D6HNZNEGCP3TQJVFRFANCNFSM4HXVMHEQ>
.
|
https://privatebin.net/?ad8f86bb68131e73#3vMBNG36nQiC32zfTALogks4Z1To5nkSzFyej199LofM Quite messy. |
@OmriSama try make all the records point to 127.0.0.1 and check if WSL2 works, please. Then if it does, point them all to 0.0.0.0 and see if it works. |
Not sure; did a "find and replace all" in VScode for 127.0.0.1 to 0.0.0.0, and then the other way around. Neither worked! |
@OmriSama that's interesting. I guess it's either a common record we both had that WSL might "need" to connection check or something (most likely this), or the fact the hosts file isn't empty. Just for the sake of it, can you try adding Just to be sure too, could you do the same with |
I think it's more about the number of entries in the Hosts file instead of a special content. This is a Windows hosts file for ad blocking: (more than 4000 lines) And this is same hosts file with 1000 lines instead: Same hosts file with the first 500 lines doesn't show the problem and WSL2 launches correctly. |
Interesting @onomatopellan. Could you try edit wsl.conf to not generate a hosts file and not resolv, then see if a big hosts file affects it?
|
@lazerl0rd Nope. Modifying wsl.conf didn't help and still shows the same error. |
@onomatopellan thanks. Ben will see this later and take a look. PS: Ben, out of interest, you said you guys thought you solved the issue a while back. Since it wasn't this that you solved - what did you find and think was the issue? |
Long '0.0.0.0' based hosts file here. I restore the default just to start BASH and then overwrite that hosts with mine. WSL keeps working as intended. Also, WSL2 won't start when DNS Client service is disabled. Is that by design? |
Awesome, I have a repro. I'll get this fixed. Thanks to everybody for the help. |
Thanks for the information. I've since dropped out of receiving Insider builds and have reinstalled Windows 10 on my PC, but I believe I did have a custom hosts.txt file for ad-blocking before I did all of that. |
Hi there!, I had really hard time to set WSL2, at each update I had retry without success and look back to this issues to see any improvement. |
Glad to have open the door ;) |
Makes you wonder what else this simple patch cures? I too had problems with
docker prior to the hosts problem…
…On Thu, Sep 19, 2019 at 11:26 AM Christian Denat ***@***.***> wrote:
Glad to have open the door ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4105?email_source=notifications&email_token=AAHE7PQB3HEBNAFU7DNNHYTQKOY2VA5CNFSM4HXVMHE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7EHA5Q#issuecomment-533229686>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHE7PS7KIYVEJFMX6IQ5K3QKOY2VANCNFSM4HXVMHEQ>
.
|
TNX for information hosts is the causion! DELETE hosts fix this. |
Fixed in 18995. |
I had manually added some remote hosts to /etc/hosts under Ubuntu WSL2 and that seems to have created the same problem when those hosts ceased to exist and their DNS resolution failed. Deleting the hosts file under System32 as described above and a restart solved it. |
I dont know why, it seems restart solves everything 😆 |
Your Windows build number:
Microsoft Windows [Version 10.0.18917.1000]
What you're doing and what's happening:
Trying to launch
wsl.exe
orbash
throws an error message that statesAn existing connection was forcibly closed by the remote host.
I've tried this with my converted Debian distro, as well as ArchWSL. I also tried to install Ubuntu but during setup after choosing my UNIX username the same error gets thrown.
The distro should be launching normally and I should be presented with a bash shell.
Log files:
logs.zip
Edit (9/26/19):
It appears that the number of entries in a modified hosts.txt is what is causing this issue at the moment. More information here: #4105 (comment)
The text was updated successfully, but these errors were encountered: