Skip to content
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

Error when installing distros - The stub received bad data. Error code: Wsl/Service/0x800706f7 #9413

Open
1 of 2 tasks
MatPoliquin opened this issue Dec 29, 2022 · 28 comments

Comments

@MatPoliquin
Copy link

MatPoliquin commented Dec 29, 2022

Version

Microsoft Windows [Version 10.0.22621.963]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

Ubuntu 18.04

Other Software

No response

Repro Steps

Install Ubuntu 18.04 or 20.04.X from the Windows Store
Launch Ubuntu 18.04 from start menu
Notice the error messsage in the console:

The stub received bad data.
Error code: Wsl/Service/0x800706f7
Press any key to continue...

Expected Behavior

The distro setup should launch and ask to choose username instead of getting the error message above.

It was working a few days ago, I am not sure what changed (I don't recall installing Windows Updates or changing any settings) the only thing that changed is that I installed a VPN

Actual Behavior

Got this error message

The stub received bad data.
Error code: Wsl/Service/0x800706f7
Press any key to continue...

Diagnostic Logs

No response

@MatPoliquin MatPoliquin changed the title Error when installing distros Error when installing distros - The stub received bad data. Error code: Wsl/Service/0x800706f7 Dec 29, 2022
@maffei2443
Copy link

I am having the exact same issue.
Here's an image

image

Operating System

Windows 11 Enterprise 64-bit (10.0, Build 22621)

Distro version

Ubuntu 20.04.5 LTS

Output of command wsl --version

WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.963

Output of command wsl --update

Checking for updates.
The most recent version of Windows Subsystem for Linux is already installed.

@MatPoliquin
Copy link
Author

In my case using this cmd solved the issue:
netsh winsock reset

@NadeeraSilvaa
Copy link

In my case using this cmd solved the issue: netsh winsock reset

Thanks it worked

@ashok624443
Copy link

Thank you. Running the command # netsh winsock reset

Worked for me. @MatPoliquin 👍

@tharindugithu
Copy link

thanks it wroked @MatPoliquin

@vanshyr
Copy link

vanshyr commented Feb 2, 2023

Thanks it worked here too @MatPoliquin

Command and after restart system.

@aaroncnb
Copy link

aaroncnb commented Feb 8, 2023

Hi! Just want to repor that some MDM software appears to cause the same issue.

None of the above troubleshooting steps helped unfortunately =(

(but I appreciate all the helpful tips everyone has reported here -- it's helped me work out the cause)

For corproate security reasons, I cannot say exactly which MDM I am using, sorry!

But the error message is the same as reported above:

Microsoft Windows [Version 10.0.22621.1194]
(c) Microsoft Corporation. All rights reserved.

C:\Users\***>wsl
The stub received bad data.
Error code: Wsl/Service/0x800706f7

Uninstalling the MDM software did not resolve the issue -- only a clean reinstall of Windows 11 helped.
However, upon reinstalling the MDM software following Windows 11 reinstall and successful WSL2 reinstall and run check,
WSL2 instantly began showing the above error again.

Repeating the troubeshooting steps mentioned here following the Windows 11 reinstall did not help.

No VPN software is enabled on this system.

Recap:

1. WSL2 works
2. Installed MDM -> WSL2 Doesn't work
3. Troubleshooting -> WSL2 doesn't work
4. Uninstall MDM -> WSL2 doesn't work
5. Reinstall Windows 11 -> WSL2 works
6. Reinstall MDM -> WSL2 doesn't work
7. Troubleshooting -> WSL2 doesn't work
8. Uninstall MDM (again) -> WSL2 doesn't work

For the time being this is all the specific env info I can share without further authorization from my employer, but I thought I should go ahead and post it just in case it helps someone else in a similar situation.

@hgsantana
Copy link

One developer at IBM reported that running netsh winsock reset fix the problem with WSL, but causes VPN to stop working. Fixing VPN causes WSL to stop working.

But everything seems fine with WSL instalation:
WSL Version: 1.0.3.0
Kernel Version: 5.15.79.1
Windows Version: 10.0.22621.1105

@Baolong-chao
Copy link

Thanks it worked for me @MatPoliquin

@bonaluo
Copy link

bonaluo commented Feb 9, 2023

The command netsh winsoc reset is valid, but also short. It needs to be executed every two or three days.I need a long-term solution

@yinuo-136
Copy link

Thanks a lot, saved my day.

@ryderdinh
Copy link

Thanks it worked

@ztibeike
Copy link

Issue reoccurs after system reboot. netsh winsock reset can not address the root cause of the issue.

@AxisRay
Copy link

AxisRay commented Feb 27, 2023

I tried to remove winsock LSP one by one.

netsh winsock show catalog
netsh winsock remove provider <catalog id>

In my case.
Finally, I found there is some kind of compatibility issue between wsl and sangfor vdi client.
So, You can take this method to find the cause of the problem and apply for help from the software vendor.
BE CAREFUL
ONLY remove third-party LSP.

image

@CYL-collab
Copy link

netsh winsock reset solve the problem temporarily, but the same issue still happens occasionally as long as VPN is used :(

@ztibeike
Copy link

netsh winsock reset solve the problem temporarily, but the same issue still happens occasionally as long as VPN is used :(

Mine too.

@AbdulAhad10
Copy link

Hi, @MatPoliquin I tried your solution and many other solutions but it's not working for me. I am still stuck when I am trying to open Docker Desktop it is still giving me this error.
Screenshot 2023-03-30 180454

@yhvictor
Copy link

yhvictor commented May 3, 2023

Saw #4177 which fixed the issue for me.

@xingchen-cmd
Copy link

In my case using this cmd solved the issue: netsh winsock reset

It's very good resovle my problem,Thrank you!

@szthanatos
Copy link

In my case using this cmd solved the issue: netsh winsock reset

mark

@hilmarf
Copy link

hilmarf commented Aug 15, 2023

with Symantec Encryption Desktop : netsh winsock show catalog

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Layered Chain Entry
Description:                        PGPlsp over [MSAFD Tcpip [TCP/IP]]
Provider ID:                        {E5F4DF03-92E7-4974-B05B-01D63A3C97AD}
Provider Path:                      C:\WINDOWS\system32\PGPlsp.dll
Catalog Entry ID:                   1016
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        1
Protocol:                           6
Service Flags:                      0x20066
Protocol Chain Length:              2
Protocol Chain: 1015 : 1004

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Layered Service Provider
Description:                        PGPlsp
Provider ID:                        {3EC32CD3-F254-4826-9053-672DC37F0070}
Provider Path:                      C:\WINDOWS\system32\PGPlsp.dll
Catalog Entry ID:                   1015
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        0
Protocol:                           0
Service Flags:                      0x20066
Protocol Chain Length:              0

I was facing the same issue. netsh winsock reset solves it only temporarily. Uninstalling Symantec Encryption Desktop was the only way to solve it long term... actually I'm not sure whose responsibility it is.

In my opinion, WSL should be aware and able to handle different LSPs. Should be enough to just ignore the ones, which are not from Microsoft.

@PaSSw0rds
Copy link

WSL should be aware and able to handle different LSPs. Should be enough to just ignore the ones, which are not from Microsoft.

@rajithpera
Copy link

In my case using this cmd solved the issue: netsh winsock reset

Thank you it worked

@shaike1
Copy link

shaike1 commented Oct 15, 2023

did anyone found how to solve it for Symantec Encryption deskop (PGP) for the long run?
i need to do netsh winsock reset each launch of my machine

@takosenpai2687
Copy link

Also quit any proxy or vpn software before running netsh winsock reset as admin, otherwise running the command alone doesn't work.
In my case I quitted Exitlag and then it worked :)

@callect
Copy link

callect commented Dec 16, 2023

In my case using this cmd solved the issue: netsh winsock reset

thanks it work for me also.

1 similar comment
@eflylab
Copy link

eflylab commented Feb 4, 2024

In my case using this cmd solved the issue: netsh winsock reset

thanks it work for me also.

@iamarasekera
Copy link

In my case using this cmd solved the issue: netsh winsock reset

Thanks it worked for me too.

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

No branches or pull requests