KatharaFramework / Kathara

A lightweight container-based network emulation system.
https://www.kathara.org/
GNU General Public License v3.0
452 stars 63 forks source link

Kathar Critical Error #115

Closed lukes1582 closed 3 years ago

lukes1582 commented 3 years ago

Hi, after installing docker-ce and following the "kathara" installation procedure, I checked. This is what generated the check. Can you help me???

luke@luke:~$ kathara check
/bin/sh: 1: /sbin/iptables: not found
    Current Manager is: Docker (Kathara)
    Manager version is: 19.03.13
    Python version is: 3.8.5 (default, Jul 28 2020, 12:59:40) - [GCC 9.3.0]
    Kathara version is: 3.0.5
CRITICAL - [Errno 2] No such file or directory: '/usr/lib/kathara/python3'

Verioning

luke@luke:~$ kathara -v
Current version: 3.0.5

OS

luke@luke:/usr/lib/kathara$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
Codename:   focal

Check Critical Error

luke@luke:/usr/lib/kathara$ ls
_asyncio.so         _ctypes.so        libncursesw.so.6     _opcode.so
audioop.so          _curses_panel.so  libpanelw.so.6       _posixshmem.so
_bz2.so             _curses.so        libpython3.8.so.1.0  pyuv
certifi             _dbm.so           libreadline.so.8     _queue.so
_codecs_cn.so       _decimal.so       libsqlite3.so.0      readline.so
_codecs_hk.so       _hashlib.so       libssl.so.1.1        _sqlite3.so
_codecs_iso2022.so  _json.so          libuuid.so.1         _ssl.so
_codecs_jp.so       kathara           _lsprof.so           termios.so
_codecs_kr.so       libdb-5.3.so      _lzma.so             _uuid.so
_codecs_tw.so       libffi.so.7       mmap.so
_contextvars.so     liblzma.so.5      _multibytecodec.so
_crypt.so           libmpdec.so.2     _multiprocessing.so

Check first linee report

luke@luke:/sbin$ ls -la i*
lrwxrwxrwx 1 root root     20 ott  8 22:14 init -> /lib/systemd/systemd
lrwxrwxrwx 1 root root      9 mar 12  2020 insmod -> /bin/kmod
-rwxr-xr-x 1 root root   2638 dic  7  2019 installkernel
lrwxrwxrwx 1 root root      7 feb 13  2020 ip -> /bin/ip
-rwxr-xr-x 1 root root  30952 lug 21 09:49 isosize
-rwxr-xr-x 1 root root 269128 dic  8  2019 iw
-rwxr-xr-x 1 root root  34888 feb  1  2019 iwconfig
-rwxr-xr-x 1 root root  22600 feb  1  2019 iwevent
-rwxr-xr-x 1 root root  14408 feb  1  2019 iwgetid
-rwxr-xr-x 1 root root  39136 feb  1  2019 iwlist
-rwxr-xr-x 1 root root  18504 feb  1  2019 iwpriv
-rwxr-xr-x 1 root root  14328 feb  1  2019 iwspy

Docker version

luke@luke:~$ docker -v
Docker version 19.03.13, build 4484c46d9d
tcaiazzi commented 3 years ago

Hi @lukes1582, I can see two errors in the katahra check output:

  1. /bin/sh: 1: /sbin/iptables: not found For this, we're not sure of the cause, so please type kathara settings and set the logging level to EXCEPTION. Then, run kathara check and paste here the stacktrace output.

  2. CRITICAL - [Errno 2] No such file or directory: '/usr/lib/kathara/python3' We already know this bug and we'll fix it in the next release. However, despite this, kathara should works fine.

Please, let us know if you have problems.

Thanks.

lukes1582 commented 3 years ago

Hi @tcaiazzi , I made the changes you told me. This is the result

luke@luke:~$ kathara check
DEBUG - Raising privileges to UID=1000 and GID=134...
DEBUG - Trying paths: ['/home/luke/.docker/config.json', '/home/luke/.dockercfg']
DEBUG - No config file found
DEBUG - Trying paths: ['/home/luke/.docker/config.json', '/home/luke/.dockercfg']
DEBUG - No config file found
DEBUG - http://localhost:None "GET /version HTTP/1.1" 200 859
DEBUG - Checking plugin `kathara/katharanp:latest`...
DEBUG - http://localhost:None "GET /v1.40/plugins/kathara/katharanp:latest/json HTTP/1.1" 200 None
/bin/sh: 1: /sbin/iptables: not found
DEBUG - http://localhost:None "GET /v1.40/_ping HTTP/1.1" 200 2
DEBUG - Dropping privileges to UID=1000 and GID=1000...
*   Current Manager is: Docker (Kathara)
DEBUG - Raising privileges to UID=1000 and GID=134...
DEBUG - http://localhost:None "GET /v1.40/version HTTP/1.1" 200 859
DEBUG - Dropping privileges to UID=1000 and GID=1000...
*   Manager version is: 19.03.13
*   Python version is: 3.8.5 (default, Jul 28 2020, 12:59:40) - [GCC 9.3.0]
*   Kathara version is: 3.0.5
ERROR - [Errno 2] No such file or directory: '/usr/lib/kathara/python3'

Traceback (most recent call last):
  File "/usr/lib/kathara/kathara.py", line 84, in __init__
  File "/usr/lib/kathara/Resources/cli/command/CheckCommand.py", line 47, in run
  File "/usr/lib/kathara/platform.py", line 1205, in platform
  File "/usr/lib/kathara/platform.py", line 193, in libc_ver

I will try kathara functioning. If there are other errors I will report them to you. Have you ever thought about developing a simple gui? It might be useful to show all networks!

tcaiazzi commented 3 years ago

Hi @lukes1582,

If you want a gui you can use the Netkit-Lab-Generator. It's a tool to configure the networks and generate all the configuration files.

Thanks.

Skazza94 commented 3 years ago

Hi @lukes1582, new release 3.0.6 fixes the check problem. About /bin/sh: 1: /sbin/iptables: not found, it is not a Kathará-related issue and you should verify that iptables is correctly installed into your OS.

Thanks, Mariano.

lukes1582 commented 3 years ago

Hi @Skazzino thanks for the information. Today I have updated the software and the critical error is not present. @tcaiazzi I see the Netkit-Lab-Generator... I am reviewing the javascript code and I have also modify the images (they weren't beautiful).