Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Disconnect with Traci

Hi Zhiqiang,

it seems like SUMO is not running, since the the client cannot connect to the TCP server. Make sure you start SUMO with the --remote-port <INT> option as described here: http://sumo.dlr.de/wiki/TraCI#SUMO_startup.

If you need to simulate many runs, you will have to automate starting SUMO as well.

Greets,

Menno

On 10-7-2018 14:34, 胡志强 wrote:
Dear sumo-users:
        I am doing a traffic light program to optimize the timing of traffic light by using Traci.But I met a problem,I need to simulate the process again and again,then,I got this error:

Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
  Retrying in 2 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
  Retrying in 3 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
  Retrying in 4 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
  Retrying in 5 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
  Retrying in 6 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
  Retrying in 7 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
  Retrying in 8 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
  Retrying in 9 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
  Retrying in 10 seconds
Could not connect to TraCI server at localhost:55141 [Errno 111] Connection refused
Traceback (most recent call last):
   File "main.py", line 78, in <module>
     train(RL_natural)
   File "main.py", line 26, in train
     observation = env.reset()
  File "/home/huzhiqiang/traffic-signal-control/traci_tls_PER_8s_lr0.00025/trafficlight_env.py", line 110, in reset
     "--tripinfo-output", "tripinfo.xml"])
   File "/home/huzhiqiang/sumo/tools/traci/__init__.py", line 86, in start
    _connections[label] = connect(port, numRetries, "localhost", sumoProcess)
   File "/home/huzhiqiang/sumo/tools/traci/__init__.py", line 64, in connect
    raise FatalTraCIError("Could not connect in %s tries" % (numRetries + 1))
traci.exceptions.FatalTraCIError: Could not connect in 11 tries

How can I fix it?

Best regards,
Zhiqiang



_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user



Back to the top