Octoprint not starting after fresh flash and restore

What is the problem?

Due to the warning about python issues, I took the "easy way" (so called) of doing the upgrade. I flashed a new SD, booted it, and octoprint came up in welcome mode. I proceeded to upload and restore the backup, and I haven't been able to get octoprint to start since. I've rebooted, and used the "service" utility, but no joy. I don't know how to proceed. I thought I was following best practices, but I'm out of luck. Needless to say, I'm glad I didn't overwrite the original image.

I don't have a lot of plugins. I saw that it installed preheat, but the rest went by too fast. If this is logged somewhere, I'll happily grab it. But the restore seemed to go successfully and it said it was restarting, but it is not responding.

netstat -l shows nothing listening on http or https

BTW, while I've got ya'll, is there a way to do the welcome mode restore with a file on the octoprint host? I "preloaded" the file via sftp, but then had to transfer it to a workstation in order to upload it. I think there should be a way to use a file already on the machine.

What did you already try to solve it?

rebooted, stopped the service, set safe mode flag, started the service

Have you tried running in safe mode?

Tried - won't come up

Did running in safe mode solve the problem?

Can't get that far

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

Can't get far enough to create one

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

OctoPrint version : 1.11.3
OctoPi version : 1.1.0
Python 3.11.2
Linux octopi 6.6.51+rpt-rpi-v7 #1 SMP Raspbian 1:6.6.51-1+rpt3 (2024-10-08) armv7l GNU/Linux
Raspberry Pi 3B
Creality Ender 3 Pro

In SSH, sudo service octoprint status. You can retrieve the log with scp, winscp, or filezilla with SSH credentials to get to the log file at /home/<username>/.octoprint/logs/octoprint.log. you can try stopping the service and starting octoprint via command line and see what the errors are with /home/<username>/oprint/bin/octoprint serve.

Well. Don't I just feel silly. I got the octoprint status as you said, and it said running in safe mode. So I tried the reconnect dialog button, and nothing happened. But THEN I actually RELOADED the page, and voila! I was able to connect. It was in safe mode, so I double-checked the config.yaml file, and it was not in there, so I restarted it and it came up with my preheat plugin installed, knew about my printer, had all the print files, knew my logins - in other words, perfect. So, I guess we will never know if there was actually the problem at all. Maybe the only problem was that I was relying on the reconnect dialog. So - maybe nothing was ever wrong? I was just relying on the reconnect dialog when I shouldn't have? Thank you so much for guiding me to discover that there was actually no problem at all.

I would still like to be able to restore from a local file via the web interface, or, in the meantime, from the command line. For instance, when I flashed the image, I mounted the ext4fs file system and copied the zip file to the SD card, but there was no way to get to it from the welcome script. Any suggestions for that? Obviously, I don't need it this time, but I will at some point in the future.

There's command line usage for backup/restore you can do when logged in locally.

https://docs.octoprint.org/en/main/bundledplugins/backup.html#command-line-usage

OK. Let me make sure I understand. I am proceeding from the assumption that restoring from a backup will automatically bypass the Welcome wizard.

I think there are two cases of interest here - one where the backup file was copied into the filesystem on the machine that flashed the card, and the other where the file would be transferred, perhaps by sftp or scp, after the system is booted (and the filesystem expanded). So - the steps would go like this

  1. after the flash and prior to booting, on the machine doing the flash, copy the backup file from wherever it was saved (unless doing after the boot, see below)
    [possibly right into ~pi/.octoprint/data/backup]
  2. install the card and boot the system
  3. SSH in
  4. sudo service octoprint stop
  5. copy the backup file from wherever it was saved unless done in step 1
  6. octoprint plugins backup:restore [Options as desired] PATH_TO_FILE
  7. sudo service octoprint start

and then it should come up and not need the Welcome wizard?

For the record, I noticed this behaviour myself last week. It's a bug that is actually a side effect of some security fixes. I've just created an issue about it:

and already have a working fix that will roll out with 1.11.4.

Yeah, for the most part. Your step 6 needs to be full path to the octoprint executable (~/oprint/bin/octooprint plugins backup:restore...) or you need to activate OctoPrint's venv (source ~/oprint/bin/activate) first.