Raspbian Buster

Hello , been scouring the forum here and elsewhere to find out if Octoprint is safe on Raspbian Buster ?? Is it just a case of dist-upgrade ??

Hi.
Yeah it works on buster but a dist-upgrade fron stretch breakes it.

Either set it up yourself on raspian buster or try the octopi nightly

1 Like

Thanks , I’ll give the nightly a whirl - personally I don’t think using a RaspberryPi4 will give massive benefits (if any) but keeping on top of Raspbian is a good thing

Well it depends. I use it in desktop mode and it's muuuuch better than every pi before.

See my work around in my comment

2 Likes

If you upgraded to Buster from Strech, you just need to execute a few commands to get the OctoPrint server working again. From a terminal window on the Pi with OctoPrint installed type these commands:

cd OctoPrint
source venv/bin/activate
pip install pip --upgrade
pip install https://get.octoprint.org/latest
sudo service octoprint restart

OctoPrint will now respond properly. If you still have an issue, you may have overwritten your haproxy.cfg file during the upgrade.

1 Like

Great it worked, but I had to create virtual environment again with "virtualenv venv" as python broke.

Rest all good, everything came back. Thanks

1 Like

Make sure when upgrading that you check/change /etc/apt/sources.list.d/* files to buster.
I forgot this step and my touchscreen wouldn't go in the octoprint gui(TouchUI).

1 Like

I upgraded to Buster on an Rpi3 and although the service was showing as running nothing was working (no web interface for OctoPrint at all). HAProxy was also showing as running, but no Octoprint on port 80 as I had configured before (or on 5000). But mjpeg streamer was still working.

I went through removing everything and re-installing from scratch and after I went through all this then I saw this:

:stuck_out_tongue: I'm doing everything the hard way it seems. At least I got it working in Python3 now.

I removed OctoPrint folder to clean up any mess left behind from before (and to upgrade to Python3 at the same time since I was stuck on python2).

I purged HAProxy, Python2.7 and everything Python2 related first and installed Python3, pip3, etc via apt including python3-virtualenv.
however virtualenv DID NOT WORK and I couldn't figure out how to get it to work.
so I had to do:

sudo apt install python-virtualenv

When I removed the OctoPrint folder from home, I kept .octoprint in place, however this did nothing, did not restore the settings and had to restore from backup via the UI. I was hoping for better results so make sure you do take a backup first, and also beware that the backup and restore does not restore everything (things like themes and webcam settings will be missing). Here is the process I used for installing OctoPi from scratch:

virtualenv --python=python3 venv
source venv/bin/activate
pip3 install pip --upgrade
pip3 install octoprint
exit
~/OctoPrint/venv/bin/octoprint serve
wget https://github.com/foosel/OctoPrint/raw/master/scripts/octoprint.init && sudo mv octoprint.init /etc/init.d/octoprint
wget https://github.com/foosel/OctoPrint/raw/master/scripts/octoprint.default && sudo mv octoprint.default /etc/default/octoprint
sudo chmod +x /etc/init.d/octoprint

nano /etc/default/octoprint
## Uncoment: DAEMON=/home/pi/OctoPrint/venv/bin/octoprint

sudo update-rc.d octoprint defaults

sudo service octoprint {start|stop|restart}

sudo apt install haproxy

sudo nano /etc/haproxy/haproxy.cfg

#### ADD: 
frontend public
        bind :::80 v4v6
        use_backend webcam if { path_beg /webcam/ }
        default_backend octoprint

backend octoprint
        reqrep ^([^\ :]*)\ /(.*)     \1\ /\2
        option forwardfor
        server octoprint1 127.0.0.1:5000

backend webcam
        reqrep ^([^\ :]*)\ /webcam/(.*)     \1\ /\2
        server webcam1  127.0.0.1:8080
		
##############

sudo nano /etc/default/haproxy
##### Add: ENABLED=1

sudo service haproxy start ## or restart if already running to apply new settings