Jupyter через SSH не может подключиться после уничтожения некоторых портов - PullRequest
0 голосов
/ 19 сентября 2019

Я использую сервер удаленно через ssh и использую jupyter через туннель ssh.Я обычно могу заставить это работать, используя:

#!/bin/sh
sudo fuser -k 8881/tcp
echo 'Port 8881 is free now'
ssh -N -f -L localhost:8881:localhost:8888 myuser@serveraddress 
read -p "Press enter to continue"
ssh myuser@serveraddress "sudo nohup jupyter notebook --no-browser"
wait
chromium http://localhost:8881/;sleep 1; exec bash &

Но, я не знаю почему, после некоторых обновлений и уничтожения некоторых портов, используя:

sudo fuser -k 8891/tcp

Где я это сделал си другие порты тоже.

Я пробовал команды типа (чтобы открыть):

sudo ufw allow 8891/tcp

Но теперь я получаю этот вывод при попытке использовать Jupyter удаленно:

sudo: no tty present and no askpass program specified
[8893:9160:0918/214007.129058:ERROR:token_service_table.cc(140)] Failed to decrypt token for service AccountId-114438117936628626704
channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused
Fontconfig error: Cannot load default config file
channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 2: open failed: connect failed: Connection refused

И больше не могу запускать Jupyter.Кто-нибудь может мне помочь?Спасибо!

Сообщение: "sudo: нет tty присутствует и не задана программа askpass" Я получаю до этой проблемы, но, похоже, не проблема (как работало раньше, даже с этим предупреждением)).

ОБНОВЛЕНИЕ: Я запускаю его снова с -v -v в get:

sudo: no tty present and no askpass program specified
Gtk-Message: 06:53:32.627: Failed to load module "canberra-gtk-module"
Gtk-Message: 06:53:32.629: Failed to load module "canberra-gtk-module"
[13654:13926:0919/065333.068363:ERROR:token_service_table.cc(140)] Failed to decrypt token for service AccountId-114438117936628626704
debug1: Connection to port 8881 forwarding to localhost port 8888 requested.
debug2: fd 6 setting TCP_NODELAY
debug2: fd 6 setting O_NONBLOCK
debug1: channel 2: new [direct-tcpip]
debug1: Connection to port 8881 forwarding to localhost port 8888 requested.
debug2: fd 7 setting TCP_NODELAY
debug2: fd 7 setting O_NONBLOCK
debug1: channel 3: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: direct-tcpip: listening port 8881 for localhost port 8888, connect from ::1 port 37178 to ::1 port 8881, nchannels 4
debug2: channel 3: zombie
debug2: channel 3: garbage collecting
debug1: channel 3: free: direct-tcpip: listening port 8881 for localhost port 8888, connect from ::1 port 37180 to ::1 port 8881, nchannels 3
debug1: Connection to port 8881 forwarding to localhost port 8888 requested.
debug2: fd 6 setting TCP_NODELAY
debug2: fd 6 setting O_NONBLOCK
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: direct-tcpip: listening port 8881 for localhost port 8888, connect from ::1 port 37184 to ::1 port 8881, nchannels 3
Fontconfig error: Cannot load default config file
debug1: Connection to port 8881 forwarding to localhost port 8888 requested.
debug2: fd 6 setting TCP_NODELAY
debug2: fd 6 setting O_NONBLOCK
debug1: channel 2: new [direct-tcpip]
debug1: Connection to port 8881 forwarding to localhost port 8888 requested.
debug2: fd 7 setting TCP_NODELAY
debug2: fd 7 setting O_NONBLOCK
debug1: channel 3: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: direct-tcpip: listening port 8881 for localhost port 8888, connect from ::1 port 37186 to ::1 port 8881, nchannels 4
debug2: channel 3: zombie
debug2: channel 3: garbage collecting
debug1: channel 3: free: direct-tcpip: listening port 8881 for localhost port 8888, connect from ::1 port 37188 to ::1 port 8881, nchannels 3
debug1: Connection to port 8881 forwarding to localhost port 8888 requested.
debug2: fd 6 setting TCP_NODELAY
debug2: fd 6 setting O_NONBLOCK
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: direct-tcpip: listening port 8881 for localhost port 8888, connect from ::1 port 37190 to ::1 port 8881, nchannels 3
debug1: Connection to port 8881 forwarding to localhost port 8888 requested.
debug2: fd 6 setting TCP_NODELAY
debug2: fd 6 setting O_NONBLOCK
debug1: channel 2: new [direct-tcpip]
debug1: Connection to port 8881 forwarding to localhost port 8888 requested.
debug2: fd 7 setting TCP_NODELAY
debug2: fd 7 setting O_NONBLOCK
debug1: channel 3: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: direct-tcpip: listening port 8881 for localhost port 8888, connect from ::1 port 37194 to ::1 port 8881, nchannels 4
debug2: channel 3: zombie
debug2: channel 3: garbage collecting
debug1: channel 3: free: direct-tcpip: listening port 8881 for localhost port 8888, connect from ::1 port 37196 to ::1 port 8881, nchannels 3
debug1: Connection to port 8881 forwarding to localhost port 8888 requested.
debug2: fd 6 setting TCP_NODELAY
debug2: fd 6 setting O_NONBLOCK
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: direct-tcpip: listening port 8881 for localhost port 8888, connect from ::1 port 37198 to ::1 port 8881, nchannels 3

ОБНОВЛЕНИЕ2: я могу получить доступ с помощью другого ПК.

...