Bjorn icon indicating copy to clipboard operation
Bjorn copied to clipboard

Port Issues when restarting Bjorn service

Open IncredibleZuess opened this issue 1 year ago • 1 comments

Description

There is an issue with threading where the web server does not exit and unbind the port fully sometimes before the new web server thread is initialized which results in the server ports hopping from 8000 to 8001

Steps to Reproduce:

Let Bjorn start normally then after a few seconds run:

sudo systemctl restart bjorn.service

Setup:

Hardware:

  • Raspberry Pi 4B
  • 2.7 inch WaveShare E-ink Display V1

Software:

  • Raspberry Pi OS
  • System: 32-bit
  • Kernel version: 6.6
  • Debian version: 12 (bookworm)

Expected Behaviour:

The Bjorn service restarts and the web server binds to port 8000 successfully

Actual Behaviour:

First Stop

image image

Second Stop:

image image

Interesting Note

While writing the issue I noticed that this only happens when the web page is rendered in a browser so it may be that the console being rendered in the web app is adding a few seconds before stopping the server completely

IncredibleZuess avatar Nov 10 '24 07:11 IncredibleZuess

Yes, unfortunately, i did not manage to free up the 8000 port when i restart the Bjorn service. This is why i created a .sh file to kill the pid when the service starts.

My only workaround for now was incremental solution.But i hope this problem will be solved in next releases

infinition avatar Nov 11 '24 11:11 infinition

Solved in the upcoming release.

infinition avatar Nov 25 '24 08:11 infinition