Giter Club home page Giter Club logo

gns3-server's Introduction

GNS3-server

image

image

image

This is the GNS3 server repository.

The GNS3 server manages emulators such as Dynamips, VirtualBox or Qemu/KVM. Clients like the GNS3 GUI and the GNS3 Web UI control the server using an HTTP REST API.

Software dependencies

In addition of Python dependencies listed in a section below, other software may be required, recommended or optional.

  • uBridge is required, it interconnects the nodes.
  • Dynamips is required for running IOS routers (using real IOS images) as well as the internal switches and hubs.
  • VPCS is recommended, it is a builtin node simulating a very simple computer to perform connectitivy tests using ping, traceroute etc.
  • Qemu is strongly recommended on Linux, as most node types are based on Qemu, for example Cisco IOSv and Arista vEOS.
  • libvirt is recommended (Linux only), as it's needed for the NAT cloud.
  • Docker is optional (Linux only), some nodes are based on Docker.
  • mtools is recommended to support data transfer to/from QEMU VMs using virtual disks.
  • i386-libraries of libc and libcrypto are optional (Linux only), they are only needed to run IOU based nodes.

Docker support

Docker support needs the script program (bsdutils or util-linux package), when running a docker VM and a static busybox during installation (python3 setup.py install / pip3 install / package creation).

Branches

master

master is the next stable release, you can test it in your day to day activities. Bug fixes or small improvements pull requests go here.

2.x (2.3 for example)

Next major release

Never use this branch for production. Pull requests for major new features go here.

Linux

GNS3 is perhaps packaged for your distribution:

Linux (Debian based)

The following instructions have been tested with Ubuntu and Mint. You must be connected to the Internet in order to install the dependencies.

Dependencies:

  • Python 3.6, setuptools and the ones listed here

The following commands will install some of these dependencies:

sudo apt-get install python3-setuptools python3-pip

Finally, these commands will install the server as well as the rest of the dependencies:

cd gns3-server-master
python3 -m pip install -r requirements.txt
python3 -m pip install .
gns3server

To run tests use:

python3 -m pytest tests

Docker container

For development, you can run the GNS3 server in a container

bash scripts/docker_dev_server.sh

Run as daemon (Unix only)

You will find init sample scripts for various systems inside the init directory.

Useful options:

  • --daemon: start process as a daemon
  • --log logfile: store output in a logfile
  • --pid pidfile: store the pid of the running process in a file and prevent double execution

All init scripts require the creation of a GNS3 user. You can change it to another user.

sudo adduser gns3

upstart

For ubuntu < 15.04

You need to copy init/gns3.conf.upstart to /etc/init/gns3.conf

sudo chown root /etc/init/gns3.conf
sudo service gns3 start

systemd

You need to copy init/gns3.service.systemd to /lib/systemd/system/gns3.service

sudo chown root /lib/systemd/system/gns3.service
sudo systemctl start gns3

Windows

Please use our all-in-one installer to install the stable build.

If you install via source you need to first install:

Then you can call

python setup.py install

to install the remaining dependencies.

To run the tests, you also need to call

pip install pytest pytest-capturelog

before actually running the tests with

python setup.py test

or with

py.test -v

Mac OS X

Please use our DMG package for a simple installation.

If you want to test the current git version or contribute to the project, you can follow these instructions with virtualenvwrapper: http://virtualenvwrapper.readthedocs.org/ and homebrew: http://brew.sh/.

brew install python3
mkvirtualenv gns3-server --python=/usr/local/bin/python3.5
python3 setup.py install
gns3server

SSL

If you want enable SSL support on GNS3 you can generate a self signed certificate:

bash gns3server/cert_utils/create_cert.sh

This command will put the files in ~/.config/GNS3/ssl

After you can start the server in SSL mode with:

python gns3server/main.py --certfile ~/.config/GNS3/ssl/server.cert --certkey ~/.config/GNS3/ssl/server.key --ssl

Or in your gns3_server.conf by adding in the Server section:

[Server]
certfile=/Users/noplay/.config/GNS3/ssl/server.cert
certkey=/Users/noplay/.config/GNS3/ssl/server.key
ssl=True

Running tests

Just run:

py.test -vv

If you want test coverage:

py.test --cov-report term-missing --cov=gns3server

Security issues

Please contact us using contact form available here: http://docs.gns3.com/1ON9JBXSeR7Nt2-Qum2o3ZX0GU86BZwlmNSUgvmqNWGY/index.html

gns3-server's People

Contributors

aka001 avatar boenrobot avatar candlerb avatar capncheapo avatar ddragic avatar gcetusic avatar grossmj avatar hrnciar avatar jseutter avatar julien-duponchelle avatar kazkansouh avatar mgale avatar mlastawi avatar mm1ke avatar nasrullahs avatar neffs avatar omadjoudj avatar piotrpekala7 avatar pyup-bot avatar raizo62 avatar rajpratik71 avatar rarylson avatar sbraz avatar shmygov avatar spikefishjohn avatar steffann avatar twowheeldev avatar ventaquil avatar xatrekak avatar ziajka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gns3-server's Issues

gns3server requires development files at runtime

gns3 server seems to run some check before starting.
gns3 server uses gcc to compile something and requires python3-zmq headers.
at runtime no compiler nor develpment headers should be needed.

[root@localhost ~]# gns3server
/usr/lib64/python3.3/site-packages/zmq/backend/cffi/pycache/_cffi__xa8bce778x28aeb39d.c:153:17: fatal error: zmq.h: No such file or directory
#include <zmq.h>
^
compilation terminated.
Traceback (most recent call last):
File "/usr/lib64/python3.3/site-packages/zmq/backend/init.py", line 27, in
_ns = select_backend('zmq.backend.cython')
File "/usr/lib64/python3.3/site-packages/zmq/backend/select.py", line 31, in select_backend
mod = import(name, fromlist=public_api)
File "/usr/lib64/python3.3/site-packages/zmq/backend/cython/init.py", line 26, in
from . import (constants, error, message, context,
ImportError: /usr/lib64/python3.3/site-packages/zmq/backend/cython/utils.cpython-33m.so: undefined symbol: zmq_curve_keypair

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/python3.3/distutils/unixccompiler.py", line 126, in _compile
extra_postargs)
File "/usr/lib64/python3.3/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib64/python3.3/distutils/spawn.py", line 32, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib64/python3.3/distutils/spawn.py", line 163, in _spawn_posix
% (cmd[0], exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/python3.3/site-packages/cffi/ffiplatform.py", line 47, in _build
dist.run_command('build_ext')
File "/usr/lib64/python3.3/distutils/dist.py", line 948, in run_command
cmd_obj.run()
File "/usr/lib64/python3.3/distutils/command/build_ext.py", line 354, in run
self.build_extensions()
File "/usr/lib64/python3.3/distutils/command/build_ext.py", line 463, in build_extensions
self.build_extension(ext)
File "/usr/lib64/python3.3/distutils/command/build_ext.py", line 518, in build_extension
depends=ext.depends)
File "/usr/lib64/python3.3/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib64/python3.3/distutils/unixccompiler.py", line 128, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib64/python3.3/site-packages/zmq/backend/cffi/_cffi.py", line 187, in
_version_info = zmq_version_info()
File "/usr/lib64/python3.3/site-packages/zmq/backend/cffi/_cffi.py", line 159, in zmq_version_info
runtime_library_dirs=cfg['runtime_library_dirs'],
File "/usr/lib64/python3.3/site-packages/cffi/api.py", line 311, in verify
lib = self.verifier.load_library()
File "/usr/lib64/python3.3/site-packages/cffi/verifier.py", line 68, in load_library
self.compile_module()
File "/usr/lib64/python3.3/site-packages/cffi/verifier.py", line 56, in compile_module
self._compile_module()
File "/usr/lib64/python3.3/site-packages/cffi/verifier.py", line 142, in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
File "/usr/lib64/python3.3/site-packages/cffi/ffiplatform.py", line 25, in compile
outputfilename = _build(tmpdir, ext)
File "/usr/lib64/python3.3/site-packages/cffi/ffiplatform.py", line 50, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.ffiplatform.VerificationError: CompileError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/gns3server", line 9, in
load_entry_point('gns3-server==1.0a3.dev2', 'console_scripts', 'gns3server')()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2108, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python3.3/site-packages/gns3server/main.py", line 25, in
from gns3server.server import Server
File "/usr/lib/python3.3/site-packages/gns3server/server.py", line 22, in
import zmq
File "/usr/lib64/python3.3/site-packages/zmq/init.py", line 60, in
from zmq.backend import *
File "/usr/lib64/python3.3/site-packages/zmq/backend/init.py", line 29, in
_ns = select_backend('zmq.backend.cffi')
File "/usr/lib64/python3.3/site-packages/zmq/backend/select.py", line 31, in select_backend
mod = import(name, fromlist=public_api)
File "/usr/lib64/python3.3/site-packages/zmq/backend/cffi/init.py", line 12, in
from zmq.backend.cffi import (constants, error, message, context, socket,
File "/usr/lib64/python3.3/site-packages/zmq/backend/cffi/constants.py", line 4, in
from ._cffi import C, c_constant_names
File "/usr/lib64/python3.3/site-packages/zmq/backend/cffi/_cffi.py", line 190, in
"Please check that you have zeromq headers and libraries." % e)
ImportError: PyZMQ CFFI backend couldn't find zeromq: CompileError: command 'gcc' failed with exit status 1
Please check that you have zeromq headers and libraries.

gns3server crash if virtualbox is not installed

Virtual box is a recommended plugin, not a mandatory requirement for gns3.

how to reproduce the crash:

  1. vboxwrapper is installed
  2. vitualbox is NOT installed
  3. open the gui --> settings --> VirtualBox VMs
[E 140724 10:07:23 base:277] uncaught exception <class 'gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError'>
    Traceback (most recent call last):
      File "/usr/lib/python3.3/site-packages/gns3server/modules/base.py", line 275, in _decode_request
        self.modules[self.name][destination](self, params)
      File "/usr/lib/python3.3/site-packages/gns3server/modules/virtualbox/__init__.py", line 751, in vm_list
        self._start_vbox_service()
      File "/usr/lib/python3.3/site-packages/gns3server/modules/virtualbox/__init__.py", line 134, in _start_vbox_service
        self._vboxwrapper.start()
      File "/usr/lib/python3.3/site-packages/gns3server/modules/virtualbox/vboxwrapper_client.py", line 149, in start
        self.wait_for_vboxwrapper(self._host, self._port)
      File "/usr/lib/python3.3/site-packages/gns3server/modules/virtualbox/vboxwrapper_client.py", line 170, in wait_for_vboxwrapper
        last_exception))
    gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError: Couldn't connect to vboxwrapper on 127.0.0.1:11525 :[Errno 111] Connection refused
[I 140724 10:07:23 base:218] ZeroMQ client (virtualbox) sending JSON-RPC custom error: uncaught exception <class 'gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError'>: Couldn't connect to vboxwrapper on 127.0.0.1:11525 :[Errno 111] Connection refused
    Traceback (most recent call last):
      File "/usr/lib/python3.3/site-packages/gns3server/modules/base.py", line 275, in _decode_request
        self.modules[self.name][destination](self, params)
      File "/usr/lib/python3.3/site-packages/gns3server/modules/virtualbox/__init__.py", line 751, in vm_list
        self._start_vbox_service()
      File "/usr/lib/python3.3/site-packages/gns3server/modules/virtualbox/__init__.py", line 134, in _start_vbox_service
        self._vboxwrapper.start()
      File "/usr/lib/python3.3/site-packages/gns3server/modules/virtualbox/vboxwrapper_client.py", line 149, in start
        self.wait_for_vboxwrapper(self._host, self._port)
      File "/usr/lib/python3.3/site-packages/gns3server/modules/virtualbox/vboxwrapper_client.py", line 170, in wait_for_vboxwrapper
        last_exception))
    gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError: Couldn't connect to vboxwrapper on 127.0.0.1:11525 :[Errno 111] Connection refused
     for call id 74938726-3729-4178-8ecc-181055e71f88

gns3 should account for the possibility of not having virtual box and display an error (even disable the virtual box section in the settings) instead of crashing

Cannot start IOU devices since version 1.0a3.dev2

When trying to start an IOU device, the following errors are present in the logs and routers stay down:

[I 140427 19:36:00 iou_device:227] IOU Dallas [id=4]: iouyap path set to /usr/local/bin/iouyap
[I 140427 19:36:00 iou_device:204] IOU Dallas [id=4]: iourc file path set to /tmp/tmpirhck_cf
[E 140427 19:36:00 base:260] uncaught exception <class 'NameError'>
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
self.modules[self.name][destination](self, params)
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/init.py", line 436, in vm_start
iou_instance.start()
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
if not os.path.isfile(iou_path):
NameError: name 'iou_path' is not defined
[I 140427 19:36:00 base:213] ZeroMQ client (iou) sending JSON-RPC custom error: uncaught exception <class 'NameError'>: name 'iou_path' is not defined
Traceback (most recent call last):

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
    self.modules[self.name][destination](self, params)

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/__init__.py", line 436, in vm_start
    iou_instance.start()

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
    if not os.path.isfile(iou_path):

NameError: name 'iou_path' is not defined
 for call id f879eec2-9335-47f6-b60e-ea670889a50e

[I 140427 19:36:00 iou_device:227] IOU New_York [id=3]: iouyap path set to /usr/local/bin/iouyap
[I 140427 19:36:00 iou_device:204] IOU New_York [id=3]: iourc file path set to /tmp/tmpirhck_cf
[E 140427 19:36:00 base:260] uncaught exception <class 'NameError'>
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
self.modules[self.name][destination](self, params)
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/init.py", line 436, in vm_start
iou_instance.start()
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
if not os.path.isfile(iou_path):
NameError: name 'iou_path' is not defined
[I 140427 19:36:00 base:213] ZeroMQ client (iou) sending JSON-RPC custom error: uncaught exception <class 'NameError'>: name 'iou_path' is not defined
Traceback (most recent call last):

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
    self.modules[self.name][destination](self, params)

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/__init__.py", line 436, in vm_start
    iou_instance.start()

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
    if not os.path.isfile(iou_path):

NameError: name 'iou_path' is not defined
 for call id c946bab5-b68e-4880-85d7-6d719a3b7e4e

[E 140427 19:36:00 iou_device:278] error while starting Dallas: uncaught exception <class 'NameError'>: name 'iou_path' is not defined
Traceback (most recent call last):

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
    self.modules[self.name][destination](self, params)

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/__init__.py", line 436, in vm_start
    iou_instance.start()

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
    if not os.path.isfile(iou_path):

NameError: name 'iou_path' is not defined

[I 140427 19:36:00 iou_device:227] IOU Chicago [id=2]: iouyap path set to /usr/local/bin/iouyap
[I 140427 19:36:00 iou_device:204] IOU Chicago [id=2]: iourc file path set to /tmp/tmpirhck_cf
[E 140427 19:36:00 base:260] uncaught exception <class 'NameError'>
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
self.modules[self.name][destination](self, params)
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/init.py", line 436, in vm_start
iou_instance.start()
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
if not os.path.isfile(iou_path):
NameError: name 'iou_path' is not defined
[I 140427 19:36:00 base:213] ZeroMQ client (iou) sending JSON-RPC custom error: uncaught exception <class 'NameError'>: name 'iou_path' is not defined
Traceback (most recent call last):

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
    self.modules[self.name][destination](self, params)

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/__init__.py", line 436, in vm_start
    iou_instance.start()

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
    if not os.path.isfile(iou_path):

NameError: name 'iou_path' is not defined
 for call id a7ad9590-3867-4b61-b255-fc731b403e87

[I 140427 19:36:00 iou_device:227] IOU Los_Angeles [id=1]: iouyap path set to /usr/local/bin/iouyap
[I 140427 19:36:00 iou_device:204] IOU Los_Angeles [id=1]: iourc file path set to /tmp/tmpirhck_cf
[E 140427 19:36:00 base:260] uncaught exception <class 'NameError'>
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
self.modules[self.name][destination](self, params)
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/init.py", line 436, in vm_start
iou_instance.start()
File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
if not os.path.isfile(iou_path):
NameError: name 'iou_path' is not defined
[I 140427 19:36:00 base:213] ZeroMQ client (iou) sending JSON-RPC custom error: uncaught exception <class 'NameError'>: name 'iou_path' is not defined
Traceback (most recent call last):

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
    self.modules[self.name][destination](self, params)

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/__init__.py", line 436, in vm_start
    iou_instance.start()

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
    if not os.path.isfile(iou_path):

NameError: name 'iou_path' is not defined
 for call id 032f6945-58ce-494f-ac2c-16e79aa20a95

[E 140427 19:36:00 iou_device:278] error while starting New_York: uncaught exception <class 'NameError'>: name 'iou_path' is not defined
Traceback (most recent call last):

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
    self.modules[self.name][destination](self, params)

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/__init__.py", line 436, in vm_start
    iou_instance.start()

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
    if not os.path.isfile(iou_path):

NameError: name 'iou_path' is not defined

[E 140427 19:36:00 iou_device:278] error while starting Chicago: uncaught exception <class 'NameError'>: name 'iou_path' is not defined
Traceback (most recent call last):

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
    self.modules[self.name][destination](self, params)

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/__init__.py", line 436, in vm_start
    iou_instance.start()

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
    if not os.path.isfile(iou_path):

NameError: name 'iou_path' is not defined

[E 140427 19:36:00 iou_device:278] error while starting Los_Angeles: uncaught exception <class 'NameError'>: name 'iou_path' is not defined
Traceback (most recent call last):

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
    self.modules[self.name][destination](self, params)

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/__init__.py", line 436, in vm_start
    iou_instance.start()

  File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/iou_device.py", line 417, in start
    if not os.path.isfile(iou_path):

NameError: name 'iou_path' is not defined

Server crash when gui is quitted

if you run gns3, and close the gui (clicking on te X button or using file --> quit) the server crashes showing the following traceback

Traceback (most recent call last):
File "/usr/lib64/python3.3/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.3/site-packages/gns3server/modules/base.py", line 128, in run
self._ioloop.start()
File "/usr/lib64/python3.3/site-packages/zmq/eventloop/ioloop.py", line 315, in start
event_pairs = self._impl.poll(poll_timeout)
File "/usr/lib64/python3.3/site-packages/zmq/eventloop/ioloop.py", line 615, in poll
z_events = self._poller.poll(1000*timeout)
File "/usr/lib64/python3.3/site-packages/zmq/sugar/poll.py", line 97, in poll
return zmq_poll(list(self.sockets.items()), timeout=timeout)
File "_poll.pyx", line 116, in zmq.core._poll.zmq_poll (zmq/core/_poll.c:1598)
File "checkrc.pxd", line 11, in zmq.core.checkrc._check_rc (zmq/core/_poll.c:1796)
File "/usr/lib/python3.3/site-packages/gns3server/modules/base.py", line 115, in signal_handler
self.stop()
File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/init.py", line 118, in stop
IModule.stop(self) # this will stop the I/O loop
File "/usr/lib/python3.3/site-packages/gns3server/modules/base.py", line 141, in stop
self._ioloop.add_callback_from_signal(self._ioloop.stop)
AttributeError: 'IOLoop' object has no attribute 'add_callback_from_signal'

At times , the Gui just freezes and doesn't close. Testing on Fedora 20 with Tornado 3.1.1

Unable to Re-Open New Projects

In Beta 4, after creating a new project and saving it, when attempting to reopen the file, the following error is shown in the console:

PLEASE REPORT ON http://forum.gns3.net/development-f14.html OR http://github.com/GNS3/gns3-gui/issues

Traceback (most recent call last):
  File "./gns3-gui\gns3\main_window.py", line 399, in _openProjectActionSlot
  File "./gns3-gui\gns3\main_window.py", line 1223, in loadProject
  File "./gns3-gui\gns3\topology.py", line 486, in load
TypeError: getRemoteServer() missing 1 required positional argument: 'ca_file'

Traceback (most recent call last):
  File "./gns3-gui\gns3\main_window.py", line 399, in _openProjectActionSlot
  File "./gns3-gui\gns3\main_window.py", line 1223, in loadProject
  File "./gns3-gui\gns3\topology.py", line 486, in load
TypeError: getRemoteServer() missing 1 required positional argument: 'ca_file'

I am running using a "Remote Server" environment.

UBUNTU Not listening port 8000 unexpected keyword argument 'max_buffer_size'

GNS3 server version 1.0a2.dev2
Copyright (c) 2007-2014 GNS3 Technologies Inc.
Running with Python 3.3.2 and has PID 26197
[W 140411 11:06:01 config:82] no configuration file could be found or read
[I 140411 11:06:01 base:122] dynamips module running with PID 26199
[W 140411 11:06:01 init:72] iouyap binary couldn't be found!
[I 140411 11:06:01 base:75] ZeroMQ client (dynamips) connecting to 127.0.0.1:39781
[I 140411 11:06:01 server:197] ZeroMQ server listening to 127.0.0.1:39781
[I 140411 11:06:01 base:122] iou module running with PID 26202
Starting server on 0.0.0.0:8000
[I 140411 11:06:01 base:75] ZeroMQ client (iou) connecting to 127.0.0.1:39781
Traceback (most recent call last):
File "/usr/local/bin/gns3server", line 9, in
load_entry_point('gns3-server==1.0a2.dev2', 'console_scripts', 'gns3server')()
File "/usr/local/lib/python3.3/dist-packages/gns3_server-1.0a2.dev2-py3.3.egg/gns3server/main.py", line 67, in main
server.run()
File "/usr/local/lib/python3.3/dist-packages/gns3_server-1.0a2.dev2-py3.3.egg/gns3server/server.py", line 142, in run
max_buffer_size=524288000) # 500 MB file upload limit
File "/usr/lib/python3/dist-packages/tornado/web.py", line 1288, in listen
server = HTTPServer(self, *_kwargs)
File "/usr/lib/python3/dist-packages/tornado/httpserver.py", line 142, in init
*_kwargs)
TypeError: init() got an unexpected keyword argument 'max_buffer_size'

Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy

Packages:
ii python3-tornado 2.4.1-3 all scalable, non-blocking web server and tools - Python 3 package
ii python3-zmq 13.1.0-1 amd64 Python3 bindings for 0MQ library

Opening a Test Project has these error messages in the console.

GNS3 management console. Running GNS3 Early Release (ER) version 1.0a3.dev2.
Copyright (c) 2006-2014 GNS3 Project.

=> Server error [-3200] from 127.0.0.1:8000: IOU1: uncaught exception <class 'KeyError'>: 'startup_config'
Traceback (most recent call last):

File "/usr/lib/python3.4/site-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
self.modules[self.name][destination](self, params)

File "/usr/lib/python3.4/site-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/init.py", line 393, in iou_update
iou_instance.startup_config = response["startup_config"]

KeyError: 'startup_config'

Server error [-3200] from 127.0.0.1:8000: IOU2: uncaught exception <class 'KeyError'>: 'startup_config'
Traceback (most recent call last):

File "/usr/lib/python3.4/site-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/base.py", line 258, in _decode_request
self.modules[self.name][destination](self, params)

File "/usr/lib/python3.4/site-packages/gns3_server-1.0a3.dev2-py3.4.egg/gns3server/modules/iou/init.py", line 393, in iou_update
iou_instance.startup_config = response["startup_config"]

KeyError: 'startup_config'

Here is a Picture of the Config.

http://i.imgur.com/tpCZclW.png

GNS Filter Problem

I am using GNS3. And it installed Wireshark 1.12.1.

I created a Ethernet Switch, and two VPCs. I correctly configured them and they're ping-ing too. But when I want to capture traffic of for instance the switch and a VPC, I get a Server error [-3200] from 127.0.0.1:8081: SW1: Failed to setup filter

What could be the error? How do I debug it?

can not start one IDS equipment.

Add one IDS equipment with hda and hdb .
But when start it , nothing happen except the light get green.
We know that IDS and ASA both use qemu, but ASA 8.4,2 is OK, When start ASA , We can use the system monitor see the qemu process with several arguments just like:
/usr/bin/qemu-system-x86_64 -name asa8421 -m 1024 -hda ......
But when start one IDS, the monitor only show one process "qemu-system-x86 " no path, no arguments and even the name is not the "qemu-system-x86_64"
image
I don't know if the problem of can not start the IDS is because of this.

My version is GNS3 1.2.dev2
Ubuntu 14.10
Thank you

.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable). warnings.warn(msg, UserWarning)

Hi,

Since the Beta was released I decided to give this a shot on the new CentOS 7.X linux distribution. I got everything installed, all the pre-req's. When I run gns3server from the command line this is what I get, now i'm not sure if this is normal of if this is a major issue in the functioning of GNS3. Please advise.

[cnetworks-admin@localhost gns3-server]$ gns3server
GNS3 server version 1.0beta1
Copyright (c) 2007-2014 GNS3 Technologies Inc.
Running with Python 3.4.1 and has PID 13090
[I 140724 18:29:35 main:75] current locale is en_CA.UTF-8
[W 140724 18:29:35 config:82] no configuration file could be found or read
[I 140724 18:29:35 base:131] dynamips module running with PID 13092
[W 140724 18:29:35 init:77] VPCS binary couldn't be found!
[I 140724 18:29:35 base:84] ZeroMQ client (dynamips) connecting to 127.0.0.1:57597
[I 140724 18:29:35 base:131] vpcs module running with PID 13095
[I 140724 18:29:35 base:84] ZeroMQ client (vpcs) connecting to 127.0.0.1:57597
[I 140724 18:29:35 base:131] virtualbox module running with PID 13098
[W 140724 18:29:35 init:82] iouyap binary couldn't be found!
[I 140724 18:29:35 base:84] ZeroMQ client (virtualbox) connecting to 127.0.0.1:57597
[I 140724 18:29:35 server:223] ZeroMQ server listening to 127.0.0.1:57597
[I 140724 18:29:35 base:131] iou module running with PID 13101
[I 140724 18:29:35 base:84] ZeroMQ client (iou) connecting to 127.0.0.1:57597
/usr/local/lib/python3.4/site-packages/pkg_resources.py:1049: UserWarning: /home/cnetworks-admin/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
Starting server on 0.0.0.0:8000 (Tornado v4.0, PyZMQ v14.3.1, ZMQ v4.0.4)

1.0 alpha 5 breaks VPCs

this traceback is shown trying to start vpcs using 1.0 alpha 5 (it was working yesterday , so it should be a recent change)

[I 140522 10:25:27 vpcs_device:346] logging to /root/Documents/GNS3/projects/gns3-pz41z7/vpcs/pc-1/vpcs.log
[E 140522 10:25:27 base:272] uncaught exception <class 'UnboundLocalError'>
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/gns3server/modules/base.py", line 270, in _decode_request
self.modules[self.name][destination](self, params)
File "/usr/lib/python3.3/site-packages/gns3server/modules/vpcs/init.py", line 396, in vm_start
vpcs_instance.start()
File "/usr/lib/python3.3/site-packages/gns3server/modules/vpcs/vpcs_device.py", line 354, in start
creationflags=flags)
UnboundLocalError: local variable 'flags' referenced before assignment
[I 140522 10:25:27 base:213] ZeroMQ client (vpcs) sending JSON-RPC custom error: uncaught exception <class 'UnboundLocalError'>: local variable 'flags' referenced before assignment
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/gns3server/modules/base.py", line 270, in _decode_request
self.modules[self.name][destination](self, params)
File "/usr/lib/python3.3/site-packages/gns3server/modules/vpcs/init.py", line 396, in vm_start
vpcs_instance.start()
File "/usr/lib/python3.3/site-packages/gns3server/modules/vpcs/vpcs_device.py", line 354, in start
creationflags=flags)
UnboundLocalError: local variable 'flags' referenced before assignment

Could not connect to the local server 127.0.0.1 on port 8000: Websocket exception <class 'ws4py.exc.HandshakeError'>: Invalid response status: b'403' b'Forbidden'

Just upgraded my Arch box to the GNS3 Beta and now get the following error when trying to run GNS3:

Could not connect to the local server 127.0.0.1 on port 8000: Websocket exception <class 'ws4py.exc.HandshakeError'>: Invalid response status: b'403' b'Forbidden'.

Not had any issues like this in the past with any of the Alpha's, is there a new process for the updates that involves permissions changes somewhere or is something in the release broken?

Logging messages on Windows

When launching the server using cmd.exe:

←[32m2015-02-27 00:25:02 INFO main.py:143←[0m GNS3 server version 1.3.dev1←[0m
←[32m2015-02-27 00:25:02 INFO main.py:145←[0m Copyright (c) 2007-2015 GNS3 Techn
ologies Inc.←[0m
←[32m2015-02-27 00:25:02 INFO main.py:158←[0m Running with Python 3.4.2 and has
PID 2948←[0m
←[32m2015-02-27 00:25:02 INFO server.py:189←[0m Starting server on 127.0.0.1:800
0←[0m

We shouldn't try to color the logs on Windows.

vpcs -i is an unsupported option

while testing vpcs support just enabled i noticed that vpcs is started with the option "-i" i checked the code and found withing gns3server/modules/vpcs/vpcs_device.py that you got somewhere that the -i option is supported by vpcs ...

[root@localhost ~]# cat /tmp/gns3-qth04g-files/vpcs/pc-1/vpcs.log
/usr/bin/vpcs: invalid option -- 'i'

i'm not sure what version you are running there, but the latest released vpcs 0.5b0 , doesn't support that feature

[root@localhost ~]# vpcs -p 6001 -s 30001 -c 10001 -t 127.0.0.1 -m 1 -i 1 -F /opt/gns3/vpcs.txt
vpcs: invalid option -- 'i'

Welcome to Virtual PC Simulator, version 0.5b0
Dedicated to Daling.
Build time: May 11 2014 15:14:59
Copyright (c) 2007-2013, Paul Meng ([email protected])
All rights reserved.

VPCS is free software, distributed under the terms of the "BSD" licence.
Source code and license can be found at vpcs.sf.net.
For more information, please visit wiki.freecode.com.cn.

usage: vpcs [options] [scriptfile]
Option:
-h print this help then exit
-v print version information then exit

-p port    run as a daemon listening on the tcp 'port'
-m num     start byte of ether address, default from 0
-r file    load and execute script file
           compatible with older versions, DEPRECATED.

-e         tap mode, using /dev/tapx (linux only)
-u         udp mode, default

udp mode options:
-s port local udp base port, default from 20000
-c port remote udp base port (dynamips udp port), default from 30000
-t ip remote host IP, default 127.0.0.1

hypervisor mode option:
-H port run as the hypervisor listening on the tcp 'port'

If no 'scriptfile' specified, vpcs will read and execute the file named
'startup.vpc' if it exsits in the current directory.

IOU stop

If I start an IOU process and then stop it using the GUI I get the following error:

2015-02-25 18:31:03 ERROR base_events.py:698 Exception in callback <bound method SubprocessStreamProtocol.process_exited of <asyncio.subprocess.SubprocessStreamProtocol object at 0x7f81cc383dd8>>()
handle: Handle(<bound method SubprocessStreamProtocol.process_exited of <asyncio.subprocess.SubprocessStreamProtocol object at 0x7f81cc383dd8>>, ())
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/events.py", line 39, in _run
    self._callback(*self._args)
  File "/usr/lib/python3.4/asyncio/subprocess.py", line 80, in process_exited
    waiter.set_result(returncode)
  File "/usr/lib/python3.4/asyncio/futures.py", line 298, in set_result
    raise InvalidStateError('{}: {!r}'.format(self._state, self))
asyncio.futures.InvalidStateError: CANCELLED: Future<CANCELLED>

Software Fault message on OSX

Used the alpha 6 DMG running on Mavericks. I only have one router (c7200) in the project. I went through the idle-pc process but all other router settings are default.

I started R1, went into the console and verified I got the prompt. I then stopped and started R1 (not reload), and got the message when I went back to the console. Subsequent reboots gets the same message.

I had the release version of GNS3 in the /Applications folder and I replaced it with the alpha.

This is my first report so let me know if you need additional information.

Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 12.4(24)T, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2009 by Cisco Systems, Inc.
Compiled Thu 26-Feb-09 00:31 by prod_rel_team



 : TLB (store) exception, CPU signal 10, PC = 0x6000D0A0



--------------------------------------------------------------------
   Possible software fault. Upon reccurence,  please collect
   crashinfo, "show tech" and contact Cisco Technical Support.
--------------------------------------------------------------------



 : TLB (load or instruction fetch) exception, CPU signal 10, PC = 0x60042C64



--------------------------------------------------------------------
   Possible software fault. Upon reccurence,  please collect
   crashinfo, "show tech" and contact Cisco Technical Support.
--------------------------------------------------------------------


-Traceback= 
$0 : 00000000, AT : 65B20000, v0 : 00000000, v1 : 00000000
a0 : 00000038, a1 : 7CFFFFA8, a2 : 65EE0000, a3 : 00000000
t0 : 00000020, t1 : 00000038, t2 : 00000000, t3 : FFFF00FF
t4 : 606C5998, t5 : 00000000, t6 : 6424034C, t7 : 00000000
s0 : 00000000, s1 : 6000D0A0, s2 : 65310000, s3 : 00000001
s4 : 64240000, s5 : 65515278, s6 : 65510000, s7 : 0000000D
t8 : 00000000, t9 : 00000000, k0 : 65F545B8, k1 : 00000000
gp : 65B233C0, sp : 655151E8, s8 : 00000034, ra : 60042C2C
EPC  : 60042C64, ErrorEPC : 00000000, SREG     : 34008003
MDLO : 00000000, MDHI     : 00000006, BadVaddr : 00000040
CacheErr : 00000000, DErrAddr0 : 00000000, DErrAddr1 : 00000000
TEXT_START : 0x600089D4
DATA_START : 0x63D9C000
Cause 00000008 (Code 0x2): TLB (load or instruction fetch) exception

Nested write_crashinfo call (2 times)


 : TLB (load or instruction fetch) exception, CPU signal 10, PC = 0x60042C64



--------------------------------------------------------------------
   Possible software fault. Upon reccurence,  please collect
   crashinfo, "show tech" and contact Cisco Technical Support.
--------------------------------------------------------------------


-Traceback= 
$0 : 00000000, AT : 65B20000, v0 : 00000000, v1 : 00000000
a0 : 00000038, a1 : 7CFFFFA8, a2 : 65EE0000, a3 : 00000000
t0 : 00000020, t1 : 00000038, t2 : 00000000, t3 : FFFF00FF
t4 : 606C5998, t5 : 00000000, t6 : 6424034C, t7 : 00000000
s0 : 00000000, s1 : 6000D0A0, s2 : 65310000, s3 : 00000001
s4 : 64240000, s5 : 65515278, s6 : 65510000, s7 : 0000000D
t8 : 00000000, t9 : 00000000, k0 : 65F545B8, k1 : 00000000
gp : 65B233C0, sp : 655151E8, s8 : 00000034, ra : 60042C2C
EPC  : 60042C64, ErrorEPC : 00000000, SREG     : 34008003
MDLO : 00000000, MDHI     : 00000006, BadVaddr : 00000040
CacheErr : 00000000, DErrAddr0 : 00000000, DErrAddr1 : 00000000
TEXT_START : 0x600089D4
DATA_START : 0x63D9C000
Cause 00000008 (Code 0x2): TLB (load or instruction fetch) exception

-Traceback= 


=== Flushing messages () ===

!!! WARNING - VM is not running, will be unresponsive (status=1) !!!

EDIT: forgot to mention that I'm running alpha 6.

vboxwrapper error

Traceback (most recent call last):
  File "/usr/lib/python3.3/site-packages/gns3_server-1.0beta1-py3.3.egg/gns3server/modules/base.py", line 275, in _decode_request
    self.modules[self.name][destination](self, params)
  File "/usr/lib/python3.3/site-packages/gns3_server-1.0beta1-py3.3.egg/gns3server/modules/virtualbox/__init__.py", line 751, in vm_list
    self._start_vbox_service()
  File "/usr/lib/python3.3/site-packages/gns3_server-1.0beta1-py3.3.egg/gns3server/modules/virtualbox/__init__.py", line 134, in _start_vbox_service
    self._vboxwrapper.start()
  File "/usr/lib/python3.3/site-packages/gns3_server-1.0beta1-py3.3.egg/gns3server/modules/virtualbox/vboxwrapper_client.py", line 149, in start
    self.wait_for_vboxwrapper(self._host, self._port)
  File "/usr/lib/python3.3/site-packages/gns3_server-1.0beta1-py3.3.egg/gns3server/modules/virtualbox/vboxwrapper_client.py", line 170, in wait_for_vboxwrapper
    last_exception))
gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError: Couldn't connect to vboxwrapper on 127.0.0.1:11525 :[Errno 111] Connection refused
 for call id a53df9fc-2427-4b16-a959-c9fcee279a6d

Port PyXPCOM to Python3 [$1000]

GNS3 is written in Python3 and cannot directly use the VirtualBox API on UNIX platforms because the API relies on XPCOM to control VirtualBox. The current workaround is to use vboxwrapper running on Python2 but eventually we want to get rid of that redundant layer.

More info on PyXPCOM: https://developer.mozilla.org/en/docs/Building_PyXPCOM

We offer a $1000 bounty to anyone who successful port PyXPCOM to Python3.

user behind NAT, when using remote server, cause unidirectional communication

Scenario:

Typical home user, computer assigned rfc 1918 ip address and internet reachability is achieved by NAT on provider's home router. For this example, home user has ip 192.168.0.1 natted to 32.32.32.32

192.168.0.1 <--> 32.32.32.32

Home user is running GNS3 gui.

A remote GNS3-Server is being used, the server exist somewhere on the internet.

remote server for this example has ip address 123.1.2.3

If the user connects a device running on a remote server, with a device running on a local server ( for example an ethernet switch/hub or frame-relay switch or any device that is running on the local server) , the NIO UDP is created.

in the direction LOCAL TO REMOTE, since we are behind NAT and we use the server outside global ip address we have reachability. the local UDP tunnel infact points to 123.1.2.3

This unidirectional communication is achieved without problems.

on the remote side instead, the tunnel is created to the inside local (192.168.0.1) ip address, therefore this traffic flow is lost.

the remote server, has no reachability to 192.168.0.1. the server should build the tunnel to the outside global ip address of the gui user (32.32.32.32).

This present a complex and not easy problem to solve.

Nodes behind a NAT are only reachable through the NAT's public address and in most cases only after the appropriate mapping state is set up in the NAT. A NAT traversal mechanism or other means, is needed to make gns3 components communicate when a NAT exist somewhere..

first of all we need to be sure we use the outside global ip address, and we can do this by comparing the local server "\GET version and IP" with the remote one ..

this is very long and requires a lot of thoughts and a much more deep discussion

No keep-alives between client and server

Not sure if this needs to be logged against the client or server - let me know if it needs to be moved.

Using gns3server on a remote server with the connection via a firewall, no keep-alives are sent. This causes the firewall to identify the session as stale and close it. Further updates requested via the GUI no longer reach the server.
Can a keep-alive be sent between the client/server to ensure that the TCP session stays up.

Traceback with VirtualBox and GNS3 1.2.3

I have Virtual Box installed on CentOS 7.X, and have GNS installed on Windows.
My setup.

Windows 8.1 (GNS3 Client ONLY)
CentOS 7.X (GNS3 Server ONLY)

When try to view the list of VM's i get the following traceback

Jan 30 15:29:38 gns3-iouvm gns3server: [E 150130 15:29:38 base:278] uncaught exception <class 'AttributeError'>
Jan 30 15:29:38 gns3-iouvm gns3server: Traceback (most recent call last):
Jan 30 15:29:38 gns3-iouvm gns3server: File "/usr/local/lib/python3.4/site-packages/gns3_server-1.2.3-py3.4.egg/gns3server/modules/base.py", line 276, in _decode_request
Jan 30 15:29:38 gns3-iouvm gns3server: self.modules[self.name][destination](self, params)
Jan 30 15:29:38 gns3-iouvm gns3server: File "/usr/local/lib/python3.4/site-packages/gns3_server-1.2.3-py3.4.egg/gns3server/modules/virtualbox/init.py", line 765, in vm_list
Jan 30 15:29:38 gns3-iouvm gns3server: result = self._execute_vboxmanage(vbox_user, command)
Jan 30 15:29:38 gns3-iouvm gns3server: File "/usr/local/lib/python3.4/site-packages/gns3_server-1.2.3-py3.4.egg/gns3server/modules/virtualbox/init.py", line 730, in _execute_vboxmanage
Jan 30 15:29:38 gns3-iouvm gns3server: if not user.strip() or sys.platform.startswith("win"):
Jan 30 15:29:38 gns3-iouvm gns3server: AttributeError: 'NoneType' object has no attribute 'strip'
Jan 30 15:29:38 gns3-iouvm gns3server: [I 150130 15:29:38 base:219] ZeroMQ client (virtualbox) sending JSON-RPC custom error: uncaught exception <class 'AttributeError'>: 'NoneType' object has no attribute 'strip'
Jan 30 15:29:38 gns3-iouvm gns3server: Traceback (most recent call last):
Jan 30 15:29:38 gns3-iouvm gns3server: File "/usr/local/lib/python3.4/site-packages/gns3_server-1.2.3-py3.4.egg/gns3server/modules/base.py", line 276, in _decode_request
Jan 30 15:29:38 gns3-iouvm gns3server: self.modules[self.name][destination](self, params)
Jan 30 15:29:38 gns3-iouvm gns3server: File "/usr/local/lib/python3.4/site-packages/gns3_server-1.2.3-py3.4.egg/gns3server/modules/virtualbox/init.py", line 765, in vm_list
Jan 30 15:29:38 gns3-iouvm gns3server: result = self._execute_vboxmanage(vbox_user, command)
Jan 30 15:29:38 gns3-iouvm gns3server: File "/usr/local/lib/python3.4/site-packages/gns3_server-1.2.3-py3.4.egg/gns3server/modules/virtualbox/init.py", line 730, in _execute_vboxmanage
Jan 30 15:29:38 gns3-iouvm gns3server: if not user.strip() or sys.platform.startswith("win"):
Jan 30 15:29:38 gns3-iouvm gns3server: AttributeError: 'NoneType' object has no attribute 'strip'
Jan 30 15:29:38 gns3-iouvm gns3server: for call id 8cc68aaf-6ec7-4051-a83e-9b05e2a9f8c4

IOU sessions disconnects and device needs to be restarted

When the issue described in the title occurs, the server shows the following:

[I 140524 19:06:36 ioucon:339] Telnet client disconnected
Exception in thread Thread-9:
Traceback (most recent call last):
  File "/usr/lib64/python3.3/threading.py", line 637, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.3/threading.py", line 594, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/ioucon.py", line 613, in start_ioucon
    send_recv_loop(console, router, b'', stop_event)
  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/ioucon.py", line 531, in send_recv_loop
    router.write(buf)
  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/ioucon.py", line 384, in write
    self.fd.send(buf)
BlockingIOError: [Errno 11] Resource temporarily unavailable

[I 140524 19:06:36 ioucon:339] Telnet client disconnected
Exception in thread Thread-8:
Traceback (most recent call last):
  File "/usr/lib64/python3.3/threading.py", line 637, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.3/threading.py", line 594, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/ioucon.py", line 613, in start_ioucon
    send_recv_loop(console, router, b'', stop_event)
  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/ioucon.py", line 531, in send_recv_loop
    router.write(buf)
  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/ioucon.py", line 384, in write
    self.fd.send(buf)
BlockingIOError: [Errno 11] Resource temporarily unavailable

[I 140524 19:06:36 ioucon:339] Telnet client disconnected
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib64/python3.3/threading.py", line 637, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.3/threading.py", line 594, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/ioucon.py", line 613, in start_ioucon
    send_recv_loop(console, router, b'', stop_event)
  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/ioucon.py", line 531, in send_recv_loop
    router.write(buf)
  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/ioucon.py", line 384, in write
    self.fd.send(buf)
BlockingIOError: [Errno 11] Resource temporarily unavailable

add daemon capabilities.

GNS3-server is ment to run standalone (without gui) on a remote server.

as of now, gns3-server is not able to run as a daemon or service.

this feature should be implemented if we really want to have a client/server application

Create a changelog

As pointed out by lintian (debian package checker):

P: gns3-server: no-upstream-changelog

When the gns3server startup with system boot via upstart scrip, the qemu only can use "-nographic"

/etc/init/upstart-gns3server.conf:

description "GNS3 Server"

start on runlevel [2345]
stop on runlevel [!2345]
respawn

setuid wolfboy
exec /usr/local/bin/gns3server


when I did like above, the gns3server can startup with system boot. so we can use this for remote server.
but at this time ,when I want to use its local GNS3, if qemu without "-nographic", the qemu equipment can not start. and see the task manager of ubuntu , can see one process "qemu-system-x86" with nothing.
If use initctl stop upstart-gns3server to stop gns3server, then start GNS3 gui, the phenomenon disappeard. At this time we can see the SDL screen.
I don't know if it is a bug for sure.

VPCS config

Should we have the VPCS config as a relative path in the project file like it is IOU and Dynamips (for consistency)?

closing the gui without stopping an IOU device makes the server crash

[root@localhost ~]# pip-python3 freeze | grep pyzmq
pyzmq==14.2.0

[root@localhost ~]# pip-python3 freeze | grep jsonschema
jsonschema==2.3.0

Steps to reproduce:

start gns3, put in a dynamips router and an IOU one. Connect them (a single link is enough).
start the topology.
Close GNS3 without stopping the topology first, clicking the X button and then clicking on discard.

gns3 will close and the server crash with this traceback

[E 140430 14:54:19 base:260] uncaught exception <class 'ValueError'>
Traceback (most recent call last):
File "/usr/lib/python3.3/site-packages/gns3server/modules/base.py", line 258, in _decode_request
self.modules[self.name][destination](self, params)
File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/init.py", line 174, in reset
iou_instance.delete()
File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/iou_device.py", line 300, in delete
self._instances.remove(self._id)
ValueError: list.remove(x): x not in list
[I 140430 14:54:19 base:213] ZeroMQ client (iou) sending JSON-RPC custom error: uncaught exception <class 'ValueError'>: list.remove(x): x not in list
Traceback (most recent call last):

  File "/usr/lib/python3.3/site-packages/gns3server/modules/base.py", line 258, in _decode_request
    self.modules[self.name][destination](self, params)

  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/__init__.py", line 174, in reset
    iou_instance.delete()

  File "/usr/lib/python3.3/site-packages/gns3server/modules/iou/iou_device.py", line 300, in delete
    self._instances.remove(self._id)

ValueError: list.remove(x): x not in list
 for call id None

[I 140430 14:54:19 base:133] iou module has stopped

Stop on non running Qemu trigger an error

[E 150225 15:21:18 qemu_vm:304] error while stopping BigRam-1: Traceback (most recent call last):
      File "/Users/noplay/code/gns3/gns3-server/gns3server/web/route.py", line 129, in control_schema
        yield from func(request, response)
      File "/Users/noplay/code/gns3/gns3-server/gns3server/handlers/api/qemu_handler.py", line 173, in stop
        yield from vm.stop()
      File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/coroutines.py", line 141, in coro
        res = func(*args, **kw)
      File "/Users/noplay/code/gns3/gns3-server/gns3server/modules/qemu/qemu_vm.py", line 596, in stop
        self._process.terminate()
      File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/subprocess.py", line 133, in terminate
        self._check_alive()
      File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/subprocess.py", line 126, in _check_alive
        raise ProcessLookupError()
    ProcessLookupError

Loading a topology creates multiple projects

Each node in the topology created a new instance of Project() which led to inconsistencies like the self._vms of Project() not containing all the nodes in the project which led to other major issues.

I have fixed that for now, however I think we should prevent a user to open a lab if it is already used by the server. I think we will have to change the way projects are dynamically created on the client side if we choose to do this.

https://github.com/GNS3/gns3-server/blob/asyncio/gns3server/modules/project_manager.py#L74

Unable to start router if JIT sharing support is enabled

If you enable JIT support, a router is not started: (i'm running the latest dynamips 0.2.12)

[I 140503 15:01:20 hypervisor_manager:429] JIT sharing support enabled
[I 140503 15:01:23 router:286] router "R1" [id=1] has been deleted
[I 140503 15:01:27 hypervisor_manager:561] creating new hypervisor 0.0.0.0:7201 with working directory /root/Documents/GNS3/projects/gns3-ls7uup.gns3/dynamips
[I 140503 15:01:27 hypervisor:205] starting Dynamips: ['/usr/bin/dynamips', '-N1', '-H', '7201']
[I 140503 15:01:27 hypervisor:208] Dynamips process logging to /tmp/tmpscph2i
[I 140503 15:01:27 hypervisor:213] Dynamips started PID=909
[I 140503 15:01:27 hypervisor_manager:542] Dynamips server ready after 0.0106 seconds
[I 140503 15:01:27 hypervisor_manager:565] hypervisor 0.0.0.0:7201 has successfully started
[I 140503 15:01:27 router:107] router c3725 "R2" [id=2] has been created
[I 140503 15:01:27 router:571] router "R2" [id=2]: RAM updated from 128MB to 192MB
[I 140503 15:01:27 router:433] router "R2" [id=2]: has a new IOS image set: "/opt/gns3/c3725-adventerprisek9-mz.124-15.T14.image"
[I 140503 15:01:27 router:668] router "R2" [id=2]: sparse memory enabled
[I 140503 15:01:27 router:635] router "R2" [id=2]: mmap enabled
[I 140503 15:01:27 base:213] ZeroMQ client (dynamips) sending JSON-RPC custom error: Unknown command 'set_tsg' for call id 98e4f2e2-659c-415b-93cf-0ce2c7d44f19

Uncaught exception when dynamips not in path when connecting to gns3server remotely

Hello,

I setup gns3server on a remote OS X server but forgot to update $PATH to include dynamips. When I connected from my remote gns3 client and tried to configure a router the client raised the following error:

Server error [-3200] : uncaught exception <class 'TypeError'>: stat: can't specify None for path argument
Traceback (most recent call last):
  File "/Users/nick/GNS3/gns3-server/lib/python3.4/site-packages/gns3_server-1.2.3-py3.4.egg/gns3server/modules/base.py", line 276, in _decode_request
    self.modules[self.name][destination](self, params)
  File "/Users/nick/GNS3/gns3-server/lib/python3.4/site-packages/gns3_server-1.2.3-py3.4.egg/gns3server/modules/dynamips/backends/vm.py", line 167, in vm_create
    self.start_hypervisor_manager()
  File "/Users/nick/GNS3/gns3-server/lib/python3.4/site-packages/gns3_server-1.2.3-py3.4.egg/gns3server/modules/dynamips/__init__.py", line 281, in start_hypervisor_manager
    if not os.path.isfile(self._dynamips):
  File "/Users/nick/GNS3/gns3-server/bin/../lib/python3.4/genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: can't specify None for path argument

Both client & server are OS X 10.10.2. Server is running Python 3.4.2

Steps to reproduce.

  1. On Server, install gns3server as per README . Upload router IOS image.
  2. On Client, install GNS3 as normal using drag and drop methodology. Disable local gns3server from running at GUI startup, configure remote server IP address and IOS image.
  3. Start new project, drag router into workspace and observe console.

Steps to fix.

Either symlink dynamips to the same bin directory that gns3server lives in or add dynamips to path.

It looks like this is supposed to be caught on lines 115 -> 126 of dynamips/init.py

cannot change topology when qemu equipment is running,

My OS is Ubuntu 14.10
when one qemu equipment running for example vIOS, I change the link of one port from one device to another just like from one router to another , then can not ping through though the config is right ,
or else, when one qemu equipment is running , I connect it to another router I must shutdown and reopen it for enable the new connect ,
I think at this moment I cannot change topology when qemu equipment is running,
This should be one problem or not ?

Update not completed before another request comes

Bug when changing the RAM setting multiple times and too quickly in the GUI. The Ghost IOS creation cannot be completed before another request to update arrives. The solution might be to have a lock system to prevent this kind of race conditions.

Server error from 127.0.0.1:8000: R4: Traceback (most recent call last):
  File "/home/grossmj/PycharmProjects/gns3-server/gns3server/web/route.py", line 110, in control_schema
    yield from func(request, response)
  File "/home/grossmj/PycharmProjects/gns3-server/gns3server/handlers/dynamips_vm_handler.py", line 109, in update
    yield from dynamips_manager.ghost_ios_support(vm)
  File "/home/grossmj/PycharmProjects/gns3-server/gns3server/modules/dynamips/__init__.py", line 334, in ghost_ios_support
    yield from self._set_ghost_ios(vm)
  File "/home/grossmj/PycharmProjects/gns3-server/gns3server/modules/dynamips/__init__.py", line 423, in _set_ghost_ios
    yield from ghost.create()
  File "/home/grossmj/PycharmProjects/gns3-server/gns3server/modules/dynamips/nodes/router.py", line 187, in create
    platform=self._platform))
  File "/home/grossmj/PycharmProjects/gns3-server/gns3server/modules/dynamips/dynamips_hypervisor.py", line 291, in send
    chunk = yield from self._reader.read(1024)  # match to Dynamips' buffer size
  File "/usr/lib/python3.4/asyncio/streams.py", line 430, in read
    self._waiter = self._create_waiter('read')
  File "/usr/lib/python3.4/asyncio/streams.py", line 373, in _create_waiter
    'already waiting for incoming data' % func_name)
RuntimeError: read() called while another coroutine is already waiting for incoming data

Virtualbox wrapper issue on OSX

Not sure if this is a GUI or server issue, but the exception is coming from the server.

Installed from DMG, no wrapper script provided in App contents.

m00m00:~ damian$ find /Applications/GNS3.app -iname '*wrapper*'
m00m00:~ damian$ 

GUI states 'Path to the VirtualBox wrapper (Linux/UNIX only), which may or may not mean osx depending on your feelings towards Dawrin.

Could not get the VM list from the server: uncaught exception <class 'gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError'>: No vboxwrapper path has been configured
Traceback (most recent call last):
  File "gns3server/modules/base.pyc", line 275, in _decode_request
  File "gns3server/modules/virtualbox/__init__.pyc", line 751, in vm_list
  File "gns3server/modules/virtualbox/__init__.pyc", line 127, in _start_vbox_service
gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError: No vboxwrapper path has been configured

Installed the wrapper from https://github.com/GNS3/vboxwrapper and it throws the same exception, with the path configured.

IOU on 1.0a6 - Resolved

Having issues with IOU with alpha1.0a6 when dragging on a device. Error:

Could not connect to server 192.168.56.101:8000: GUI version 1.0a6 differs with the server version

I am using the .dmg package uploaded today on a clean install of Mavericks?

[feature-request] - add back cloud bridge support

As per title, one of the features the old gns3 has and the new version doesn't support yet is the cloud device that allows you to bridge the virtual environment with the physical one.

It is extremelly useful, especially now that captures are not yet implemented and for the CICE v5 studies we do need captures. (see GNS3/gns3-gui#39 )

status of QEMU VM is "started" when QEMU VM exits immediately.

From the community: https://community.gns3.com/ideas/1589

When invalid arguments are given, process of qemu starts correctly, and exits immediately.
No output is shown in console, and status of QEMU VM is "started".
Though QEMU VM seems to start correctly, it actually stopped.

You can see this problem, when you set too large memory (on my environment, maximum is 2044MB),
or type error in additional settings (ex. -nographics).

Though GNS3 server checks whether process starts, it does not check whether process is running.
I think it would be better to wait for several seconds, and check process is running.
This is a sample code.

--- qemu_vm.py
+++ qemu_vm.py (working copy)
@@ -868,6 +868,10 @@
                                                      stderr=subprocess.STDOUT,
                                                      cwd=self._working_dir)
                 log.info("QEMU VM instance {} started PID={}".format(self._id, self._process.pid))
+                time.sleep(2)
+                returncode = self._process.poll()
+                if not returncode is None:
+                    raise QemuError("could not start QEMU: invalid arguments or crash immediately.")
                 self._started = True
             except (OSError, subprocess.SubprocessError) as e:
                 stdout = self.read_stdout()

Cannot install latest gns3-server

Debian amd64, stable version install without problems. Problems only withe latest version from git.

$ git clone https://github.com/GNS3/gns3-server.git
Cloning into 'gns3-server'...
remote: Counting objects: 2857, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 2857 (delta 3), reused 0 (delta 0)
Receiving objects: 100% (2857/2857), 1.68 MiB | 719.00 KiB/s, done.
Resolving deltas: 100% (2150/2150), done.
Checking connectivity... done.
$ cd gns3-server/
$ sudo python3 setup.py  install
error in gns3-server setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

Relative Paths to Images Saved in .gns3 File Causes -3200 Error

Possibly the same issue as mentioned in http://forum.gns3.net/topic10962.html and http://forum.gns3.net/topic10418.html

The relative path to the image file is saved in the .gns3 file which causes a '-3200' (could not be found on this server) error when the project is reopened with the server located on a remote machine.

If the gns3 file is manually edited and the absolute path entered for the image file, the project opens successfully.

1.0a2.dev1 - Error handling - Invalid entry in $PATH prevents startup

When an invalid directory is present in $PATH, software will fail to start.

The below error was created by adding /invalid/path to $PATH

User@Host:~> echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/mit/bin:/sbin:/usr/local/sbin:/usr/sbin:/invalid/path

User@Host:~> gns3server 
GNS3 server version 1.0a2.dev1
Copyright (c) 2007-2014 GNS3 Technologies Inc.
Running with Python 3.3.2 and has PID 3208
[W 140403 10:58:14 config:82] no configuration file could be found or read
[I 140403 10:58:14 base:122] dynamips module running with PID 3211
[I 140403 10:58:14 base:75] ZeroMQ client (dynamips) connecting to 127.0.0.1:33104
Traceback (most recent call last):
  File "/usr/bin/gns3server", line 9, in <module>
    load_entry_point('gns3-server==1.0a2.dev1', 'console_scripts', 'gns3server')()
  File "/usr/lib/python3.3/site-packages/gns3_server-1.0a2.dev1-py3.3.egg/gns3server/main.py", line 70, in main
    server.load_modules()
  File "/usr/lib/python3.3/site-packages/gns3_server-1.0a2.dev1-py3.3.egg/gns3server/server.py", line 118, in load_modules
    temp_dir=self._temp_dir)
  File "/usr/lib/python3.3/site-packages/gns3_server-1.0a2.dev1-py3.3.egg/gns3server/modules/iou/__init__.py", line 64, in __init__
    if "iouyap" in os.listdir(path) and os.access(os.path.join(path, "iouyap"), os.X_OK):
FileNotFoundError: [Errno 2] No such file or directory: '/invalid/path'

^C
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib64/python3.3/multiprocessing/forking.py", line 115, in poll
[W 140403 10:58:19 base:111] Module dynamips got signal 2, exiting...
    pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt

Removing the entry allows software to start as expected.

Windows - GNS Server Install Bug

If you change the default location of the GNS install to anything other than C:\Program Files(x86)\GNS-ER then the program will not work.

For example... I installed GNS to C:\GNS-ER folder yet I get this error message:
gns-error-01

Click "OK" automatically closes GNS and it won't run.

I'm running Windows 8.1 and it is fully patched.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.