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

DST Server error 500 #78

Closed
elektronicanet opened this issue Oct 28, 2024 · 13 comments
Closed

DST Server error 500 #78

elektronicanet opened this issue Oct 28, 2024 · 13 comments

Comments

@elektronicanet
Copy link

elektronicanet commented Oct 28, 2024

After using Babybuddy without any problem for 2 months as an addon in Home Assistant, suddenly it stopped working, and it shows Server error 500 after logging in. The login page is accessible and works (admin/admin) both Ingress and direct URL with port number (8247), but it won't open the dashboard anymore.

What I tried:

  • reset the whole server/system
  • reset Babybuddy only

The log in the HA addon (set to DEBUG) shows:

  post_worker_init: <function PostWorkerInit.post_worker_init at 0x7f14faf9c180>
  worker_int: <function WorkerInt.worker_int at 0x7f14faf9c2c0>
  worker_abort: <function WorkerAbort.worker_abort at 0x7f14faf9c400>
  pre_exec: <function PreExec.pre_exec at 0x7f14faf9c540>
  pre_request: <function PreRequest.pre_request at 0x7f14faf9c680>
  post_request: <function PostRequest.post_request at 0x7f14faf9c720>
  child_exit: <function ChildExit.child_exit at 0x7f14faf9c860>
  worker_exit: <function WorkerExit.worker_exit at 0x7f14faf9c9a0>
  nworkers_changed: <function NumWorkersChanged.nworkers_changed at 0x7f14faf9cae0>
  on_exit: <function OnExit.on_exit at 0x7f14faf9cc20>
  ssl_context: <function NewSSLContext.ssl_context at 0x7f14faf9ce00>
  proxy_protocol: False
  proxy_allow_ips: ['127.0.0.1']
  keyfile: None
  certfile: None
  ssl_version: 2
  cert_reqs: 0
  ca_certs: None
  suppress_ragged_eofs: True
  do_handshake_on_connect: False
  ciphers: None
  raw_paste_global_conf: []
  strip_header_spaces: False
[2024-10-28 08:28:32 +0100] [201] [INFO] Starting gunicorn 21.2.0
[2024-10-28 08:28:32 +0100] [201] [DEBUG] Arbiter booted
[2024-10-28 08:28:32 +0100] [201] [INFO] Listening at: http://0.0.0.0:8000 (201)
[2024-10-28 08:28:32 +0100] [201] [INFO] Using worker: gthread
[2024-10-28 08:28:32 +0100] [243] [INFO] Booting worker with pid: 243
[2024-10-28 08:28:32 +0100] [244] [INFO] Booting worker with pid: 244
[2024-10-28 08:28:32 +0100] [201] [DEBUG] 2 workers
[08:28:32] INFO: Starting NGINX...
[2024-10-28 07:28:32 +0000] [243] [DEBUG] Ignored premature client disconnection. No more data after: b'\n'
@alexrua2
Copy link

alexrua2 commented Oct 28, 2024

I have the same issue the only workaround I got for it so far is create new users with the admin user and use those for now.

@elektronicanet
Copy link
Author

elektronicanet commented Oct 28, 2024

That seems to work using a direct URL indeed! I created a new kid (not user). Then the dashboard page shows the selection between two kids and then you can use all functions except the dashboard view of the original kid.

What could be the problem? The dashboard seems to get corrupt, it may have to do with the clock wintertime change (clock one our back in time)?

By the way, do you think we should post it in the babybuddy Github or here? Is the addon causing the issue?

@boszme
Copy link

boszme commented Oct 29, 2024

babybuddy/babybuddy#892 (comment)

This is definitely an upstream bug IMHO

@alexrua2
Copy link

It's definitely to do with timezone and winter time change, I created a new user and noticed the user was not in the right time zone changed it and bricked that new user too. So logged in as admin again deleted the new user that just got bricked and created another and did not change the timezone and it works. I have access to the original child can post and use as normal.

@dbensmith
Copy link

dbensmith commented Nov 4, 2024

In my area the DST changeover occurred in the early morning on Sunday Nov. 3, but Baby Buddy didn't start throwing error 500 until later that day or early the next day.

The workarounds suggested above don't work for me because both of my user accounts return Error 500 on login. It doesn't matter whether I set the ingress user in the addon configuration and open within HA, or if I hit the local webserver over HTTP and log in directly. Same result.

I need a workaround so I'm considering digging into the sqlite db directly and looking for user account settings to edit. Not sure I want to go down that path though...

@cdubz
Copy link

cdubz commented Nov 4, 2024

@dbensmith I'm not entirely clear if this is possible with HA, but are you able to upgrade Baby Buddy to v2.6.1? It was just released a few days ago with the aim of fixing known DST issues.

@cdubz
Copy link

cdubz commented Nov 4, 2024

Ah looking at some other issues, it looks like not... @OttPeterR anything I can do to help get the HA version of Baby Buddy up to date? I'll have some time over the next two days.

@dbensmith
Copy link

@cdubz Wanted to chime in that I've been following your work upstream including the DST update, so I'm excited to use it and all the improvements once the HA addon project works through build issues blocking the upgrade. Thank you so much for your hard work!!

For others following along, here are some other workarounds I've been trying in the meantime:

  • The Baby Buddy HA integration that connects to Baby Buddy through the API works to add entries, but you have to build a dashboard from scratch to use it.
  • The Baby Buddy Android app can connect to the Baby Buddy HA addon's local bypass URL (http://myhostname:8000), but exposing this URL in addon settings is insecure and if you do, it's limited to your local network.

A last resort for me would be to find a way to port my data out of the HA addon and into a separate hosted instance of Baby Buddy based on the main repo.

@OttPeterR OttPeterR changed the title Server error 500 DST Server error 500 Nov 5, 2024
@OttPeterR
Copy link
Owner

I'll update my version bump branch and see what the latest build issues are and follow up here. I appreciate all the support!

@OttPeterR
Copy link
Owner

I'm still getting build errors on my PR #73 for a few arch's. I'd be happy to incorporate your changes from #76 but it's going to take someone more familiar with those architectures to resolve those build issues 😞

@cdubz
Copy link

cdubz commented Nov 5, 2024

@OttPeterR check out my CR over at #73 (review)

@OttPeterR
Copy link
Owner

closing, resolved by #73
thanks for all the help!

@dbensmith
Copy link

Looks like it worked! My timezone is properly configurable again without breaking anything, and the new features are nice too.

Thank you very much for you hard work @cdubz and @OttPeterR!

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

6 participants