eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.36k stars 1.37k forks source link

traci.exceptions.FatalTraCIError: connection closed by SUMO #8381

Open Adaickalavan opened 3 years ago

Adaickalavan commented 3 years ago

Hi @behrisch,

We (@gamenot @adaickalavan) had previously communicated on this traci.exceptions.FatalTraCIError: connection closed by SUMO in eclipse/sumo#8125 and in huawei-noah/SMARTS#472 issues.

In short, we have used SUMO for a reinforcement learning application. Notably, in this application, we take over vehicles in specific regions, control them with complex vehicle control models, and release them at a later time. Running the simulation with SUMO throws the traci.exceptions.FatalTraCIError: connection closed by SUMO error.

Following up on our previous conversation on this matter, we have created a containerized example to reproduce the error in huawei-noah/SMARTS#619. Upon running the Docker image, the traffic simulation will crash at step 1166 with the traci.exceptions.FatalTraCIError: connection closed by SUMO error.

Hopefully this Docker image will help in debugging this error. Thank you.

behrisch commented 3 years ago

@Adaickalavan Thanks for keeping track on this one. I can now reproduce it.

Gamenot commented 3 years ago

@behrisch I have updated the instructions on https://github.com/huawei-noah/SMARTS/pull/619 to address your comment there.

dineshresearch commented 2 years ago

Any update regrading the issue? I am still facing this issue @behrisch @Adaickalavan

pearlahajjar commented 2 years ago

I am still facing this issue. Any updates?

Error message:

Traceback (most recent call last): File "C:\Users\hajjar.p\PycharmProjects\SUMO Python\main.py", line 102, in traci.start([sumoBinary, "-c", "C:/Users/hajjar.p/Desktop/New folder/Python Sumo test/cross.sumocfg", File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\main.py", line 170, in start return init(sumoPort, numRetries, "localhost", label, sumoProcess, doSwitch) File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\main.py", line 140, in init return _connections[label].getVersion() File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\connection.py", line 370, in getVersion result = self._sendCmd(command, None, None) File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\connection.py", line 181, in _sendCmd return self._sendExact() File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\connection.py", line 91, in _sendExact raise FatalTraCIError("connection closed by SUMO") traci.exceptions.FatalTraCIError: connection closed by SUMO

Process finished with exit code 1