Skip to main content
Senior
March 27, 2020
Question

STM32Cube 1.3.0 - Error: bind failed. Error = 98, exit

  • March 27, 2020
  • 1 reply
  • 829 views

Hi,

I am using STM32CubeIDE 1.3.0 on Linux Debian, and when I try to flash the MCU using the Run Button, GDB fails with error "bind failed. Error = 98, exit" (it seems that the IDE is trying to open an busy connection).

Concretely the log from console is the following:

 
STMicroelectronics ST-LINK GDB server. Version 5.5.0
Copyright (c) 2019, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
 Persistent Mode : Disabled
 Logging Level : 1
 Listen Port Number : 61234
 Status Refresh Delay : 15s
 Verbose Mode : Disabled
 SWD Debug : Enabled
 InitWhile : Enabled
 
Info : default port : 7184
Info : Remote address: 127.0.0.1
Error: bind failed. Error = 98, exit
Waiting for debugger connection...
Debugger connected
 -------------------------------------------------------------------
 STM32CubeProgrammer v2.4.0 
 -------------------------------------------------------------------
 
ST-Link Server is running on port : 7184
Info : default port : 7184
Info : Remote address: 127.0.0.1
Error: bind failed. Error = 98, exit
Info : default port : 7184
Info : Remote address: 127.0.0.1
Error: bind failed. Error = 98, exit
ST-LINK SN : 56FF70067878545228080567
ST-LINK FW : V2J36S7
Voltage : 3.05V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x413
Device name : STM32F405xx/F407xx/F415xx/F417xx
Flash size : 1 MBytes (default)
Device type : MCU
Device CPU : Cortex-M4
 
 
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_S0Km9U.srec
 File : ST-LINK_GDB_server_S0Km9U.srec
 Size : 6932 Bytes
 Address : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Download in Progress:
 
 
File download complete
Time elapsed during download operation: 00:00:00.566
 
 
 
Verifying ...
 
 
 
 
Download verified successfully 
 
 
Info : default port : 7184
Info : Remote address: 127.0.0.1
Error: bind failed. Error = 98, exit
Debugger connection lost.
Shutting down...
 

Do I have a wrong environment configuration ?

Otherwise, is it a known bug ?

Thanks for any suggestion.

s.

This topic has been closed for replies.

1 reply

Michael T
Associate
May 6, 2020

I encountered this error message, and I debugged it with the following command:

$ sudo lsof | grep 'TCP.*7184'
stlink-se 4555 mt 3u IPv4 20724358 0t0 TCP localhost:7184 (LISTEN)
stlink-se 4555 4558 mt 3u IPv4 20724358 0t0 TCP localhost:7184 (LISTEN)

This reveals there's already an instance of stlink-server running, it's process ID 4555, and it's bound to TCP port 7184 - checking with ps fax revealed stlink-server had already been started by stm32cubeide

I ran killall stlink-server to remove the old instance.