2

I'm checking the Veins tutorial that is http://veins.car2x.org/tutorial/ but I'm a little confused I see the tutorial is for Windows and Im using ubuntu, I managed to install, omnet++, sumo and import veins into Omnet++ but when I try to run the omnetpp.ini, everything opens in Omnet but i get this error:

Could not connect to TraCI server; error message: 111: Connection refused -- in module (Veins::TraCIScenarioManagerLaunchd) RSUExampleScenario.manager (id=6), at t=0s, event #1

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

Windows that appears when I run omnetpp.ini

Julian Heinovski
  • 1,822
  • 3
  • 16
  • 27
Houston61
  • 39
  • 8
  • The solution can be found in the official [FAQ](http://veins.car2x.org/documentation/faq/) and in the [module documentation](http://veins.car2x.org/documentation/sumo-launchd/). – Julian Heinovski Oct 18 '17 at 21:39

3 Answers3

4

Could not connect to TraCI server

The TaCI is the API of the SUMO traffic simulator. SUMO runs externally as a dedicated service and is not "built in" while compiling. That being said, you need to start the TraCI server first.

The documentation is very specific about that in this section.

JoVaRi
  • 80
  • 8
  • thank you for the information now that I'm checking that specific part I see the following line: /c/Users/user/src/veins-4.6/sumo-launchd.py -vv -c /c/Users/user/src/sumo-0.30.0/bin/sumo.exe how can I do the same in Ubuntu? because in there is no .exe files in Ubuntu – Houston61 Oct 18 '17 at 17:41
  • 1
    The software (Veins) was originally built on Linux. Since it can be a bit difficult to get it running on Windows, the tutorial is written for Windows. It is assumed that you are familiar with Linux and how you get the software running, if you are using a Linux OS (which you indeed do). – Julian Heinovski Oct 18 '17 at 21:31
  • Similar to the tutorial for Windows, you have to install SuMO on your system (via apt or directly compiled from source) and launch the program (SuMO) before you run your simulation (Veins). You should do this by using the `sumo-launchd.py` script which is located in the root of the project directory. – Julian Heinovski Oct 18 '17 at 21:35
  • You should get familiar with linux/ubuntu and how to run things on it. If you are there I recommend using the sumo ppa: $ sudo add-apt-repository ppa:sumo/stable && sudo apt update && sudo apt install sumo – JoVaRi Oct 19 '17 at 08:23
  • 1
    On Linux, the binary of SUMO is simply called `sumo` (on Windows, it is called `sumo.exe`) – Christoph Sommer Oct 19 '17 at 16:35
1

You have to launch sumo in parallel, so that is can wait for incoming connections on the port specified in the behavior of your application (generally 9999). Type in your terminal:

path_to_veins/sumo-launchd.py -v -c path_to_sumo

M M
  • 21
  • 2
-1

If you are using Ubuntu and followed where it told you to place your files in

/usr/local/src

Then you should have three directories in /usr/local/src

Make sure that the files inside them are able to be executed by running

sudo chmod 755 -R * from /usr/local/src.

because if the scripts inside veins and sumo directories are not set with the correct permission they will not execute and hence you will not have a server running and listening on port 9999

LionsFan
  • 119
  • 1
  • 10