Fórum Ubuntu CZ/SK

Ubuntu pro osobní počítače => Software => Téma založeno: Navar_a 21 Dubna 2023, 09:16:18

Název: Reakce Ubuntu na příkazy
Přispěvatel: Navar_a 21 Dubna 2023, 09:16:18
PC - OS Windows 10; WSL 2 (nastaveno systemd=true); Ubuntu 22.04.

Jaká je to chyba a jak jí v Ubuntu opravit, když hlásí:

Kód: [Vybrat]
# ufw enable
---Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ufw/util.py", line 427, in under_ssh
    ppid = get_ppid(pid)
  File "/usr/lib/python3/dist-packages/ufw/util.py", line 419, in get_ppid
    ppid = open(name).readlines()[0].split(')')[1].split()[1]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/sbin/ufw", line 138, in <module>
    not ui.continue_under_ssh():
  File "/usr/lib/python3/dist-packages/ufw/frontend.py", line 901, in
continue_under_ssh
    if self.backend.do_checks and ufw.util.under_ssh(): # pragma: no cover
  File "/usr/lib/python3/dist-packages/ufw/util.py", line 457, in under_ssh
    return under_ssh(ppid)
  File "/usr/lib/python3/dist-packages/ufw/util.py", line 457, in under_ssh
    return under_ssh(ppid)
  File "/usr/lib/python3/dist-packages/ufw/util.py", line 434, in under_ssh
    raise ValueError(err_msg)
ValueError: Couldn't find parent pid for '1622'

# ps -p $$ -o ppid=
---1622

# wget localhost:8001
---failed: Connection refused

# nc -zv localhost 8001
---nc: connect to localhost (127.0.0.1) port 8001 (tcp) failed:
Connection refused

# firewall-cmd --state
---failed
Název: Re:Reakce Ubuntu na příkazy
Přispěvatel: JirkaZ 21 Dubna 2023, 16:23:21
1 (https://www.google.com/search?channel=fs&q=File+%22%2Fusr%2Flib%2Fpython3%2Fdist-packages%2Fufw%2Futil.py%22%2C+line+427%2C+in+under_ssh) => 2 (https://superuser.com/questions/1775776/enabling-ufw-failed-with-ubuntu-from-wsl2)

Nesáhnul jsem na klávesnici.

Nemáš zač.