Update to Latest Release Over Internet Leads to 500 Errors
I updated my v1.0 Pioreactor over the internet to the latest version (Latest version available:24.12.10) and can now no longer see any experiments, and I get 500 Internal Server Error when trying to access the routes:
- http://pioreactor.local/unit_api/versions/app
- http://pioreactor.local/api/configs/config.ini
- http://pioreactor.local/api/experiments/assignment_count (etc) Otherwise the GUI is partially browseable. What can I do to recover my Pioreactor? I suspect I should try to install a version from a zip, but I do not know which. I do not particularly care about keeping the experimental data. The shared config.ini looks like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>500 Internal Server Error</title>
</head>
<body>
<h1>500 Internal Server Error</h1>
</body>
</html>
Hi @LRParser, do you know what version you were on previously?
Please report back what the following says after you SSH into your leader:
sudo systemctl status lighttpd.service
Unfortunately I do not know what version I was on before, possibly an old one. Here is the output:
pioreactor@pioreactor01:~ $ sudo systemctl status lighttpd.service
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; preset: enabled)
Active: active (running) since Mon 2024-12-23 14:19:35 CET; 1h 16min ago
Process: 871 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 890 (lighttpd)
Tasks: 2 (limit: 1688)
CPU: 1h 16min 28.344s
CGroup: /system.slice/lighttpd.service
├─ 890 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
└─4086 /usr/bin/python3 /var/www/pioreactorui/main.fcgi
Dec 23 15:36:01 pioreactor01 lighttpd[4084]: ImportError: cannot import name 'Dataset' from 'pioreactor.structs' (/usr/local/lib/python3.11/dist-packages/pioreactor/structs.py)
Dec 23 15:36:02 pioreactor01 lighttpd[4085]: Traceback (most recent call last):
Dec 23 15:36:02 pioreactor01 lighttpd[4085]: File "/var/www/pioreactorui/main.fcgi", line 12, in <module>
Dec 23 15:36:02 pioreactor01 lighttpd[4085]: WSGIServer(create_app()).run()
Dec 23 15:36:02 pioreactor01 lighttpd[4085]: ^^^^^^^^^^^^
Dec 23 15:36:02 pioreactor01 lighttpd[4085]: File "/var/www/pioreactorui/pioreactorui/__init__.py", line 66, in create_app
Dec 23 15:36:02 pioreactor01 lighttpd[4085]: from .api import api
Dec 23 15:36:02 pioreactor01 lighttpd[4085]: File "/var/www/pioreactorui/pioreactorui/api.py", line 27, in <module>
Dec 23 15:36:02 pioreactor01 lighttpd[4085]: from pioreactor.structs import Dataset
Dec 23 15:36:02 pioreactor01 lighttpd[4085]: ImportError: cannot import name 'Dataset' from 'pioreactor.structs' (/usr/local/lib/python3.11/dist-packages/pioreactor/structs.py)
Oh, yea I know what the bug is. It's an annoying bug where your UI software version is probably up to date, but your app version is further behind.
Honestly, depending on how far back your software version is, I would suggest just reflashing your Pioreactor with the latest image: https://docs.pioreactor.com/user-guide/software-set-up#setting-up-your-raspberry-pi
You would lose your data (but you can download the database before reflashing - let me know if you would like instructions)
Otherwise, you can solve this by going back to the previous version, and then one update at a time, getting to the latest version. Like I said, this is annoying and slow...
I will reflash and post here on how it goes - thank you.