Showing results for 
Search instead for 
Did you mean: 

Hi, i am using stm32IDE if i entering into debug mode getting this error please help me to crack this. Failed to bind to port 61234, error code -1: No error Failure starting GDB server: TCP port 61234 not available.

MK S.1


This worked for me.

The error is strange and I am able to use the ST Programmer program with the 61234, and you can even do an upgrade of the ST Link firmware, but it won't connect under debug unless I change the port.



Associate II

It works. I even try to reinstall the ide and programmer before that, but still cannot get it work...


After searching for the problem on my PC's side, I ran out of ideas. It had to be some error on the MCU side. What solved it for me was putting the MCU into update mode (in CubeIDE > Help > ST-LINK Upgrade) and even though the latest version was programmed already, I updated it again which probably caused the right kind of reset on the MCU and it worked fine after.


Just use Sysinternals TCPView (or similar tool), find the port in the list and 'Close Connection'.

Try programming again.

Like RRei.1 said you can use tcp view.

You can get it here, it's the new improved version better interface and yopu can filter for ports.




Associate III

pkill gdb solved it for me

Thank you Seunghun Kim. Changing my port from 61234 to 41234 fixed my issue.

I had previously tried 61236 and 61238 unsuccessfully. When I changed the port to 41234 I was immediately presented with a windows firewall popup. After accepting the challenge the programmer now works fine and the GDB server is able to launch successfully.

How does one change the port number of the GDB server?

Associate II

I tried to change GDB port numbers. Couldn't readily see how that's done. Also could not find any processes on my Windows 10 box that looked like "st-link" anything, or I would have tried killing them.

Finally in total disgust I rebooted and voila, the STM32CubeIDE -> Nucleo USB link again works. I hereby refrain from stating my reaction to problems that require a reboot to fix. But STM...c'mon.