cancel
Showing results for 
Search instead for 
Did you mean: 

error no service

dvescovi
Associate III

why do I get these:

Project setup failed with following error: No service available

1 ACCEPTED SOLUTION

Accepted Solutions
Erlkoenig
Associate III

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. 

View solution in original post

3 REPLIES 3
Cartu38 OpenDev
Lead III

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

Could you snapshot and explain Thanks which sequence it happens ?


Nawres GHARBI
ST Employee

hi @dvescovi 

any update ? 

Erlkoenig
Associate III

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.