miguelammatos / Kollaps

Kollaps: a decentralized container based network emulator
Apache License 2.0
31 stars 5 forks source link

Issue with running the sample experiment #30

Closed ZahraPakzad closed 2 years ago

ZahraPakzad commented 2 years ago

Hello,

System specification: on the bottom of the issue (I'm running Linux Ubuntu 20.04 LTS on WSL2)


While trying to follow the basic setup of the Kollaps library based on the readme file (https://github.com/miguelammatos/Kollaps), I faced an issue running this line:

./KollapsDeploymentGenerator ./iperf3/topology.xml -s topology.yaml

the error states:

Error processing line 1 of /usr/lib/python3.10/site-packages/distutils-precedence.pth:   
                                                                                                                                                                                                           Traceback (most recent call last):                                                                                                                 
File "/usr/lib/python3.10/site.py", line 186, in addpackage                                                                                        
exec(line)
File "<string>", line 1, in <module>                                                                                                           ModuleNotFoundError: No module named '_distutils_hack'                                                                                                                                                                                                                                          
Remainder of file ignored
[Py (compose_generator)] ERROR: DockerComposeFileGenerator.py requires special permissions in order to view cluster state.
please, generate the .yaml file on a manager node.                                                                                               An error occured, terminating!
Error Message: Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused'))               
mv: replace 'topology.yaml', overriding mode 0644 (rw-r--r--)? y

My attempts at solving this:

As per the error line please, generate the .yaml file on a manager node. I have checked and so far I only have one node which is the Leader(manager) node.

`$ docker node ls`

ID                            HOSTNAME          STATUS    AVAILABILITY   MANAGER STATUS   ENGINE VERSION
rnd661r1vv4661os2us2upreh *   DESKTOP-QTJ9R10   Ready     Active         Leader           20.10.16   

I cannot understand what the source of the problem would be. My only guess is that it might have something to do with the dockerd path; which is:

DOCKER_DIR=/mnt/wsl/shared-docker mkdir -pm o=,ug=rwx "$DOCKER_DIR" sudo chgrp docker "$DOCKER_DIR" sudo mkdir /etc/docker sudo /etc/docker/daemon.json

{ "hosts": ["unix:///mnt/wsl/shared-docker/docker.sock"] }

(This is part of the tutorial for installing docker on wsl2 on this page: https://dev.solita.fi/2021/12/21/docker-on-wsl2-without-docker-desktop.html)


System specification:

$ cat /proc/version
Linux version 5.10.102.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Mar 2 00:30:59 UTC 2022 

$ lsb_release -a
No LSB modules are available
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:        20.04 

$hostnamectl
System has not been booted with systemd as init system (PID 1). Can't operate. 
Failed to create bus connection: Host is down    
ZahraPakzad commented 2 years ago

Issue is solved. Because of my configuration and how docker daemon's path was on unix:///mnt/wsl/shared-docker/docker.sock ({ "hosts": ["unix:///mnt/wsl/shared-docker/docker.sock"] }) I changed the KollapsDeploymentGenerator file for myself in this way: