Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Multi-Clients in TraaS

Hi Sumo:
I was building multi-clients to SUMO by employing below example code in JDK enviroment:
https://github.com/eclipse/sumo/blob/master/tools/contributed/traas/examples/java_library/MultiClient1.java
https://github.com/eclipse/sumo/blob/master/tools/contributed/traas/examples/java_library/MultiClient2.java
and encounter the error information below:(By the way It is OK when I tried 2 python multi-clients connecting to SUMO)

Error: Answered with error to command 0x03: Wrong position in requestMessage after dispatching command. Expected command length was 10 but 6 Bytes were read.
java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:210)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at java.net.SocketInputStream.read(SocketInputStream.java:224)
    at java.io.DataInputStream.readInt(DataInputStream.java:387)
    at de.tudresden.sumo.util.Query.doSimulationStep(Query.java:135)
    at de.tudresden.sumo.util.CommandProcessor.do_SimulationStep(CommandProcessor.java:74)
    at it.polito.appeal.traci.SumoTraciConnection.do_timestep(SumoTraciConnection.java:407)
    at it.polito.appeal.traci.SumoTraciConnection.do_timestep(SumoTraciConnection.java:400)
    at MultiClient1.main(MultiClient1.java:32)

java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:210)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at java.net.SocketInputStream.read(SocketInputStream.java:224)
    at java.io.DataInputStream.readInt(DataInputStream.java:387)
    at de.tudresden.sumo.util.Query.doSimulationStep(Query.java:135)
    at de.tudresden.sumo.util.CommandProcessor.do_SimulationStep(CommandProcessor.java:74)
    at it.polito.appeal.traci.SumoTraciConnection.do_timestep(SumoTraciConnection.java:407)
    at it.polito.appeal.traci.SumoTraciConnection.do_timestep(SumoTraciConnection.java:400)
    at MultiClient2.main(MultiClient2.java:20)

Are there any Traas version issuesr or enviromental cofigurations problems?
Thank you.
Your kindly Samuel.
2019-02-01



 


Back to the top