Can't connect to yocto toolchain on WSL2_Win11

Sysprogs forums Forums VisualGDB Can't connect to yocto toolchain on WSL2_Win11

This topic contains 3 replies, has 2 voices, and was last updated by  support 5 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #31889



    I’m trying to setup VisualGDB to build using a yocto toolchain stored on WSL2 running Ubuntu 20.04. The host system is Windows 11.

    I have added the firewall rule as described in visualgdb/documentation/wsl2

    I can select Windows 10 Linux Subsystem (Ubuntu 20.04) in project settings. However, when I go to CMake build settings and attempt to select the toolchain by selecting “Specify a yocto environment file”, VS hangs for two minutes before the following error is reported:

    VisualGDB version:
    —————— System.Exception ——————
    System.Exception: Bash process exited before connecting to output port.
    Command line:
    C:\WINDOWS\system32\wsl.exe –distribution Ubuntu-20.04 — /tmp/LinuxAppLauncher-v5 “/mnt/c/Users/jonma/AppData/Local/Temp/tmp4601.tmp” 60955
    at g73.c.f1(CommandLineAction a, CommandFlags b, Boolean c)
    at g73.c..ctor(k13 e, CommandLineAction d, CommandFlags c, jy a, Boolean b)
    at g73.l_2(jy d, String b, String c, String e, ExpandedEnvironment a, CommandFlags f)
    at ji1.n(String b, String c, ez2& a)
    at ti2.c2(ni2 a)
    at ti2.k(ni2 e, String d, String f, String b, l1 c, Boolean a)
    at fj1.u(ni2 a, String d, String e, String c, l1 f, Boolean b)
    at vw1.d(String a)
    at vw1.Run()
    at VisualGDB.Common_GUI.WPF.AdvancedToolchainSelectionControl.Controller.ImportToolchain(BasicToolchainProviderBase provider)
    trace=[g73+c.f1:1205, g73+c..ctor:98, g73.l_2:36, ji1.n:0, ti2.c2:2, ti2.k:31, fj1.u:46, vw1.d:0, vw1.Run:0, VisualGDB.Common_GUI.WPF.AdvancedToolchainSelectionControl+Controller.ImportToolchain:0]

    I get the same result if I turn windows firewall off so it doesn’t seem to be firewall related.

    LinuxAppLauncher-v5 is correctly created in the tmp folder on WSL2

    If I try to run the command line shown above, then (after a couple of minutes) the system reports failed to connect to port 60955, error 110.

    Any suggestions?






    No problem, please try checking the following:

    • Does VisualGDB work with the same WSL distro using the default toolchain (not the Yocto one)?
    • Does correspond to the correct WSL network adapter? Is IPv4 enabled for it?
    • Are you able to ping (that should correspond to the Windows machine) from WSL and use it to telnet to TCP ports opened on the Windows machine?



    I investigated Windows Firewall more closely – for some reason there were two rules for Visual Studio. I deleted one of them and now it is all working fine (and really well!).

    The only odd thing is why turning Windows Firewall off didn’t help; maybe a Win 11 bug?

    All I need to do now is create a separate platform for local (wsl) builds and remote builds and I will have a very flexible system.

    Thanks for your help.





    Thanks for letting us know and good to know it works. This makes sense, since VisualGDB relies on TCP/IP to communicate with WSL.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.