tech:jdownloader_restart
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tech:jdownloader_restart [2026/09/20 11:44] – created katsimbris | tech:jdownloader_restart [2026/09/22 21:15] (current) – [Quick Post-Update Check] katsimbris | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | ===== Problem ===== | + | JDownloader runs directly on Ubuntu as a **systemd service**. It is **not a Docker container**. |
| - | JDownloader will not restart on its own upon update. | + | Permanent installation directory: |
| - | ===== Fix ===== | + | < |
| + | / | ||
| + | </ | ||
| - | Below is the code to restart: | + | Systemd service: |
| < | < | ||
| + | jdownloader.service | ||
| + | </ | ||
| + | |||
| + | The established JDownloader configuration is stored under: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== Normal Update Procedure ===== | ||
| + | |||
| + | It is okay to initiate a JDownloader update through **MyJDownloader / the web interface**. | ||
| + | |||
| + | JDownloader may stop and restart itself while applying an update. Give it a couple of minutes to complete before intervening. | ||
| + | |||
| + | After an update, verify that the service came back: | ||
| + | |||
| + | <code bash> | ||
| + | systemctl is-active jdownloader | ||
| + | </ | ||
| + | |||
| + | Normal result: | ||
| + | |||
| + | < | ||
| + | active | ||
| + | </ | ||
| + | |||
| + | For more detail: | ||
| + | |||
| + | <code bash> | ||
| sudo systemctl status jdownloader --no-pager | sudo systemctl status jdownloader --no-pager | ||
| + | </ | ||
| + | |||
| + | The running process can also be checked with: | ||
| + | |||
| + | <code bash> | ||
| + | pgrep -af ' | ||
| + | </ | ||
| + | |||
| + | A healthy installation should show Java running: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | For example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== Starting and Stopping JDownloader ===== | ||
| + | |||
| + | Start JDownloader: | ||
| + | |||
| + | <code bash> | ||
| sudo systemctl start jdownloader | sudo systemctl start jdownloader | ||
| + | </ | ||
| + | |||
| + | Stop JDownloader: | ||
| + | |||
| + | <code bash> | ||
| + | sudo systemctl stop jdownloader | ||
| + | </ | ||
| + | |||
| + | Restart JDownloader: | ||
| + | |||
| + | <code bash> | ||
| + | sudo systemctl restart jdownloader | ||
| + | </ | ||
| + | |||
| + | Check whether it is running: | ||
| + | |||
| + | <code bash> | ||
| + | systemctl is-active jdownloader | ||
| + | </ | ||
| + | |||
| + | Detailed status: | ||
| + | |||
| + | <code bash> | ||
| sudo systemctl status jdownloader --no-pager | sudo systemctl status jdownloader --no-pager | ||
| </ | </ | ||
| - | Looking for: | + | ===== If JDownloader Does Not Restart ===== |
| + | |||
| + | First check its status: | ||
| + | |||
| + | <code bash> | ||
| + | sudo systemctl status jdownloader --no-pager | ||
| + | </ | ||
| + | |||
| + | If the service is simply stopped, try starting it: | ||
| + | |||
| + | <code bash> | ||
| + | sudo systemctl start jdownloader | ||
| + | </ | ||
| + | |||
| + | Then verify: | ||
| + | |||
| + | <code bash> | ||
| + | systemctl is-active jdownloader | ||
| + | </ | ||
| + | |||
| + | If the service fails again, **do not immediately reinstall JDownloader, | ||
| + | |||
| + | Check that the main application files still exist: | ||
| + | |||
| + | <code bash> | ||
| + | ls -lh / | ||
| + | </ | ||
| + | |||
| + | Check whether another JDownloader Java process is already running: | ||
| + | |||
| + | <code bash> | ||
| + | pgrep -af ' | ||
| + | </ | ||
| + | |||
| + | If '' | ||
| + | |||
| + | ===== Configuration ===== | ||
| + | |||
| + | The established JDownloader configuration is stored under: | ||
| < | < | ||
| - | Loaded: ... enabled | + | / |
| - | Active: inactive (dead) | + | |
| </ | </ | ||
| + | |||
| + | This directory contains the settings used by the established installation. | ||
| + | |||
| + | **Preserve this directory during troubleshooting or recovery.** | ||
| + | |||
| + | Do not replace it with the configuration from a newly created or temporary JDownloader installation. | ||
| + | |||
| + | ===== .jd_home Warning ===== | ||
| + | |||
| + | During an update failure, troubleshooting, | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Do **not** assume this is the permanent installation. | ||
| + | |||
| + | The systemd-managed installation is: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | A '' | ||
| + | |||
| + | In particular, do **not** replace: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | with: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | unless there is a specific, verified reason to do so. | ||
| + | |||
| + | The presence of newer '' | ||
| + | |||
| + | ===== Logs ===== | ||
| + | |||
| + | Show the most recent systemd log entries: | ||
| + | |||
| + | <code bash> | ||
| + | journalctl -u jdownloader -n 100 --no-pager | ||
| + | </ | ||
| + | |||
| + | Follow the service log live: | ||
| + | |||
| + | <code bash> | ||
| + | journalctl -u jdownloader -f | ||
| + | </ | ||
| + | |||
| + | Press '' | ||
| + | |||
| + | JDownloader' | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | These logs can be useful when diagnosing an update or restart failure. | ||
| + | |||
| + | ===== September 21, 2026 Update Failure ===== | ||
| + | |||
| + | On September 21, 2026, an update initiated through JDownloader resulted in the service becoming unavailable. | ||
| + | |||
| + | Investigation established that JDownloader was operating from the correct installation: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | At approximately 13:28, JDownloader deliberately initiated its normal update/ | ||
| + | |||
| + | < | ||
| + | JDownloader.jar -forceupdate | ||
| + | </ | ||
| + | |||
| + | The updater continued to operate against the correct ''/ | ||
| + | |||
| + | Its updater self-test used: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | and reported: | ||
| + | |||
| + | < | ||
| + | Validate: OK | ||
| + | SelfTest Results: OK | ||
| + | Self Update successful | ||
| + | </ | ||
| + | |||
| + | JDownloader subsequently performed a normal shutdown. At 13:31:59, systemd recorded: | ||
| + | |||
| + | < | ||
| + | jdownloader.service: | ||
| + | </ | ||
| + | |||
| + | However, by the next attempt to start the service at 13:32:55: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | was no longer available. | ||
| + | |||
| + | Systemd therefore reported: | ||
| + | |||
| + | < | ||
| + | Error: Unable to access jarfile / | ||
| + | </ | ||
| + | |||
| + | and subsequent automatic restart attempts failed for the same reason. | ||
| + | |||
| + | The exact reason the updater failed to leave a usable replacement '' | ||
| + | |||
| + | The investigation **did not find evidence that initiating the update through MyJDownloader was incorrect**, | ||
| + | |||
| + | A separate fresh JDownloader installation was discovered under: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | It contained newer application files, but its '' | ||
| + | |||
| + | The established configuration under: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | was therefore preserved. | ||
| + | |||
| + | For this specific recovery, fresh copies of '' | ||
| + | |||
| + | After recovery: | ||
| + | |||
| + | <code bash> | ||
| + | systemctl is-active jdownloader | ||
| + | </ | ||
| + | |||
| + | returned: | ||
| + | |||
| + | < | ||
| + | active | ||
| + | </ | ||
| + | |||
| + | and the running Java process again used: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | MyJDownloader also reconnected using the existing configuration. | ||
| + | |||
| + | **Important: | ||
| + | |||
| + | ===== Quick Post-Update Check ===== | ||
| + | |||
| + | After initiating a JDownloader update or restart, wait a couple of minutes and run: | ||
| + | |||
| + | <code bash> | ||
| + | systemctl is-active jdownloader | ||
| + | ls -lh / | ||
| + | cat / | ||
| + | pgrep -af ' | ||
| + | </ | ||
| + | |||
| + | Normal results should show: | ||
| + | |||
| + | * '' | ||
| + | * ''/ | ||
| + | * '' | ||
| + | * the same process ID is running Java with ''/ | ||
| + | |||
| + | If '' | ||
| + | |||
| + | Stop the service first: | ||
| + | |||
| + | <code bash> | ||
| + | sudo systemctl stop jdownloader | ||
| + | </ | ||
| + | |||
| + | Then investigate the updater state before restoring any files. | ||
| + | |||
tech/jdownloader_restart.1789919076.txt.gz · Last modified: by katsimbris
