Hi, it may take some time for the OS to free the port and there is a limit on the number of usable ports but you should hit this only if try a lot of runs, see https://danielmendel.github.io/blog/2013/04/07/benchmarkers-beware-the-ephemeral-port-limit/ which states that MacOS can open up to 16383 connections.
I am not a Mac user but the article above suggests that you need to wait 15 seconds before the port becomes available again. Best regards, Michael Am 21.06.20 um 00:50 schrieb Proyash Podder: > 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. > > _______________________________________________ > sumo-user mailing list > [email protected] > To unsubscribe from this list, visit > https://www.eclipse.org/mailman/listinfo/sumo-user >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ sumo-user mailing list [email protected] To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
