Troubleshooting in NetSim

This section discusses some common issues and solutions:

CLI mode#

While running NetSim via CLI for the scenarios described in the Configuration file, you may bump into a few problems. While running NetSim via CLI, try to ensure that there are no errors in the Configuration.netsim file. The ConfigLog.txt file written to the windows temp path would show errors, if any, found by NetSim's config parser.

Warnings when running CLI mode#

I/O warning#

Reason: While typing the CLI command if you enter the wrong I/O Path, or if there is no Configuration.netsim file then the following error is thrown

Figure 12‑1: I/O warning displayed in CLI mode

Solution: Check and correct the I/O path.

Error in getting License displayed#

Reason: Unable to communicate with the license server

Figure 12‑2: Error in getting license

Solution: In this example, license server IP address is but it is entered as This is a case where the server IP address is wrong. The same error message is shown for wrong port number, wrong tag name like--apppath, -iopath, -license ..., etc. Therefore, this message is also shown if --appppath is typed instead of --apppath. Users are advised to check the command line arguments carefully.

Unable to load license config dll(126)#

Reason: Apppath and I/O path have white spaces

Figure 12‑3: Unable to load license config dll

Solution: If the folder name contains white space, then mention the folder path within double quotes while specifying the folder name in the command prompt. For example, if app path contains white space, then the app path must be mentioned within double quotes in the command prompt.

"License is NULL" error in CLI mode#

Simulation does not commence. "License is NULL\" is displayed in the command prompt.


Figure 12‑4: "License is NULL" error in CLI mode

Solution: This indicates unavailability of licenses for the network (component) being simulated.


Invalid attribute in configuration file attributes#

Specific attributes in the Configuration file are highlighted with zigzag lines.

Reason: If invalid input is given in the Configuration file, then the corresponding attribute is highlighted as blue lines as shown in the figure given below Figure 12‑5.

Figure 12‑5: Invalid attribute in configuration file

Solution: To resolve this issue mouse over the corresponding attribute, in order to get the tool tip that furnishes the details about the valid input for that attribute.

Note: If the schema file and the configuration file are not present in the same folder, the zigzag lines won't appear. So, place the Configuration file and Schema File in the same location or change the path of schema file in the configuration file.

Error in tags in configuration file attributes#

Simulation does not commence, and error is displayed at the command prompt. Also, red lines appearing at the tag specifying the Layer in the Configuration file

Reason: This issue arises mainly when the closing tag is not specified correctly for a particular layer in the Configuration file.

[Example:] If the closing tag is not specified for the Data link Layer, then the zigzag lines appear at the starting tags of Data link Layer and the Network Layer.

Figure 12‑6: Error in tags in configuration file

When NetSim is made to run through CLI, then the following error gets displayed in the command prompt.

Figure 12‑7: NetSim Run through CLI and following error displayed in the command prompt

Solution: The bug can be fixed by setting the closing tag correctly in the Configuration file

Error lines in configuration.xsd in the Configuration file#

Blue lines appear at configuration.xsd in the Configuration file.

Reason: This issue arises when the schema and the configuration file are not in the same folder.

Figure 12‑8: Error lines in configuration.xsd in the Configuration file

Solution: The bug can be fixed by placing the Configuration file and schema in the same folder.

Simulation terminates and "NetSim Backend has stopped working" displayed#

Simulation terminates and exhibits unpredictable behavior. An error message stating, "NetSim Crashed or Terminated" is thrown.


Figure 12‑9: NetSim Crashed or Terminated window

This problem arises if there is any flaw in the Configuration.netsim or in the dll.

Solution: Check whether the desired scenario has been configured properly in the Configuration.netsim.


No License for product (-1) error#

NetSim dongle is running in the server system. When running the NetSim in the Client system showing "No License for product (-1)" error.

Possible Reasons:

  1. Firewall in the client system is blocking the Network traffic.

  2. No network connection between Client and Server.

  3. License Server is not running in the Server system.


  1. The installed firewall may block traffic at 5053 port used for licensing. So, either the user can stop the firewall, or may configure it to allow port 5053.

  2. Contact the Network-in-charge and check if the Server system can be pinged from client.

  3. Check whether License Server is running in the Server system or not.

Troubleshooting VANET simulations that interface with SUMO#

Guide for Sumo#

  • Link for the Sumo Website - help related to Sumo.

  • In case sumo Configuration files do not open, Right click on any Sumo Configuration file, go to propertiesàopen withàsumo.

  • While Running NetSim Vanet Simulation -- If any message pops up as "SUMO_HOME" Not foundà Go to My computer à System Properties à Advanced system settings à Environment Variables. Add an Environment variable as "SUMO_HOME".

  • Sumo Configuration File must contain the paths of the Vehicle routes and Networks file.

  • Set the exact End Time for Sumo Simulation in Sumo Configuration File.

Guide for Python#

  • Any Python 2.7 version Installer would work fine for running simulations.

  • If you have installed python by an external Installer, make sure the Python Path is set. It would be set automatically by python installer that comes with NetSim.

  • In case "Pywin 32" is not getting installed, or during simulation, error occurs as "win32 modules not found" try the code below (Run it as a python Code).

 import sys

 from \_winreg import \*

 \# tweak as necessary

 version = sys.version\[:3\]

 installpath = sys.prefix

 regpath = \"SOFTWARE\\\\Python\\\\Pythoncore\\\\%s\\\\\" % (version)

 installkey = \"InstallPath\"

 pythonkey = \"PythonPath\"

 pythonpath = \"%s;%s\\\\Lib\\\\;%s\\\\DLLs\\\\\" % (

 installpath, installpath, installpath


 def RegisterPy():


 reg = OpenKey(HKEY_CURRENT_USER, regpath)

 except EnvironmentError as e:


 reg = CreateKey(HKEY_CURRENT_USER, regpath)

 SetValue(reg, installkey, REG_SZ, installpath)

 SetValue(reg, pythonkey, REG_SZ, pythonpath)



 print \"\*\*\* Unable to register!\"


 print \"\-\-- Python\", version, \"is now registered!\"


 if (QueryValue(reg, installkey) == installpath and

 QueryValue(reg, pythonkey) == pythonpath):


 print \"=== Python\", version, \"is already registered!\"



 print \"\*\*\* Unable to register!\"

 print \"\*\*\* You probably have another Python installation!\"

 if \_\_name\_\_ == \"\_\_main\_\_\":


VANET Simulation#

i. Changing Vehicle (Node) Names, Moving or deleting vehicles etc. are disabled in Vanets Simulation.

ii. On running simulation, Backend calls Python file.

iii. NetSim protocol engine waits for the Pipes connection to be established.


  • SUMO_HOME Environment variable is checked. If Environment variable is not present, Error is displayed as "key interrupt error" in SUMO_HOME.

  • Python File waits for Pipes connection. ("waiting for pipes to connect").

  • It reads initial data as GUI enable/disable from simulation engine.

  • "Checking sumo" is printed. If the environment variable SUMO_HOME points to wrong directory, error is displayed.

  • Sumo Simulation is started where Sumo Binary is checked (To check Sumo.exe or Sumo GUI are working in the system or not). Then a TCP connection is made

  • A while loop runs -- It follows the following procedure.

i. Send Garbage value to Backend to clear pipe buffers (pipes).

ii. Read Vehicle name from NetSim (pipes).

iii. Compare with each vehicle present in Sumo. If vehicle is present --Then write confirmation (pipes) and read its position from NetSim (2pipes for X and Y coordinates). Also, sumo is stepped forward for every first vehicle in the list of current vehicles in sumo.

  • If vehicle not present, fail ('f') is sent.

  • Pipes and TCP closed.

NetSim Core Protocol Library#

  • After establishing the connection, NetSim VANET Library checks for GUI flag, and sends '1' if animation status is online.

  • As simulation proceeds, NetSim VANET library sends vehicle name to python, and receives XY positions, which are passed from python.

  • Positions are updated and simulation proceeds.