hardware-mycroft-mark-II icon indicating copy to clipboard operation
hardware-mycroft-mark-II copied to clipboard

SSH Connection times out

Open NeonDaniel opened this issue 4 years ago • 7 comments

Describe the bug SSH connection times out when trying to connect to my Mark 2. I had successfully connected, restarted via SSH terminal, and upon restarting my SSH connection fails.

To Reproduce Setup SSH connection for the device. Connect via SSH and restart via sudo shutdown -r now Try to SSH to the device after restarting

Expected behavior SSH connection should establish

Log files I tried creating a support ticket but never received an email. Below is the output from my connection attempt.

$ ssh [email protected] -p8222 -vvv
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.1.157 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.1.157 [192.168.1.157] port 8222.
debug1: connect to address 192.168.1.157 port 8222: Connection timed out
ssh: connect to host 192.168.1.157 port 8222: Connection timed out

Environment (please complete the following information):

  • Device type: Mark 2
  • OS: Mark 2 Image
  • Mycroft-core version:2021-03-02-01:40:08

NeonDaniel avatar Apr 02 '21 01:04 NeonDaniel

did you get a new IP address - that happened to me once on my Dev-Kit testing your Linux shutdown -- I normally use the pull down menu, select either 'Turn off' or Restart - wait 5-10 seconds after the terminal screen shows up & power cycle it -[though if I wait the whole time it seems to come up better ] ' I'm good :: (.venv) mycroft@localhost:~$ sudo shutdown -r now Hangup (.venv) root@localhost:/# Hangup Connection to 192.168.2.4 closed. olzeke51@Tester:~$ ssh -p 8222 [email protected] (.venv) mycroft@localhost:~$ ??? where did the 'line-throughs' come in ???

Olzeke51 avatar Apr 03 '21 13:04 Olzeke51

Hey Daniel, did you confirm the IP address was still correct? Is the behavior still occurring? Is/was the device otherwise responsive? ie the system itself hadn't completely crashed.

@Olzeke51 the strikethrough formatting would come from you having multiple ~ in your message. Eg

~This is struck out~

~This is struck out~

It's helpful to wrap any code, output or similar with three backticks, which is generally with the ~ key next to the 1. That's what creates the grey block you see above.

krisgesling avatar Apr 06 '21 05:04 krisgesling

I did confirm IP address via WebUI and "what is my IP address"; behavior did not occur yesterday though I only restarted my (2) assembled dev kits once each. The device was fully working to handle intents, so the network connection was definitely up, just no SSH response..

Maybe if this happens again, I can try toggling the SSH switch in the web settings.

NeonDaniel avatar Apr 06 '21 16:04 NeonDaniel

FWIW, and obviously that's not very much, I've had an open line to my unit for days at a time and only experienced disconnects when it rebooted.

I mention this only because it slightly increases the odds it's about your network, rather than the mk2.

ChanceNCounter avatar Apr 06 '21 16:04 ChanceNCounter

That was badly phrased, of course: I only experienced reboots when appropriate =P never seen this bug, nor any abrupt/inappropriate timeouts, disconnects, or interruptions while connected.

ChanceNCounter avatar Apr 06 '21 16:04 ChanceNCounter

FWIW, and obviously that's not very much, I've had an open line to my unit for days at a time and only experienced disconnects when it rebooted.

I mention this only because it slightly increases the odds it's about your network, rather than the mk2.

I also have persistent connections once established. It's just a strange situation where a few times I'm unable to establish a connection after a reboot but it seems resolved after rebooting... Could very well be related to my Network topology though...

For reference, I'm running Ubiquiti AP's with a PFSense router.. Everything I'm doing is on the same SSID and subnet; DHCP is enabled, but so far my 2 Mark2's have kept the same IP addresses

NeonDaniel avatar Apr 06 '21 17:04 NeonDaniel

Yeah right, thanks for the extra info.

I've bumped it to low priority for the moment given it's not still occurring but certainly something that shouldn't be happening.

krisgesling avatar Apr 06 '21 21:04 krisgesling