【问题标题】:Error ([Errno 111] Connection refused) in veins (sumo-launchd.py)静脉中的错误([Errno 111] 连接被拒绝)(sumo-launchd.py)
【发布时间】:2014-01-22 15:37:02
【问题描述】:

我想使用veins,在OMNeT++ 网络模拟器和SUMO 道路交通模拟器之间进行联合模拟。

Veins 有 sumo-launchd 守护进程(用 Python 编写),它被设计为在后台运行,监听传入的请求。在每个传入连接上,它接收 XML 格式的模拟设置,然后启动一个单独的 SUMO 实例并代理 OMNeT++ 和 SUMO 之间的请求。

当我在终端中运行sumo-launchd.py(打开 OMNet++ 并开始模拟后)时,我得到以下问题,我认为这是与 Python 相关的。

bluemix@blueMix:~/SUMO/veins-2.1/examples/veins$ python /home/bluemix/SUMO/veins-2.1/sumo-launchd.py -vv -c /home/bluemix/SUMO/sumo-0.19.0/bin/sumo
Logging to /tmp/sumo-launchd.log
Listening on port 9999
Connection from 127.0.0.1 on port 45234
Handling connection from 127.0.0.1 on port 45234
Got TraCI message of length 2
Got TraCI command of length 1
Got TraCI command 0x0
Got CMD_GETVERSION
Got TraCI message of length 314
Got TraCI command of length 309
Got TraCI command 0x75
Got CMD_FILE_SEND for "sumo-launchd.launch.xml"
Got CMD_FILE_SEND with data "<launch>
  <copy file="erlangen.net.xml"/>
  <copy file="erlangen.rou.xml"/>
  <copy file="erlangen.poly.xml"/>
  <copy file="erlangen.sumo.cfg" type="config"/>
  <basedir path="/home/bluemix/OMNeTpp/omnetpp-4.3.1/samples/mixim/examples/veins/"/>
  <seed value="0"/>
</launch>
"
Creating temporary directory...
Temporary dir is /tmp/sumo-launchd-tmp-2JQTRd
Base dir is /home/bluemix/OMNeTpp/omnetpp-4.3.1/samples/mixim/examples/veins/
Seed is 0
Finding free port number...
Claiming lock on port
...found port 41320
Starting SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320, seed 0
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 1)
Error ([Errno 111] Connection refused)
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 2)
Error ([Errno 111] Connection refused)
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 3)
Error ([Errno 111] Connection refused)
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 4)
Error ([Errno 111] Connection refused)
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 5)
Error ([Errno 111] Connection refused)
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 6)
Error ([Errno 111] Connection refused)
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 7)
Error ([Errno 111] Connection refused)
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 8)
Error ([Errno 111] Connection refused)
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 9)
Error ([Errno 111] Connection refused)
Connecting to SUMO (/home/bluemix/SUMO/sumo-0.19.0/bin/sumo -c erlangen.sumo.cfg) on port 41320 (try 10)
Error ([Errno 111] Connection refused)
Releasing lock on port
Cleaning up
Result: "<?xml version="1.0"?>
<status>
    <exit-code>-1</exit-code>
    <start>1390404178</start>
    <end>1390404189</end>
    <status>Could not connect to SUMO ([Errno 111] Connection refused). Might be protected by a personal firewall or crashed before a connection could be established.</status>
    <stdout><![CDATA[Loading configuration... done.
]]></stdout>
    <stderr><![CDATA[Error: Empty edges in roundabout.
Quitting (on error).
]]></stderr>
</status>
"
Closing connection from 127.0.0.1 on port 45234
^CKeyboard interrupt.
Shutting down.

以及来自 OMNeT++ 控制台的信息:

<!> Error in module (TraCIScenarioManagerLaunchd) scenario.manager (id=6) at event #1, t=0: Model error: Connection to TraCI server lost. Check your server's log. Error message: 104: Connection reset by peer.

TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?

Simulation terminated with exit code: 2

我用谷歌搜索了(12)这个问题,但与我的不完全相同。 提前致谢。

【问题讨论】:

    标签: python omnet++ veins sumo mixim


    【解决方案1】:

    您需要使用终端中的以下行来启动相扑:

    sumo-launchd.py -vv -c sumo-gui
    

    然后从omnet++ 运行omnetpp.ini 文件

    【讨论】:

    • sumo 或 sumo-gui 具有相同的结果。我得到的最佳答案来自 Veins 开发人员 (Sommer),正如我在自己的答案中所展示的那样。
    【解决方案2】:

    这是静脉所有者的回复(Christoph Sommer):

    https://github.com/sommer/mixim-sommer/archive/b47beb0c.zip

    这个应该适用于所有当前版本的 SUMO。请注意,它 尚未接受广泛的测试,所以请告诉我任何 问题。

    最好的,

    克里斯托夫

    您可以查看此link 以查看演讲。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-06-07
      • 1970-01-01
      • 2016-01-31
      • 2013-12-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多