OctoPrint is not Running... SSH won't accept password, third time flashing


Problem: For some reason, it seems when I've removed power and plug it back into the RPi, OctoPrint fails to start and when I try to SSH into it, it will not accept any password

What I've done: The only thing I can do is re-flash and start from scratch

Additional Info: Flashing latest OctoPi 0.15.1, running on a brand new RPi 3B+; Only 3 plugins installed: OctoLapse, OctoPrint Anywhere, and History

So, I cannot pull any logs. I flash and setup OctoPrint and it runs fine for different amounts of time. Then, when OctoPrint suddenly stops responding, I pull the power and plug it back in. When I try launching OctoPrint, I get the standard OctoPtint is not running message, and when I try to SSH into the device, it takes the username but then it will not accept the password I had changed it to, nor will it accept the default. Any thoughts?


Have you tried connecting the machine to a monitor and keyboard?


Yeah, don't do that. OctoPrint runs on regular raspbian, just pulling the plug is a good way to corrupt the sd card.

If you can't log in via SSH then that's something outside of octoprint's control, octoprint is just a program like photoshop or notepad, it's got nothing to do with your wifi or operating system's user accounts.


I'm not trying to be intentionally thick, but what else am I supposed to do? That's all good info you provided, but I am not clear on what I could have done differently.


Not yet, what should I do when I try it?


OK, so i hooked up my monitor and keyboard to the RPi, and I am kind of baffled what I was expecting to happen, but I get to the login screen and it is doing the same thing... asking for login, so I enter pi, then password, and both the password I changed it to, and the default, do not work... I am going to flash it again and see if it is one of my plugins I am trying to install is doing this. The last couple times, it seems to happen after trying to install OctoLapse, and the installation never finishes, just hangs on trying to install Pillow.


OK, hopefully a final update as I have now seemed to get the RPi running, with my three primary plugins installed, and is still running... In a last ditch effort, I found another Micro SD card (32gb instead of 16) and a class 10 I think, and so far everything is running smooth... The other card was 16gb class 2... not sure if that was the problem, but so far it is the onyl change I've made, out of about 5-6, that seems to have made a difference.


Sometimes individual microSD cards go bad. I know that at one place where I worked, there was a little graveyard of perhaps ten that died of mysterious causes.

Honestly though, it sounds like you're starting to learn how this all works and you're starting to have more success.


It's just strange was all. I am not new to OctoPrint at all, I had been running it perfectly fine for about a year on my old Model B Rev 2. I needed to upgrade it, and that's when I started having all sorts of problems beginning two days ago, but now seems to be fine... for now.


I'm not trying to be intentionally thick, but what else am I supposed to do?

If octoprint stops responding and you can't shut down using it's GUI, you should log in via SSH to do a shutdown / reboot. If you can't even do that, it means something beyond octoprint's grasp has died, either the entire operating system for whatever reason, or your wifi connection has dropped (assuming wifi). My SBC's constantly drop the wifi connection in the print room because the signal is too weak for the crappy built in wifi chips that they use (laptops are fine down there, tablets also suffer drop out but will usually automatically reconnect).

I run a slightly modified version of this https://github.com/wxlcat/NetReconnector to keep my SBC (single board computers, this includes raspberry pi, orange pi, etc) connected to the wifi. It checks every minute for me, and if it can't ping the router it shuts off the wifi & starts it back up again. This will not fix a broken octoprint install / plugin, it's only for a flaky wifi connection that prevents all communication, including SSH.

Your issue with not being able to log in with any password sounds either like SD card corruption from just pulling the power, or the card itself was just bad. In the future I suggest not pulling the plug if octoprint stops responding, but see if you can pinpoint why it stopped. Is the entire pi unreachable by ping / ssh? Or did only octoprint stop working?


Well, it kept shifting back and forth between three states of failure:

  1. This being the "worst, would be all out failure of any kind of communication to the RPi... OctoPrint totally unreachable (not even any specific error) and SSH would fail at a network level. In this case, I had to simply reflash.
  2. OctoPrint would say it is not running and to check the logs, try restarting service etc... Sometimes, when this happened, I could reach the Pi via SSH but then authentication would fail for unknown reasons. In this case, I'd also just reflash and start over.
  3. Same as 2, but this time I could authenticate into the Pi via SSH, however, running restart commands never got OctoPrint running, and seemingly the logs stopped collecting info and there would not be any useful information in the logs since the time of the failure starting.

#3 only happened one time, but at that time it was when I decided to go ahead and try a different micro sd card and so far I finally have one print running and the three plugins I used installed without issue. The only other thing I have not done yet was upgrade pip to 18.1 that it likes to tell me is available at every plugin install, but I understand isn't 100% necessary. I am back to being hardwired now, which is how I did it for a year prior, just thought I'd try the wifi once I got the new RPi this week, but if the wifi is that iffy, I'll stick to keeping it hardwired.