Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Latest Release Over Internet Leads to 500 Errors #540

Open
LRParser opened this issue Dec 23, 2024 · 4 comments
Open

Update to Latest Release Over Internet Leads to 500 Errors #540

LRParser opened this issue Dec 23, 2024 · 4 comments

Comments

@LRParser
Copy link

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:

  1. http://pioreactor.local/unit_api/versions/app
  2. http://pioreactor.local/api/configs/config.ini
  3. 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>
@CamDavidsonPilon
Copy link
Member

CamDavidsonPilon commented Dec 23, 2024

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

@LRParser
Copy link
Author

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)

@CamDavidsonPilon
Copy link
Member

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...

@LRParser
Copy link
Author

I will reflash and post here on how it goes - thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants