Skip to main content
Graduate
June 12, 2025
Solved

error no service

  • June 12, 2025
  • 3 replies
  • 499 views

why do I get these:

Project setup failed with following error: No service available

    This topic has been closed for replies.
    Best answer by Erlkoenig

    I found the reason for this error:

    "No service available" is displayed when the STM32 extension cannot start the "cmsis-scanner". This is a command-line tool automatically installed by the bundle-manager of the extension. Essentially the extension tries to run this command:

    & "$env:LocalAppData\stm32cube\bundles\cube-wrapper\0.8.3\bin\cube.exe" cmsis-scanner --launch-service

    When the command fails for whatever reason, the extension displays the message "No service available".

    To find the root cause:

    • Exit VS Code
    • Use task manager to ensure no "cube.exe" process is running
    • Run the above command manually on the powershell.
     

    In my case, the error was:

    CLIENT: Failed to bind 127.0.0.1:32125: Os { code: 10013, kind: PermissionDenied, message: "An attempt was made to access a socket in a way forbidden by its access permissions." }, assuming our service is already running

    i.e. the tool can't open the TCP port 32125. Apparently a common cause for blocked ports on Windows is Hyper-V or Winnat. 

    Here is a solution for reserving this port for regular applications, such that Winnat/Hyper-V don't occupy it.

    I solved the issue by running:

    netsh interface ipv4 show excludedportrange protocol=tcp
    net stop winnat
    netsh interface ipv4 show excludedportrange protocol=tcp
    netsh int ipv4 add excludedportrange protocol=tcp startport=32125 numberofports=1
    net start winnat

    Hope this helps anyone stuck on this issue. 

    3 replies

    Graduate II
    June 13, 2025

    Sounds like default VSCode message ... is it a log trace, a notification ?

    Could you snapshot and explain Thanks which sequence it happens ?


    Technical Moderator
    June 18, 2025

    hi @dvescovi 

    any update ? 

    ErlkoenigAnswer
    Graduate II
    October 28, 2025

    I found the reason for this error:

    "No service available" is displayed when the STM32 extension cannot start the "cmsis-scanner". This is a command-line tool automatically installed by the bundle-manager of the extension. Essentially the extension tries to run this command:

    & "$env:LocalAppData\stm32cube\bundles\cube-wrapper\0.8.3\bin\cube.exe" cmsis-scanner --launch-service

    When the command fails for whatever reason, the extension displays the message "No service available".

    To find the root cause:

    • Exit VS Code
    • Use task manager to ensure no "cube.exe" process is running
    • Run the above command manually on the powershell.
     

    In my case, the error was:

    CLIENT: Failed to bind 127.0.0.1:32125: Os { code: 10013, kind: PermissionDenied, message: "An attempt was made to access a socket in a way forbidden by its access permissions." }, assuming our service is already running

    i.e. the tool can't open the TCP port 32125. Apparently a common cause for blocked ports on Windows is Hyper-V or Winnat. 

    Here is a solution for reserving this port for regular applications, such that Winnat/Hyper-V don't occupy it.

    I solved the issue by running:

    netsh interface ipv4 show excludedportrange protocol=tcp
    net stop winnat
    netsh interface ipv4 show excludedportrange protocol=tcp
    netsh int ipv4 add excludedportrange protocol=tcp startport=32125 numberofports=1
    net start winnat

    Hope this helps anyone stuck on this issue.