Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] tcpip::SocketException in C++ TraCI

Hi!
I have been trying to use C++ TraCI and facing some weird issues. I have been trying to run the example source code found in https://sumo.dlr.de/docs/TraCI/C++TraCIAPI.html with a scenario which works fine in individual run.

The code compiles well and ran for the first time. But after that, I was trying to run it multiple times and it is not running with the following error message:
libc++abi.dylib: terminating with uncaught exception of type tcpip::SocketException: tcpip::Socket::connect() @ connect: Connection refused zsh: abort ./test

Initially, I thought that it might be an issue with port still open, I find the PID for the port and kill the process to open the port. But still the same error is shown. I have changed the port number (both in source code and command line), but still same result.

The most weird part is, While trying several times, for once the code again runs with literally no changes and now again it is not running.

I know, the problem may seem weird but any kind of help is appreciated.

Back to the top