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

Error when starting dockers in GNS3 in Opensuse TW #2419

Closed
jsaenz01 opened this issue Sep 29, 2024 · 13 comments · Fixed by #2420
Closed

Error when starting dockers in GNS3 in Opensuse TW #2419

jsaenz01 opened this issue Sep 29, 2024 · 13 comments · Fixed by #2420
Labels

Comments

@jsaenz01
Copy link

Hello,
A few months ago the dockers in GNS3 worked perfectly on my PC.
Now, they refuse to start.

I don't know if it was an update, a new dependency, my fault,... The truth is that I updated from Opensuse 15.5 to Tumbleweed.

I get "--install: applet not found
sh: invalid number '0.5'" in every docker I try.

I also add the complete gns3server log in case you can help, thank you.

I can do all the tests you need.

Thank you.

`2024-09-29 07:57:05 ERROR docker_vm.py:500 Container OpenvSwitch-1 failed to start
2024-09-29 07:57:05 INFO base_node.py:715 Stopping uBridge hypervisor localhost:36139
2024-09-29 07:57:05 INFO hypervisor.py:208 Stopping uBridge process PID=99812
2024-09-29 07:57:06 ERROR docker_vm.py:506 --install: applet not found
2024-09-29 07:57:06 ERROR docker_vm.py:506 sh: invalid number '0.5'
2024-09-29 07:57:06 ERROR docker_vm.py:506
2024-09-29 07:57:06 ERROR route.py:221 Node error detected: DockerError
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/gns3server/compute/base_node.py", line 677, in _ubridge_send
await self._ubridge_hypervisor.send(command)
File "/usr/lib/python3.11/site-packages/gns3server/utils/asyncio/init.py", line 164, in wrapper
return await f(oself, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/gns3server/ubridge/ubridge_hypervisor.py", line 259, in send
raise UbridgeError(data[-1][4:])
gns3server.ubridge.ubridge_error.UbridgeError: could not complete netlink transaction

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/gns3server/compute/docker/docker_vm.py", line 921, in _add_ubridge_connection
await self._ubridge_send('docker move_to_ns {ifc} {ns} eth{adapter}'.format(ifc=adapter.host_ifc,
File "/usr/lib/python3.11/site-packages/gns3server/compute/base_node.py", line 679, in _ubridge_send
raise UbridgeError("Error while sending command '{}': {}: {}".format(command, e, self._ubridge_hypervisor.read_stdout()))
gns3server.ubridge.ubridge_error.UbridgeError: Error while sending command 'docker move_to_ns tap-gns3-e1 99792 eth0': could not complete netlink transaction: uBridge version 0.9.18 running with libpcap version 1.10.5 (with TPACKET_V3)
Hypervisor TCP control server started (IP localhost port 36139).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/gns3server/compute/docker/docker_vm.py", line 498, in start
await self._add_ubridge_connection(nio, adapter_number)
File "/usr/lib/python3.11/site-packages/gns3server/compute/docker/docker_vm.py", line 925, in _add_ubridge_connection
raise UbridgeNamespaceError(e)
gns3server.ubridge.ubridge_error.UbridgeNamespaceError: Error while sending command 'docker move_to_ns tap-gns3-e1 99792 eth0': could not complete netlink transaction: uBridge version 0.9.18 running with libpcap version 1.10.5 (with TPACKET_V3)
Hypervisor TCP control server started (IP localhost port 36139).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/gns3server/web/route.py", line 200, in control_schema
await func(request, response)
File "/usr/lib/python3.11/site-packages/gns3server/handlers/api/compute/docker_handler.py", line 89, in start
await container.start()
File "/usr/lib/python3.11/site-packages/gns3server/compute/docker/docker_vm.py", line 507, in start
raise DockerError(logdata)
gns3server.compute.docker.docker_error.DockerError: --install: applet not found
sh: invalid number '0.5'
`

@jsaenz01
Copy link
Author

jsaenz01 commented Sep 29, 2024

Hi again,

I have just done more tests. Dockers works in 2.2.47 versión, but it fails in laters.

I don't know if is related, but Dockers dont get a ip en dhcp

@grossmj grossmj added the Bug label Sep 29, 2024
@grossmj
Copy link
Member

grossmj commented Sep 29, 2024

Do you have any busybox or busybox-static package installed?

If yes, what is the result of the following commands?

$ whereis busybox
busybox: /usr/bin/busybox /usr/share/man/man1/busybox.1.gz
$ busybox | head -1
BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3.1) multi-call binary.

Thanks 👍

@jsaenz01
Copy link
Author

I have both installed .This is the information you asked:
imagen

@grossmj
Copy link
Member

grossmj commented Sep 30, 2024

Thanks, I also need the output of the following commands please:

ldd /usr/bin/busybox
ldd /usr/share/busybox
ls -l ~/.local/share/GNS3/docker/bin/
ldd ~/.local/share/GNS3/docker/bin/busybox
busybox sleep 0.5

@jsaenz01
Copy link
Author

jsaenz01 commented Sep 30, 2024

Hi,
Here It's
image

Last one:
image

@grossmj
Copy link
Member

grossmj commented Sep 30, 2024

Ok, I think I understand the problem now.

Please can you edit ~/.local/share/GNS3/docker/init.sh and replace sleep 0.5 by sleep 1?

Let me know if this solves the issue. Thanks.

@jsaenz01
Copy link
Author

jsaenz01 commented Sep 30, 2024

Hello,
Now the dockers start!! Thanks for your quick response.

However, Docker does not obtain an IP automatically. I don't know if it's related or not, or if it's a bug in the templates. Just in case:

imagen

The config is in DHCP:
`#

This is a sample network config, please uncomment lines to configure the network

Uncomment this line to load custom interface files

source /etc/network/interfaces.d/*

Static config for eth0

#auto eth0
#iface eth0 inet static

address 192.168.0.2

netmask 255.255.255.0

gateway 192.168.0.1

up echo nameserver 192.168.0.1 > /etc/resolv.conf

DHCP config for eth0

auto eth0
iface eth0 inet dhcp

hostname UbuntuDockerGuest-1**

`

Thanks!!!!!

@grossmj
Copy link
Member

grossmj commented Sep 30, 2024

Hum strange. What if you execute the init.sh script from the container? /gns3/init.sh

Also, can you share your busybox executable ~/.local/share/GNS3/docker/bin/busybox by attaching it here? (maybe you will have to zip it first to pass restrictions),

@jsaenz01
Copy link
Author

Hi,
Problem is that there is no Ifup command
imagen

However:

imagen

The file is here

busybox.zip

Thanks!

@jsaenz01
Copy link
Author

Hi again,

I manually replace this file with busybox-static from Ububuntu 24.04LTS. Now Its working again.... I can do any test you need.

Thanks again!!!

@grossmj
Copy link
Member

grossmj commented Sep 30, 2024

Yes, somehow some things don't work well with the BusyBox static shipped with Tumbleweed ;)

@grossmj
Copy link
Member

grossmj commented Oct 1, 2024

I found the reason.

The busybox v1.36.1 shipped in Opensuse TW does not have the --install parameter anymore.

$ busybox
BusyBox v1.36.1 () multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list
   or: function [arguments]..

While busybox v1.30.1 shipped in Ubuntu has it.

$ busybox 
BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   or: function [arguments]...

In our init.sh script, we use this --install parameter to create symlinks to busybox commands: https://github.com/GNS3/gns3-server/blob/master/gns3server/compute/docker/resources/init.sh#L25L29

The script then cannot find commands like ifup or ipsince the symlinks could not be installed.

@grossmj grossmj linked a pull request Oct 1, 2024 that will close this issue
@grossmj
Copy link
Member

grossmj commented Oct 1, 2024

Fixed

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

Successfully merging a pull request may close this issue.

2 participants