Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNS3 fails when a project sets the auto_open option and the GNS3 VM is used #3014

Closed
ghost opened this issue Jul 5, 2020 · 1 comment
Closed
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Jul 5, 2020

Describe the bug
When setting the project option "Open this project in the background when GNS3 server starts" the next start of the GNS3 server fails.

project_settings

GNS3 version and operating system:

  • OS: macOS 10.13.6 High Sierra
  • GNS3 version 2.2.10
  • GNS3 VM 2.2.10 running in VMware Fusion

To Reproduce
Steps to reproduce the behavior:

  1. Create a project with a node running in the GNS3 VM, for example the VPCS
  2. Set the project option "Open this project in the background when GNS3 server starts"
  3. Stop GNS3
  4. Start GNS3 GUI, alternatively start only the gns3-server on the command line to better see the error messages
  5. The next start of the gns3-server fails

Screenshots or videos

The project with just a VPCS node in the GNS3 VM:
gns3_screenshot

Additional context

Server log:

/Users/behlers# /Applications/Lokal/GNS3.app/Contents/MacOS/gns3server --local
2020-07-05 22:56:49 INFO run.py:219 GNS3 server version 2.2.10
2020-07-05 22:56:49 INFO run.py:221 Copyright (c) 2007-2020 GNS3 Technologies Inc.
2020-07-05 22:56:49 INFO run.py:224 Config file /Users/behlers/.config/GNS3/2.2/gns3_server.conf loaded
2020-07-05 22:56:49 WARNING run.py:230 Local mode is enabled. Beware, clients will have full control on your filesystem
2020-07-05 22:56:49 INFO run.py:237 HTTP authentication is enabled with username 'admin'
2020-07-05 22:56:49 INFO run.py:244 Running with Python 3.6.5 and has PID 2305
2020-07-05 22:56:50 INFO web_server.py:307 Starting server on 172.20.1.1:3080
2020-07-05 22:56:50 INFO __init__.py:62 Load controller configuration file /Users/behlers/.config/GNS3/2.2/gns3_controller.conf
2020-07-05 22:56:50 INFO __init__.py:66 Controller is starting
2020-07-05 22:56:50 INFO compute.py:63 Create compute local
2020-07-05 22:56:50 INFO compute.py:360 Connecting to compute 'local'
2020-07-05 22:56:50 INFO web_log.py:233 172.20.1.1 [05/Jul/2020:20:56:50 +0000] "GET /v2/compute/capabilities HTTP/1.1" 200 520 "-" "Python/3.6 aiohttp/3.6.2"
2020-07-05 22:56:50 CRITICAL run.py:267 Critical error while running the server: Not Found
Traceback (most recent call last):
  File "./gns3-server/gns3server/controller/__init__.py", line 380, in get_compute
KeyError: 'vm'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./gns3-server/gns3server/run.py", line 261, in run
  File "./gns3-server/gns3server/web/web_server.py", line 310, in run
  File "./gns3-server/gns3server/web/web_server.py", line 85, in _run_application
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 389, in startup
  File "/usr/local/lib/python3.6/site-packages/aiohttp/signals.py", line 34, in send
  File "./gns3-server/gns3server/web/web_server.py", line 227, in _on_startup
  File "./gns3-server/gns3server/controller/__init__.py", line 102, in start
  File "./gns3-server/gns3server/controller/__init__.py", line 240, in load_projects
  File "./gns3-server/gns3server/controller/__init__.py", line 459, in load_project
  File "./gns3-server/gns3server/utils/asyncio/__init__.py", line 163, in wrapper
  File "./gns3-server/gns3server/controller/project.py", line 981, in open
  File "./gns3-server/gns3server/controller/project.py", line 935, in open
  File "./gns3-server/gns3server/controller/__init__.py", line 383, in get_compute
aiohttp.web_exceptions.HTTPNotFound: Not Found
Traceback (most recent call last):
  File "./gns3-server/gns3server/controller/__init__.py", line 380, in get_compute
KeyError: 'vm'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./gns3-server/gns3server/run.py", line 261, in run
  File "./gns3-server/gns3server/web/web_server.py", line 310, in run
  File "./gns3-server/gns3server/web/web_server.py", line 85, in _run_application
  File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 389, in startup
  File "/usr/local/lib/python3.6/site-packages/aiohttp/signals.py", line 34, in send
  File "./gns3-server/gns3server/web/web_server.py", line 227, in _on_startup
  File "./gns3-server/gns3server/controller/__init__.py", line 102, in start
  File "./gns3-server/gns3server/controller/__init__.py", line 240, in load_projects
  File "./gns3-server/gns3server/controller/__init__.py", line 459, in load_project
  File "./gns3-server/gns3server/utils/asyncio/__init__.py", line 163, in wrapper
  File "./gns3-server/gns3server/controller/project.py", line 981, in open
  File "./gns3-server/gns3server/controller/project.py", line 935, in open
  File "./gns3-server/gns3server/controller/__init__.py", line 383, in get_compute
aiohttp.web_exceptions.HTTPNotFound: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/cx_Freeze/initscripts/__startup__.py", line 14, in run
  File "/usr/local/lib/python3.6/site-packages/cx_Freeze/initscripts/Console.py", line 26, in run
  File "gns3-server/gns3server/main.py", line 87, in <module>
  File "gns3-server/gns3server/main.py", line 83, in main
  File "./gns3-server/gns3server/run.py", line 268, in run
TypeError: capture_exception() missing 1 required positional argument: 'request'
/Users/behlers#

In contrast here the log of a normal (successful) start of the gns3-server, without a project with the auto_start option:

/Users/behlers# /Applications/Lokal/GNS3.app/Contents/MacOS/gns3server --local
2020-07-05 22:50:39 INFO run.py:219 GNS3 server version 2.2.10
2020-07-05 22:50:39 INFO run.py:221 Copyright (c) 2007-2020 GNS3 Technologies Inc.
2020-07-05 22:50:39 INFO run.py:224 Config file /Users/behlers/.config/GNS3/2.2/gns3_server.conf loaded
2020-07-05 22:50:39 WARNING run.py:230 Local mode is enabled. Beware, clients will have full control on your filesystem
2020-07-05 22:50:39 INFO run.py:237 HTTP authentication is enabled with username 'admin'
2020-07-05 22:50:39 INFO run.py:244 Running with Python 3.6.5 and has PID 2269
2020-07-05 22:50:39 INFO web_server.py:307 Starting server on 172.20.1.1:3080
2020-07-05 22:50:39 INFO __init__.py:62 Load controller configuration file /Users/behlers/.config/GNS3/2.2/gns3_controller.conf
2020-07-05 22:50:39 INFO __init__.py:66 Controller is starting
2020-07-05 22:50:39 INFO compute.py:63 Create compute local
2020-07-05 22:50:39 INFO compute.py:360 Connecting to compute 'local'
2020-07-05 22:50:39 INFO web_log.py:233 172.20.1.1 [05/Jul/2020:20:50:39 +0000] "GET /v2/compute/capabilities HTTP/1.1" 200 520 "-" "Python/3.6 aiohttp/3.6.2"
2020-07-05 22:50:39 INFO __init__.py:313 Start the GNS3 VM
2020-07-05 22:50:39 INFO compute.py:63 Create compute vm
2020-07-05 22:50:39 INFO __init__.py:572 Searching for VMware VMs in inventory file "/Users/behlers/Library/Application Support/VMware Fusion/vmInventory"
2020-07-05 22:50:39 INFO __init__.py:390 Executing vmrun with command: '/Applications/VMware Fusion.app/Contents/Library/vmrun' -T fusion checkToolsState '/Users/behlers/Virtual Machines.localized/GNS3 VM.vmwarevm/GNS3 VM.vmx'
2020-07-05 22:50:39 INFO notification_handler.py:50 New client has connected to compute WebSocket
2020-07-05 22:50:39 INFO compute.py:430 Connected to compute WebSocket 'http://172.20.1.1:3080/v2/compute/notifications/ws'
2020-07-05 22:50:39 INFO __init__.py:390 Executing vmrun with command: '/Applications/VMware Fusion.app/Contents/Library/vmrun' -T fusion list
2020-07-05 22:50:39 INFO vmware_gns3_vm.py:166 Waiting for GNS3 VM IP
2020-07-05 22:50:40 INFO vmware_gns3_vm.py:185 GNS3 VM IP address set to 172.20.1.131
2020-07-05 22:50:50 INFO compute.py:360 Connecting to compute 'vm'
2020-07-05 22:50:50 INFO compute.py:430 Connected to compute WebSocket 'http://172.20.1.131:80/v2/compute/notifications/ws'
2020-07-05 22:50:50 INFO web_log.py:233 172.20.1.1 [05/Jul/2020:20:50:50 +0000] "GET /v2/compute/network/interfaces HTTP/1.1" 200 4658 "-" "Python/3.6 aiohttp/3.6.2"
@ghost ghost added the Bug label Jul 5, 2020
@grossmj grossmj modified the milestones: 2.2.12, 2.2.11 Jul 9, 2020
grossmj added a commit to GNS3/gns3-server that referenced this issue Jul 9, 2020
@grossmj
Copy link
Member

grossmj commented Jul 9, 2020

Fixed.

@grossmj grossmj closed this as completed Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant