GNS3 / gns3-server

GNS3 server
GNU General Public License v3.0
811 stars 263 forks source link

Connection between Vmware hosts cannot be started #275

Closed cristian-ciobanu closed 9 years ago

cristian-ciobanu commented 9 years ago

I have tried to start some Vmware VMs which were connected between them using a generic switch or directly connected and failed with the following error message.

Response error: Error downloading http://127.0.0.1:8000/v1/projects/f33feadf-4bbf-4f63-b673-b954072c99db/vmware/vms/b0ef8be9-82ff-4380-b3e0-f6afac5ff4b3/start - server replied: Conflict (error: 206) error while starting TC-1: No data returned from 127.0.0.1:41819, uBridge process running: True Server error from http://127.0.0.1:8000: TC-1: No data returned from 127.0.0.1:41819, uBridge process running: True

The Vmware Workstation window opens and the OS loads but the status of the link in GNS3 is not running although the operating system is loaded successfully. If I start the VM without connecting to other device it works fine. Running GNS3 1.4 alpha2 with Ubridge 0.9.1 on Archlinux 64bit vmware_vm

grossmj commented 9 years ago

Hi,

Do you get this every time?

Do you have the content of ~/.config/GNS3/gns3_server.log?

Thanks,

cristian-ciobanu commented 9 years ago

I have rebooted my machine and tried again from scratch so it happens every time. This is the traceback from the gns3_server.log

2015-07-24 07:36:12 ERROR route.py:184 VM error detected: <class 'gns3server.ubridge.ubridge_error.UbridgeError'> Traceback (most recent call last): File "/usr/lib/python3.4/site-packages/gns3_server-1.4.0.dev3-py3.4.egg/gns3server/web/route.py", line 174, in control_schema yield from func(request, response) File "/usr/lib/python3.4/site-packages/gns3_server-1.4.0.dev3-py3.4.egg/gns3server/handlers/api/vmware_handler.py", line 163, in start yield from vm.start() File "/usr/lib/python3.4/site-packages/gns3_server-1.4.0.dev3-py3.4.egg/gns3server/modules/vmware/vmware_vm.py", line 383, in start yield from self._add_ubridge_connection(nio, adapter_number) File "/usr/lib/python3.4/site-packages/gns3_server-1.4.0.dev3-py3.4.egg/gns3server/modules/vmware/vmware_vm.py", line 302, in _add_ubridge_connection yield from self._ubridge_hypervisor.send('bridge start {name}'.format(name=vnet)) File "/usr/lib/python3.4/site-packages/gns3_server-1.4.0.dev3-py3.4.egg/gns3server/ubridge/ubridge_hypervisor.py", line 228, in send .format(host=self._host, port=self._port, run=self.is_running())) gns3server.ubridge.ubridge_error.UbridgeError: No data returned from 127.0.0.1:51280, uBridge process running: True

grossmj commented 9 years ago

I cannot replicate the problem but you are not the only one with this bug.

Can you do the 2 following tasks to help me isolate the problem?

1st task:

Start gns3 on the command line with: gns3 --debug and then post the content of gns3_server.log again. Before you close GNS3, can you check if you have any ubridge process running?

2nd task:

Start ubridge on the command line with: ubridge -H 4242 then connect to telnet localhost 4242 and copy-paste the following commands:

bridge create br0
bridge add_nio_linux_raw br0 vmnet2
bridge add_nio_udp br0 20001 127.0.0.1 30001
bridge start br0

Let me know if ubridge still runs after that.

Thanks for helping catching this sneaky bug ;)

cristian-ciobanu commented 9 years ago

Task 1 -- started gns3 using --debug option and tried to start a VMware VM and here is the link to gns3_server.log content http://pastebin.com/WiepgWNf I have checked if ubridge process was running while gns3 application was started and was not running

Task 2 -- started manually uBridge in hypervisor mode by running $ ubridge -H 4242 Hypervisor TCP control server started (port 4242).

Connect to port 4242 on localhost using telnet

$ telnet localhost 4242 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'.

200-At least a module and a command must be specified bridge create br0 bridge add_nio_linux_raw br0 vmnet2 bridge add_nio_udp br0 20001 127.0.0.1 30001 bridge start br0100-bridge 'br0' created 100-NIO Linux raw added to bridge 'br0' 100-NIO UDP added to bridge 'br0' Connection closed by foreign host. After I press Enter the ubridge process closes the connection and the uBridge hypervisor returns a segmentation fault message. Also I think after this message 'br0' created 100-NIO Linux raw added to bridge 'br0' 100-NIO UDP added to bridge 'br0' I should see the br0 bridge interface but when I type ifconfig br0 it returns br0: error fetching interface information: Device not found
grossmj commented 9 years ago

Excellent, this is definitely something with uBridge itself and I think I have fixed that. Please download the latest dev version of uBridge: https://github.com/GNS3/ubridge/archive/master.zip

Thanks a lot! :)

cristian-ciobanu commented 9 years ago

I compiled the latest version of uBridge and tested again. The error is gone. Thanks for fixing this. This issue can be closed.

grossmj commented 9 years ago

Thanks, that's awesome!