What is the problem?
Octoprint worked fine for quite a while. I specifically remember turning the system off through the menu, and a few minutes later cut power of the printer including the raspberry pi. After a few days I returned, switched on the printer including raspberry pi. It did not post the message about it's IP in the printers graphical display, so I rebooted it and it displayed the ip. I tried reaching it through octoprint.local like always, and it would not connect. I tried reaching it through SSH and I get ssh: connect to host octopi.local port 22: Connection refused, same message if I ssh via IP.
What did you already try to solve it?
Restart router, restart octoprint, try to find log on sd card, but there does not seem to be one on? Is there a way to access the logs if I cant access the rpi while its running?
I also tried a portscan on the pi, did not return any results
Additional information about your setup
Latest octoprint version as of last week, raspberry pi 3B, Anet A8 with RAMPs and Marlin 1.1.8 bugfix with a few weeks old build.
Get a USB keyboard and plug in an HDMI cable and talk to it locally. Ask it its IP address (IFCONFIG), ask it to talk to your router (PING 192.168.X.X, or whatever IP scheme you use), and, if you have internet, ask it to talk to google (PING 8.8.8.8)
Also, the ANGRY IP SCANNER is a lot of fun in identifying both wired and wireless objects on your network
If you can get logged in locally (via keyboard/mouse/monitor brute-force), then you may want to visit sudo raspi-config and make sure that ssh is enabled. The message you received suggests that it's not enabled.
dmesg says something about `Cannot add dependency job for unit regernerate_ssh_host_keys_service, ignoring: Unit regenerate_ssh_host_keys.service failed to load: no such file or directory."
Spyder I appreciate your drive to help a lot. But please read what I wrote in the post. I said latest version, which is 1.3.8.
I'm on it for checking logs
Can you confirm sshd is running? (command and sample output follows; if there are multiple lines, please add them to your reply)
$ ps waxu |grep sshd
root 797 0.0 0.5 7860 4376 ? Ss Apr28 0:00 /usr/sbin/sshd -D
root 9856 0.0 0.6 11548 5112 ? Ss 21:02 0:00 sshd: pi [priv]
pi 9861 0.0 0.4 11548 4144 ? S 21:02 0:00 sshd: pi@pts/0
Are you sure ssh is listening across the whole network?
$ egrep -i listenaddress /etc/ssh/sshd_config
[only commented-out lines are returned in my case]
FWIW I think the dmesg comment is invalid- I have that on my octopi too:
[ 2.621894] systemd[1]: Cannot add dependency job for unit regenerate_ssh_host_keys.service, ignoring: Unit regenerate_ssh_host_keys.service failed to load: No such file or directory.
It does not return a result for `$ egrep -i listenaddress /etc/ssh/sshd_config
Also. We are exclusively discussing SSH. I cannot connect to it at all, neither ssh, nor http. It did work before. It was shutdown via octoprint guy, and switched off for a few days. I am quite a bit puzzled and considering doing a fresh install with octopi 0.15 ...
Let's focus on ssh, even if http doesn't work. Run 'status', then 'restart', then wait a few seconds and 'status' again, then 'ps'. Share a bunch of it here.
$ sudo service ssh status
$ sudo service ssh restart
$ sudo service ssh status
Here's an example of successfully running ssh:
pi@octopi:~ $ sudo service ssh status
β ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled)
Active: active (running) since Sat 2018-04-28 22:17:05 UTC; 4 days ago
Main PID: 797 (sshd)
CGroup: /system.slice/ssh.service
ββ 797 /usr/sbin/sshd -D
ββ11153 mosh-server new -c 256 -s -l LANG=en_US.UTF-8
ββ11154 -bash
ββ11207 sudo service ssh status
ββ11211 systemctl status ssh.service
Apr 28 22:17:05 octopi systemd[1]: Started OpenBSD Secure Shell server.
Apr 28 22:17:05 octopi sshd[797]: Server listening on 0.0.0.0 port 22.
Apr 28 22:17:05 octopi sshd[797]: Server listening on :: port 22.
May 02 21:02:31 octopi sshd[9856]: Accepted publickey for pi from 192.168.0.103 port 62132 ssh2: RSA 5f:88:71:df:...:40:48
May 02 21:02:31 octopi sshd[9856]: pam_unix(sshd:session): session opened for user pi by (uid=0)
May 02 22:54:40 octopi sshd[9856]: pam_unix(sshd:session): session closed for user pi
May 03 14:18:38 octopi sshd[11145]: Accepted publickey for pi from 192.168.0.103 port 56238 ssh2: RSA 5f:88:71:df...:40:48
May 03 14:18:38 octopi sshd[11145]: pam_unix(sshd:session): session opened for user pi by (uid=0)
May 03 14:18:38 octopi sshd[11145]: pam_unix(sshd:session): session closed for user pi
May 03 14:18:47 octopi sudo[11207]: pi : TTY=pts/1 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/sbin/service ssh status
May 03 14:18:47 octopi sudo[11207]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Hint: Some lines were ellipsized, use -l to show in full.