GNS3 / gns3-gui

GNS3 Graphical Network Simulator
http://www.gns3.com
GNU General Public License v3.0
2.15k stars 434 forks source link

GNS3 Qemu or Docker nodes do not update status after starting (Python 3.7) #2568

Closed cristian-ciobanu closed 6 years ago

cristian-ciobanu commented 6 years ago

Environment: Linux (Archlinux), Python version 3.7, GNS3 version 2.1.9

image

Below is the traceback from the gns3server log file.

2018-08-22 23:39:10 DEBUG compute.py:528 Attempting request to compute: POST http://192.168.1.3:8080/v2/compute/projects/091b296b-4a74-4c38-9748-2fd81e2d33e9/qemu/nodes/c37b2d08-020d-40fc-bff e-4bc1908d4adf/start {'content-type': 'application/json'} 2018-08-22 23:39:10 INFO qemu_vm.py:1390 logging to /home/cioby/GNS3/projects/aaaaa/project-files/qemu/c37b2d08-020d-40fc-bffe-4bc1908d4adf/qemu-img.log 2018-08-22 23:39:10 INFO qemu_vm.py:1392 Executing qemu-img with: /usr/bin/qemu-img check /home/cioby/GNS3/images/QEMU/Cisco_SD-WAN/viptela-edge-genericx86-64.qcow2 2018-08-22 23:39:10 INFO qemu_vm.py:1396 /usr/bin/qemu-img returned with 0 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10000 has been allocated 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10001 has been allocated 2018-08-22 23:39:10 INFO base_node.py:710 Qemu: 'Cisco-vEdge-2' [c37b2d08-020d-40fc-bffe-4bc1908d4adf]:local UDP tunnel created between port 10000 and 10001 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10002 has been allocated 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10003 has been allocated 2018-08-22 23:39:10 INFO base_node.py:710 Qemu: 'Cisco-vEdge-2' [c37b2d08-020d-40fc-bffe-4bc1908d4adf]:local UDP tunnel created between port 10002 and 10003 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10004 has been allocated 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10005 has been allocated 2018-08-22 23:39:10 INFO base_node.py:710 Qemu: 'Cisco-vEdge-2' [c37b2d08-020d-40fc-bffe-4bc1908d4adf]:local UDP tunnel created between port 10004 and 10005 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10006 has been allocated 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10007 has been allocated 2018-08-22 23:39:10 INFO base_node.py:710 Qemu: 'Cisco-vEdge-2' [c37b2d08-020d-40fc-bffe-4bc1908d4adf]:local UDP tunnel created between port 10006 and 10007 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10008 has been allocated 2018-08-22 23:39:10 DEBUG port_manager.py:282 UDP port 10009 has been allocated 2018-08-22 23:39:10 INFO base_node.py:710 Qemu: 'Cisco-vEdge-2' [c37b2d08-020d-40fc-bffe-4bc1908d4adf]:local UDP tunnel created between port 10008 and 10009 2018-08-22 23:39:10 INFO qemu_vm.py:909 Starting QEMU with: /usr/bin/qemu-system-x86_64 -name Cisco-vEdge-2 -m 1024M -smp cpus=1 -enable-kvm -machine smm=off -boot order=c -drive file=/home/c ioby/GNS3/projects/aaaaa/project-files/qemu/c37b2d08-020d-40fc-bffe-4bc1908d4adf/hda_disk.qcow2,if=virtio,index=0,media=disk -uuid c37b2d08-020d-40fc-bffe-4bc1908d4adf -serial telnet:127.0.0. 1:52800,server,nowait -monitor tcp:127.0.0.1:37935,server,nowait -net none -device virtio-net-pci,mac=0c:33:e9:4a:df:00,netdev=gns3-0 -netdev socket,id=gns3-0,udp=127.0.0.1:10001,localaddr=12 7.0.0.1:10000 -device virtio-net-pci,mac=0c:33:e9:4a:df:01,netdev=gns3-1 -netdev socket,id=gns3-1,udp=127.0.0.1:10003,localaddr=127.0.0.1:10002 -device virtio-net-pci,mac=0c:33:e9:4a:df:02,ne tdev=gns3-2 -netdev socket,id=gns3-2,udp=127.0.0.1:10005,localaddr=127.0.0.1:10004 -device virtio-net-pci,mac=0c:33:e9:4a:df:03,netdev=gns3-3 -netdev socket,id=gns3-3,udp=127.0.0.1:10007,loca laddr=127.0.0.1:10006 -device virtio-net-pci,mac=0c:33:e9:4a:df:04,netdev=gns3-4 -netdev socket,id=gns3-4,udp=127.0.0.1:10009,localaddr=127.0.0.1:10008 -nographic 2018-08-22 23:39:10 INFO qemu_vm.py:911 logging to /home/cioby/GNS3/projects/aaaaa/project-files/qemu/c37b2d08-020d-40fc-bffe-4bc1908d4adf/qemu.log 2018-08-22 23:39:10 INFO base_node.py:539 Starting new uBridge hypervisor 192.168.1.3:35949 2018-08-22 23:39:10 INFO hypervisor.py:170 starting ubridge: ['/usr/local/bin/ubridge', '-H', '192.168.1.3:35949', '-d', '2'] 2018-08-22 23:39:10 INFO hypervisor.py:172 logging to /home/cioby/GNS3/projects/aaaaa/project-files/qemu/c37b2d08-020d-40fc-bffe-4bc1908d4adf/ubridge.log 2018-08-22 23:39:10 INFO hypervisor.py:180 ubridge started PID=16891 2018-08-22 23:39:10 INFO base_node.py:542 Hypervisor 192.168.1.3:35949 has successfully started 2018-08-22 23:39:10 INFO ubridge_hypervisor.py:84 Connected to uBridge hypervisor after 0.0129 seconds 2018-08-22 23:39:10 DEBUG ubridge_hypervisor.py:207 sending hypervisor version

2018-08-22 23:39:10 ERROR route.py:229 Uncaught exception detected: <class 'TypeError'> Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/gns3server/web/route.py", line 195, in control_schema yield from func(request, response) File "/usr/lib/python3.7/site-packages/gns3server/handlers/api/compute/qemu_handler.py", line 188, in start yield from vm.start() File "/usr/lib/python3.7/site-packages/gns3server/compute/qemu/qemu_vm.py", line 920, in start yield from self._start_ubridge() File "/usr/lib/python3.7/site-packages/gns3server/utils/asyncio/init.py", line 158, in new_function return (yield from f(*args, *kwargs)) File "/usr/lib/python3.7/site-packages/gns3server/compute/base_node.py", line 543, in _start_ubridge yield from self._ubridge_hypervisor.connect() File "/usr/lib/python3.7/site-packages/gns3server/ubridge/ubridge_hypervisor.py", line 87, in connect version = yield from self.send("hypervisor version") File "/usr/lib/python3.7/site-packages/gns3server/utils/asyncio/init.py", line 158, in new_function return (yield from f(args, *kwargs)) File "/usr/lib/python3.7/site-packages/gns3server/ubridge/ubridge_hypervisor.py", line 209, in send yield from self._writer.drain() TypeError: cannot 'yield from' a coroutine object in a non-coroutine generator 2018-08-22 23:39:10 DEBUG base.py:270 Configuring Raven for host: https://sentry.io 2018-08-22 23:39:10 DEBUG base.py:724 Sending message of length 3493 to https://sentry.io/api/38482/store/ 2018-08-22 23:39:11 INFO crash_report.py:114 Crash report sent with event ID: 94150c0e6ee14ad583df9446b1440267 2018-08-22 23:39:11 INFO response.py:56 POST /v2/compute/projects/091b296b-4a74-4c38-9748-2fd81e2d33e9/qemu/nodes/c37b2d08-020d-40fc-bffe-4bc1908d4adf/start 2018-08-22 23:39:11 DEBUG response.py:57 {'content-type': 'application/json', 'Accept': '/*', 'Accept-Encoding': 'gzip, deflate', 'Host': '192.168.1.3:8080', 'User-Agent': 'Python/3.7 aiohttp/2.2.0', 'Authorization': 'Basic c3lzYWRtaW46QXJjaCFpbnV4MTIz', 'Content-Length': '0'} 2018-08-22 23:39:11 DEBUG response.py:59 {} 2018-08-22 23:39:11 INFO response.py:60 Response: 500 Internal Server Error 2018-08-22 23:39:11 DEBUG response.py:61 {'Connection': 'close', 'X-Route': '/v2/compute/projects/{project_id}/qemu/nodes/{node_id}/start', 'Server': 'Python/3.7 GNS3/2.1.9', 'Content-Type': 'application/json'}

image

There is a mismatch beetween the console port displayed in the GUI and the actual port on which the Qemu console is connected to (highlighted in red).

gns3_test

The Qemu device starts but the GUI is not updated and the device appears as turned off as in the above screenshot while the qemu process is running.

grossmj commented 6 years ago

@cioby23 I made some changes, please can you test with the latest dev version (2.1.10dev2) and tell me if this fixes the issue?

Thanks!

cristian-ciobanu commented 6 years ago

This issue can the closed as the latest fixes from https://github.com/GNS3/gns3-gui/issues/2566 also fixed this.

grossmj commented 6 years ago

Perfect!