Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "Connection closed by SUMO" in TrafficManager Simulation #22

Open
xiaodongww opened this issue Oct 22, 2024 · 3 comments
Open

Error: "Connection closed by SUMO" in TrafficManager Simulation #22

xiaodongww opened this issue Oct 22, 2024 · 3 comments
Assignees

Comments

@xiaodongww
Copy link

Hi, thanks for your great work. I tried to run TrafficManager and it reported an error as follows:

❯ python ./TrafficManager/sim_manager_only.py
Model initialized at 16:06:25.154.
Network building finished at 16:06:27.552.
Traceback (most recent call last):
  File "./TrafficManager/sim_manager_only.py", line 252, in <module>
    main()
  File "./TrafficManager/sim_manager_only.py", line 248, in main
    sim_manager.run_simulation()
  File "./TrafficManager/sim_manager_only.py", line 224, in run_simulation
    self.initialize_simulation()
  File "./TrafficManager/sim_manager_only.py", line 134, in initialize_simulation
    self.model.start()
  File "/home/www/workspace/DriveArena/TrafficManager/LimSim/simModel/Model.py", line 134, in start
    traci.start([
  File "/home/www/miniforge3/envs/drivearena_tf2/lib/python3.8/site-packages/traci/main.py", line 147, in start
    result = init(sumoPort, numRetries, "localhost", label, sumoProcess, doSwitch, traceFile, traceGetters)
  File "/home/www/miniforge3/envs/drivearena_tf2/lib/python3.8/site-packages/traci/main.py", line 119, in init
    return con.getVersion()
  File "/home/www/miniforge3/envs/drivearena_tf2/lib/python3.8/site-packages/traci/connection.py", line 381, in getVersion
    result = self._sendCmd(command, None, None)
  File "/home/www/miniforge3/envs/drivearena_tf2/lib/python3.8/site-packages/traci/connection.py", line 231, in _sendCmd
    return self._sendExact()
  File "/home/www/miniforge3/envs/drivearena_tf2/lib/python3.8/site-packages/traci/connection.py", line 137, in _sendExact
    raise FatalTraCIError("Connection closed by SUMO.")
traci.exceptions.FatalTraCIError: Connection closed by SUMO.
Network information commited at 16:06:27.594.

My environment is as follows:

Ubuntu 20.04
RTX3090
Driver Version: 535.183.01

Package version and sumo version is as follows:

traci 1.19.0
sumolib 1.19.0
sumo 1.19.0 (build from source )

I install sumo using the following commands:

git clone https://github.com/eclipse/sumo.git
git checkout v1_19_0
sudo apt-get update
sudo apt-get install cmake python g++ libxerces-c-dev libfox-1.6-dev libgdal-dev libproj-dev libgl2ps-dev swig
export SUMO_HOME="$PWD"
mkdir build/cmake-build && cd build/cmake-build
cmake ../..
make -j$(nproc)
sudo make install

I also tried to install SUMO 1.21.0 and it did not work as well. Could you please give me some suggestions? Is it convenient for you to provide more descriptions on how to install SUMO? The README file seems not to contain SUMO install instructions.

Thank you for your help!

@xiaodongww
Copy link
Author

@jokester-zzz could you give me some suggestions. thanks very much.

@xiaodongww
Copy link
Author

@jokester-zzz
Would you mind exporting all package versions to requirements.txt? Like this:
pip freeze > requirements.txt or
conda list -e > requirements.txt

In this way I can install the correct versions of all packages.

@zijinoier
Copy link
Collaborator

Thank you for reporting this issue and providing detailed information about your environment.

I recommend not building SUMO from source, but instead installing it directly through the package manager (apt).

You can follow the official SUMO installation guide at https://sumo.dlr.de/docs/Installing/index.html#linux. For Ubuntu, you can install it with these commands:

sudo add-apt-repository ppa:sumo/stable
sudo apt-get update
sudo apt-get install sumo sumo-tools sumo-doc

Regarding versions: You don't necessarily need SUMO 1.19.0. Our system has been tested with SUMO 1.20.0, and both sumolib 1.19.0 and 1.20.0 work fine in our environment.

Please try these steps and let me know if you still encounter any issues. The error you're seeing (Connection closed by SUMO) typically indicates a problem with the SUMO installation or configuration rather than with our codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants