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

🐛 [webtrees] Watchdog restarts a healthy 2.2.1 installation #1693

Closed
arsenyspb opened this issue Jan 1, 2025 · 8 comments
Closed

🐛 [webtrees] Watchdog restarts a healthy 2.2.1 installation #1693

arsenyspb opened this issue Jan 1, 2025 · 8 comments
Labels
bug Something isn't working

Comments

@arsenyspb
Copy link

Description

When I have "watchdog" enabled, with mariadb clean Out Of The Box Experience (OOBE) installation (without even user created) I see perfectly normal 2.2.1 in a reboot loop, - comes online, exposes a webpage, logs few port 80 health checks, then reboots.

Reproduction steps

Raspberry Pi 4 (rpi4-64)
Core 2024.12.5
Supervisor 2024.12.0
Operating System 14.1
Frontend 20241127.8

Addon Logs

...snip - end of the previous successful boot...
[NV_INIT] Starting Apache
webtrees:80 127.0.0.1 - - [01/Jan/2025:17:30:19 +0800] "GET / HTTP/1.0" 400 618 "-" "-"
webtrees:80 127.0.0.1 - - [01/Jan/2025:17:30:49 +0800] "GET / HTTP/1.0" 400 618 "-" "-"
webtrees:80 127.0.0.1 - - [01/Jan/2025:17:31:19 +0800] "GET / HTTP/1.0" 400 618 "-" "-"
Starting...
/etc/cont-init.d/00-banner.sh: executing
-----------------------------------------------------------
 Add-on: Webtrees
 web's leading on-line collaborative genealogy application
-----------------------------------------------------------
 Add-on version: 2.2.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 14.1  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.12.5
 Home Assistant Supervisor: 2024.12.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
...snip - new boot...

Architecture

aarch64

OS

HAos

@arsenyspb arsenyspb added the bug Something isn't working label Jan 1, 2025
@arsenyspb arsenyspb changed the title 🐛 [webtrees] Watchdog restarts a perfectly healthy install 🐛 [webtrees] Watchdog restarts a healthy 2.2.1 installation Jan 1, 2025
@alexbelgium
Copy link
Owner

Ahah love the OOBE definition ;) thanks for reporting I'll disable temporarily the healthcheck

@alexbelgium
Copy link
Owner

BTW I've pushed a new add-on for grampsweb! A nice alternative that is even easier to setup

@alexbelgium
Copy link
Owner

Actually there is no healthcheck instruction on the dockerfile! Not sure what causes the restarts

alexbelgium added a commit that referenced this issue Jan 2, 2025
@alexbelgium
Copy link
Owner

It was upstream. I've implemented my own system hope it will be better

@alexbelgium
Copy link
Owner

Hi, I've pushed a new version with code refactor allowing for data folder change, please let me know how it goes!

@arsenyspb
Copy link
Author

Testing on 2.2.1-4 with watchdog toggled on, so far no restarts.

@arsenyspb
Copy link
Author

I have "watchdog" on in Hassio and zero reboots on 2.2.1-4 for 24+ hours, I think we can close this, thanks for patching the behaviour!

Just curious: is there a heartbeat implemented at all, one way or another?..

@alexbelgium
Copy link
Owner

Great news ! Actually I put in some effort to actually hide the heartbeat to avoid spamming the log

RUN \
# Handle Apache configuration
if [ -d /etc/apache2/sites-available ]; then \
for file in /etc/apache2/sites-*/*.conf; do \
sed -i '/<VirtualHost/a \ \n # Match requests with the custom User-Agent "HealthCheck" \n SetEnvIf User-Agent "HealthCheck" dontlog \n # Exclude matching requests from access logs \n CustomLog ${APACHE_LOG_DIR}/access.log combined env=!dontlog' "$file"; \
done; \
fi && \
\
# Handle Nginx configuration
if [ -f /etc/nginx/nginx.conf ]; then \
awk '/http \{/{print; print "map $http_user_agent $dontlog {\n default 0;\n \"~*HealthCheck\" 1;\n}\naccess_log /var/log/nginx/access.log combined if=$dontlog;"; next}1' /etc/nginx/nginx.conf > /etc/nginx/nginx.conf.new && \
mv /etc/nginx/nginx.conf.new /etc/nginx/nginx.conf; \
fi
. Perhaps I could make the hiding optional if it is useful to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants