sns3 / sns3-satellite

Satellite module for ns-3 simulator
https://www.sns3.org
GNU General Public License v3.0
142 stars 58 forks source link

Error in getting packet trace and statistics( sat-dama-sim-tn9.cc) #13

Closed royabhishek353 closed 4 years ago

royabhishek353 commented 5 years ago
  1. If I run it without passing the command line arguments:/waf --run "sat-dama-sim-tn9 I get default folder in sim folder where there is no packet trace is available.

  2. I am trying to get packet trace and statistics of sat-dama-sim-tn9.cc.I ran it with following command: ./waf --run "sat-dama-sim-tn9 --utsPerBeam=10"

I am getting following error: aborted. msg="ConfigStore tried to read or write an XML file but XML is not supported.", file=../src/config-store/model/config-store.cc, line=107 terminate called without an active exception Command ['/home/raj/bake/source/ns-3.29/build/contrib/satellite/examples/ns3-dev-sat-dama-sim-tn9-debug', '--utsPerBeam=10'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run --command-template="gdb --args %s ").

I had modified this file(sat-dama-sim-tn9.cc) which I am attaching.Points of changes is denoted by "//added"

include "ns3/core-module.h"

include "ns3/network-module.h"

include "ns3/internet-module.h"

include "ns3/satellite-module.h"

include "ns3/applications-module.h"

include "ns3/traffic-module.h"

include "ns3/config-store-module.h"

using namespace ns3;

/**

NS_LOG_COMPONENT_DEFINE ("sat-dama-sim-tn9");

int main (int argc, char *argv[]) { //added LogComponentEnable ("sat-dama-sim-tn9", LOG_LEVEL_INFO);

// Spot-beam over Finland uint32_t beamId = 18; uint32_t endUsersPerUt (1); uint32_t utsPerBeam (220); // 80% system load according to NCC-2 uint32_t nccConf (0); uint32_t fadingConf (0);

// 16 kbps per end user uint32_t packetSize (1280); // in bytes double intervalSeconds = 0.64;

double simLength (300.0); // in seconds Time appStartTime = Seconds (0.1);

/// Set simulation output details auto simulationHelper = CreateObject ("example-dama-sim-tn9"); Config::SetDefault ("ns3::SatEnvVariables::EnableSimulationOutputOverwrite", BooleanValue (true));

std::string inputFileNameWithPath = Singleton::Get ()->LocateDirectory ("contrib/satellite/examples") + "/tn9-dama-input-attributes.xml";

// read command line parameters given by user CommandLine cmd; cmd.AddValue ("simLength", "Simulation duration in seconds", simLength); cmd.AddValue ("utsPerBeam", "Number of UTs per spot-beam", utsPerBeam); cmd.AddValue ("nccConf", "NCC configuration", nccConf); cmd.AddValue ("fadingConf", "Fading configuration (0: Markov, 1: Rain)", fadingConf); simulationHelper->AddDefaultUiArguments (cmd, inputFileNameWithPath); cmd.Parse (argc, argv);

// To read attributes from file Config::SetDefault ("ns3::ConfigStore::Filename", StringValue (inputFileNameWithPath)); Config::SetDefault ("ns3::ConfigStore::Mode", StringValue ("Load")); Config::SetDefault ("ns3::ConfigStore::FileFormat", StringValue ("Xml")); ConfigStore inputConfig; inputConfig.ConfigureDefaults (); //added // Enable packet traces Config::SetDefault ("ns3::SatHelper::PacketTraceEnabled", BooleanValue (true)); /**

jeanbaptistedupe commented 4 years ago

Hi,

This looks like an XML error... Have you checked that libxml is correcly installed?

royabhishek353 commented 4 years ago

I have checked it seems XML is correctly installed xmllint --version xmllint: using libxml version 20904 compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ICU ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib Lzma

After running ./waf --run "sat-dama-http-sim-tn9 --utsPerBeam=2"

I got the following error: Waf: Leaving directory `/home/abhishek/Desktop/ns-allinone-3.29/ns-3.29/build' Build commands will be stored in build/compile_commands.json 'build' finished successfully (1m16.144s) aborted. msg="ConfigStore tried to read or write an XML file but XML is not supported.", file=../src/config-store/model/config-store.cc, line=107 terminate called without an active exception Command ['/home/abhishek/Desktop/ns-allinone-3.29/ns-3.29/build/contrib/satellite/examples/ns3.29-sat-dama-http-sim-tn9-optimized', '--utsPerBeam=2'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run --command-template="gdb --args %s ").

would any one help me out to solve this problem?

jeanbaptistedupe commented 4 years ago

Reading your error log : "ConfigStore tried to read or write an XML file but XML is not supported." ns3 needs specific XML packages to read XML files. Please refer to : https://www.nsnam.org/wiki/Installation#Prerequisites

royabhishek353 commented 4 years ago

sudo apt-get install libxml2 libxml2-dev

Reading package lists... Done Building dependency tree
Reading state information... Done libxml2 is already the newest version (2.9.4+dfsg1-6.1ubuntu1.2). libxml2-dev is already the newest version (2.9.4+dfsg1-6.1ubuntu1.2). The following packages were automatically installed and are no longer required:

./waf --run "sat-training-example --utsPerBeam=2"

Waf: Entering directory /home/abhishek/Desktop/ns-allinone-3.29/ns-3.29/build' Waf: Leaving directory/home/abhishek/Desktop/ns-allinone-3.29/ns-3.29/build' Build commands will be stored in build/compile_commands.json 'build' finished successfully (1m20.897s) aborted. msg="ConfigStore tried to read or write an XML file but XML is not supported.", file=../src/config-store/model/config-store.cc, line=107 terminate called without an active exception Command ['/home/abhishek/Desktop/ns-allinone-3.29/ns-3.29/build/contrib/satellite/examples/ns3.29-sat-training-example-optimized', '--utsPerBeam=2'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run --command-template="gdb --args %s ").

Even if libxml2 (2.9) is installed as suggested by manual.But still I am getting this error.Do any one help me out ?

jeanbaptistedupe commented 4 years ago

Can you please print the output of your ./waf configure?

royabhishek353 commented 4 years ago

./waf configure Setting top to : /home/abhishek/Desktop/ns-allinone-3.29/ns-3.29 Setting out to : /home/abhishek/Desktop/ns-allinone-3.29/ns-3.29/build Checking for 'gcc' (C compiler) : /usr/bin/gcc Checking for cc version : 7.4.0 Checking for 'g++' (C++ compiler) : /usr/bin/g++ Checking for compilation flag -Wl,--soname=foo support : ok Checking for compilation flag -std=c++11 support : ok Checking for program 'python' : /usr/bin/python Checking for python version >= 2.3 : 2.7.15 python-config : /usr/bin/python-config Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes Testing pyembed configuration : yes Asking python-config for pyext '--cflags --libs --ldflags' flags : yes Testing pyext configuration : yes Checking for compilation flag -fvisibility=hidden support : ok Checking for compilation flag -Wno-array-bounds support : ok Checking for pybindgen location : ../pybindgen-0.17.0.post58+ngcf00cc0 (guessed) Checking for python module 'pybindgen' : 0.17.0.post58+gcf00cc0 Checking for pybindgen version : 0.17.0.post58+gcf00cc0 Checking for code snippet : yes Checking for types uint64_t and unsigned long equivalence : no Checking for code snippet : no Checking for types uint64_t and unsigned long long equivalence : yes Checking for the apidefs that can be used for Python bindings : gcc-LP64 Checking for internal GCC cxxabi : complete Checking for python module 'pygccxml' : not found Checking boost includes : headers not found, please provide a --boost-includes argument (see help) Checking boost includes : headers not found, please provide a --boost-includes argument (see help) Checking for click location : not found Checking for program 'pkg-config' : /usr/bin/pkg-config Checking for 'gtk+-3.0' : not found Checking for 'libxml-2.0' : yes checking for uint128_t : not found checking for __uint128_t : yes Checking high precision implementation : 128-bit integer (default) Checking for header stdint.h : yes Checking for header inttypes.h : yes Checking for header sys/inttypes.h : not found Checking for header sys/types.h : yes Checking for header sys/stat.h : yes Checking for header dirent.h : yes Checking for header stdlib.h : yes Checking for header signal.h : yes Checking for header pthread.h : yes Checking for header stdint.h : yes Checking for header inttypes.h : yes Checking for header sys/inttypes.h : not found Checking for library rt : yes Checking for header sys/ioctl.h : yes Checking for header net/if.h : yes Checking for header net/ethernet.h : yes Checking for header linux/if_tun.h : yes Checking for header netpacket/packet.h : yes Checking for NSC location : not found Checking for 'sqlite3' : not found Checking for header linux/if_tun.h : yes Checking for python module 'gi' : 3.26.1 Checking for python module 'gi.repository.GObject' : ok Checking for python module 'cairo' : ok Checking for python module 'pygraphviz' : 1.4rc1 Checking for python module 'gi.repository.Gtk' : ok Checking for python module 'gi.repository.Gdk' : ok Checking for python module 'gi.repository.Pango' : ok Checking for python module 'gi.repository.GooCanvas' : ok Checking for program 'sudo' : /usr/bin/sudo Checking for program 'valgrind' : not found Checking for 'gsl' : not found python-config : not found Checking for compilation flag -fstrict-aliasing support : ok Checking for compilation flag -fstrict-aliasing support : ok Checking for compilation flag -Wstrict-aliasing support : ok Checking for compilation flag -Wstrict-aliasing support : ok Checking for program 'doxygen' : /usr/bin/doxygen ---- Summary of optional NS-3 features: Build profile : debug Build directory : BRITE Integration : not enabled (BRITE not enabled (see option --with-brite)) DES Metrics event collection : not enabled (defaults to disabled) Emulation FdNetDevice : enabled Examples : not enabled (defaults to disabled) File descriptor NetDevice : enabled GNU Scientific Library (GSL) : not enabled (GSL not found) Gcrypt library : not enabled (libgcrypt not found: you can use libgcrypt-config to find its location.) GtkConfigStore : not enabled (library 'gtk+-3.0 >= 3.0' not found) MPI Support : not enabled (option --enable-mpi not selected) NS-3 Click Integration : not enabled (nsclick not enabled (see option --with-nsclick)) NS-3 OpenFlow Integration : not enabled (Required boost libraries not found) Network Simulation Cradle : not enabled (NSC not found (see option --with-nsc)) PlanetLab FdNetDevice : not enabled (PlanetLab operating system not detected (see option --force-planetlab)) PyViz visualizer : enabled Python API Scanning Support : not enabled (Missing 'pygccxml' Python module) Python Bindings : enabled Real Time Simulator : enabled SQlite stats data output : not enabled (library 'sqlite3' not found) Tap Bridge : enabled Tap FdNetDevice : enabled Tests : not enabled (defaults to disabled) Threading Primitives : enabled Use sudo to set suid bit : not enabled (option --enable-sudo not selected) XmlIo : enabled

jeanbaptistedupe commented 4 years ago

Try to restart the building & simulation, it should work now. If the issue persists, plase open a ticket at https://gitlab.com/nsnam/ns-3-dev as the issue with ConfigStore you encouter is not linked to SNS3 code.