#1
|
|||
|
|||
![]()
Install Java and get JDownloader with the following commands.
Code:
sudo apt install openjdk-8-jre-headless wget http://installer.jdownloader.org/JDownloader.jar Code:
sudo mkdir /opt/jdownloader sudo mv jdownloader.jar /opt/jdownloader sudo chown media:media /opt/jdownloader Code:
java -jar /opt/jdownloader/JDownloader.jar -norestart Code:
[Unit] Description=JDownloader Service After=network.target [Service] Environment=JD_HOME=/opt/jdownloader Type=oneshot ExecStart=/usr/bin/java -Djava.awt.headless=true -jar /opt/jdownloader/JDownloader.jar RemainAfterExit=yes User=media # Should be owner of /opt/jdownloader Group=media # Should be owner of /opt/jdownloader [Install] WantedBy=multi-user.target Code:
sudo systemctl enable jdownloader.service Enjoy! Source: **External links are only visible to Support Staff****External links are only visible to Support Staff** |
#2
|
|||
|
|||
![]()
First of all thanks @wuethrich for the guide.
I followed it step by step and all seemed to be fine until i rebooted. When booting it return me the message: FAILED: failed to start jdownloader service I've tried Code:
systemctl status jdownloader.service Code:
jdownloader.service - JDownloader Service Loaded: loaded (/etc/systemd/system/jdownloader.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2017-04-18 11:07:40 CEST; 31s ago Process: 1155 ExecStart=/usr/bin/java -Djava.awt.headless=true -jar /opt/jdownloader/JDownloader.jar (code=exited, status=217/USER) Main PID: 1155 (code=exited, status=217/USER) Apr 18 11:07:40 univid systemd[1]: Starting JDownloader Service... Apr 18 11:07:40 univid systemd[1]: jdownloader.service: Main process exited, code=exited, status=217/USER Apr 18 11:07:40 univid systemd[1]: Failed to start JDownloader Service. Apr 18 11:07:40 univid systemd[1]: jdownloader.service: Unit entered failed state. Apr 18 11:07:40 univid systemd[1]: jdownloader.service: Failed with result 'exit-code'. SOLVED! Last edited by rabazzoni; 18.04.2017 at 11:36. Reason: SOLVED! |
#3
|
||||
|
||||
![]()
Would be nice if you can share how you solved it
![]()
__________________
JD-Dev & Server-Admin |
#4
|
|||
|
|||
![]()
There were formatting errors about the new systemd unit creation.
Here below the right code: Code:
[Unit] Description = JDownloader Service After = network.target [Service] Environment = /opt/jdownloader Type = oneshot ExecStart = /usr/bin/java -Djava.awt.headless=true -jar /opt/jdownloader/JDownloader.jar RemainAfterExit = yes User = media Group = media [Install] WantedBy = multi-user.target Last edited by rabazzoni; 19.04.2017 at 10:03. |
#5
|
||||
|
||||
![]()
Thanks for the feedback!
__________________
JD-Dev & Server-Admin |
#6
|
|||
|
|||
![]()
@Jiaz
Thanks for this. It worked perfectly. How can I start the JDownloader Interface once it has already beeing configured (to change login for example). Solved! (I used the web gui with advanced options to achieve my goals) Thanks ![]() Last edited by thomas087; 13.01.2018 at 15:31. |
#7
|
||||
|
||||
![]()
Thanks for the feedback! Glad you could solve it by yourself!
__________________
JD-Dev & Server-Admin |
#8
|
|||
|
|||
![]()
Hi,
when starting via systemd I suddenly got this error during bootup: Code:
/etc/systemd/system/jdownloader.service:6: Invalid environment assignment, ignoring: /opt/jdownloader Code:
Aug 14 00:30:18 Server java[1080]: ----------------Request Information------------- Aug 14 00:30:18 Server java[1080]: URL: http://update.appwork.org/jcgi/pkg?rt=SO&jn=JDownloader.jar&pv=4&cv=2100000001&ping=&uid=1534199417284_-2009379515171956358_jd&pkh=12f1848a883e733ed40fffff0dae2f35&app=JD&os=LINUX&arch=X86&os64=1&jvm64=1&urev=12080&srev=12051&surev=12076&ct=Normal&dst=-1&rev=12055&dedup=NONE&awfcxz=1&lng=de_ Aug 14 00:30:18 Server java[1080]: Host: update.appwork.org Aug 14 00:30:18 Server java[1080]: Connection-Timeout: 20000ms Aug 14 00:30:18 Server java[1080]: Read-Timeout: 60000ms Aug 14 00:30:18 Server java[1080]: ----------------Request------------------------- Aug 14 00:30:18 Server java[1080]: -------------Not Connected Yet!----------------- Aug 14 00:30:18 Server java[1080]: ----------------Response Information------------ Aug 14 00:30:18 Server java[1080]: -------------Not Connected Yet!------------------ Aug 14 00:30:18 Server java[1080]: [1B blob data] Aug 14 00:30:18 Server java[1080]: 17|org.jdownloader.update.UpdateManager.log 14.08.18 00:30:18 - SEVERE [ org.jdownloader.update.UpdateManager.log ] -> org.appwork.utils.net.BasicHTTP.BasicHTTPException: java.net.UnknownHostException: Could not resolve: -update.appwork.org<->update.appwork.org- Aug 14 00:30:18 Server java[1080]: at org.appwork.utils.net.BasicHTTP.BasicHTTP.download(BasicHTTP.java:286) Aug 14 00:30:18 Server java[1080]: at org.appwork.utils.net.BasicHTTP.BasicHTTP.download(BasicHTTP.java:166) Aug 14 00:30:18 Server java[1080]: at org.appwork.utils.net.BasicHTTP.BasicHTTP.download(BasicHTTP.java:142) Aug 14 00:30:18 Server java[1080]: at org.appwork.updatesys.client.defaultimpl.http.HttpClientImpl.internalGetWithProxy(HttpClientImpl.java:609) Aug 14 00:30:18 Server java[1080]: at org.appwork.updatesys.client.defaultimpl.http.HttpClientImpl.get(HttpClientImpl.java:257) Aug 14 00:30:18 Server java[1080]: at org.appwork.updatesys.client.defaultimpl.http.HttpClientImpl.get(HttpClientImpl.java:242) Aug 14 00:30:18 Server java[1080]: at org.appwork.updatesys.client.UpdateClient.get(UpdateClient.java:1651) Aug 14 00:30:18 Server java[1080]: at org.appwork.updatesys.client.UpdateClient.runUpdateCheck(UpdateClient.java:3346) Aug 14 00:30:18 Server java[1080]: at org.appwork.updatesys.client.UpdateClient.runPackageRequestAndServerSelection(UpdateClient.java:3404) Aug 14 00:30:18 Server java[1080]: at org.appwork.updatesys.client.UpdateClient.runUpdateCheck(UpdateClient.java:3359) Aug 14 00:30:18 Server java[1080]: at org.jdownloader.update.JDUpdateClient.runUpdateCheck(JDUpdateClient.java:224) Aug 14 00:30:18 Server java[1080]: at org.jdownloader.update.UpdateManager.runUpdateLoop(UpdateManager.java:1023) Aug 14 00:30:18 Server java[1080]: at org.jdownloader.update.PendingUpdate.run(PendingUpdate.java:19) Aug 14 00:30:18 Server java[1080]: at org.jdownloader.update.UpdateManager.run(UpdateManager.java:1669) Aug 14 00:30:18 Server java[1080]: at java.lang.Thread.run(Thread.java:748) Aug 14 00:30:18 Server java[1080]: Caused by: java.net.UnknownHostException: Could not resolve: -update.appwork.org<->update.appwork.org- Aug 14 00:30:18 Server java[1080]: at org.appwork.utils.net.httpconnection.HTTPConnectionUtils.resolvHostIP(HTTPConnectionUtils.java:324) Aug 14 00:30:18 Server java[1080]: at org.appwork.utils.net.httpconnection.HTTPConnectionUtils.resolvHostIP(HTTPConnectionUtils.java:65) Aug 14 00:30:18 Server java[1080]: at org.appwork.utils.net.httpconnection.HTTPConnectionImpl.resolvHostIP(HTTPConnectionImpl.java:745) Aug 14 00:30:18 Server java[1080]: at org.appwork.utils.net.httpconnection.HTTPConnectionImpl.getRemoteIPs(HTTPConnectionImpl.java:750) Aug 14 00:30:18 Server java[1080]: at org.appwork.utils.net.httpconnection.HTTPConnectionImpl.connect(HTTPConnectionImpl.java:773) Aug 14 00:30:18 Server java[1080]: at org.appwork.utils.net.BasicHTTP.BasicHTTP.download(BasicHTTP.java:201) Aug 14 00:30:18 Server java[1080]: ... 14 more Aug 14 00:30:18 Server java[1080]: 17|org.jdownloader.update.UpdateManager.log 14.08.18 00:30:18 - INFO [ org.appwork.updatesys.client.defaultimpl.http.HttpClientImpl(checkTryNextProxyOrGiveUp) ] -> Check if we can leave Aug 14 00:30:18 Server java[1080]: 17|org.jdownloader.update.UpdateManager.log 14.08.18 00:30:18 - SEVERE [ org.jdownloader.update.UpdateManager.log ] -> org.appwork.utils.net.BasicHTTP.BasicHTTPException: java.net.UnknownHostException: Could not resolve: -update.appwork.org<->update.appwork.org- When I start it via SSH after killing the original thread it works... And then is there a second issue: downloaded and extracted files are 755, which I cannot cut&paste them via Windows as network drive... Can I change new files automatically to 766? Due to issues I connect via guest Thank you very much! |
#9
|
|||
|
|||
![]()
Hi, I'm not sure if it's fit, but I'm running exactly this setup.
When I want to delete an extracted file, I cannot, due to file permission. my samba user is heimnetz. the owner of the new file is root:heimnetz with 755... When I manually change to heimnetz:heimnetz it works. An idea how to change the owner permanently for new files to heimnetz:heimnetz? |
#10
|
||||
|
||||
![]()
@LeRob:
The *best* solution would be to start JDownloader as user *heimnetz* sudo chown -R heimnetz:heimnetz /opt/jdownloader sudo su -c "java -jar /opt/jdownloader/JDownloader.jar &" heimnetz You can make use of *umask* to setup the umask of new created files/folders eg start.sh Code:
#!/bin/bash umask 000 cd /opt/jdownloader java -jar JDownloader.jar >/dev/null 2>/dev/null &
__________________
JD-Dev & Server-Admin |
#11
|
|||
|
|||
![]()
I enabled jdownloader.service and got this staus:
Code:
root@odhc1-02:~# systemctl status jdownloader.service ○ jdownloader.service - JDownloader Service Loaded: loaded (/etc/systemd/system/jdownloader.service; enabled; vendor preset: enabled) Active: inactive (dead) Jul 21 07:58:01 odhc1-02.local systemd[1]: /etc/systemd/system/jdownloader.service:10: Invalid user/group name or numeric ID: jd # Should be owner of /application/JDownloader Jul 21 07:58:01 odhc1-02.local systemd[1]: jdownloader.service: Unit configuration has fatal error, unit will not be started. Im am able to start »jd@odhc1-02:/application/JDownloader$ java -jar JDownloader.jar &« successful Here the listing of application/JDownloader Code:
root@odhc1-02:~# ll -h /application/JDownloader/ total 14M drwxr-xr-x 13 jd jd 4.0K Jul 21 07:46 ./ drwxr-xr-x 3 jd jd 4.0K Jul 20 14:25 ../ -rw-rw-r-- 1 jd jd 8.5M Jul 20 14:30 Core.jar -rwxrw-r-- 1 jd jd 4.7M Jul 20 14:29 JDownloader.jar* -rw-rw-r-- 1 jd jd 321 Jul 20 14:30 build.json drwxrwxr-x 4 jd jd 20K Jul 21 07:46 cfg/ drwxrwxr-x 2 jd jd 4.0K Jul 20 14:30 extensions/ drwxrwxr-x 2 jd jd 4.0K Jul 20 14:30 java/ drwxrwxr-x 4 jd jd 4.0K Jul 20 14:30 jd/ drwxrwxr-x 5 jd jd 4.0K Jul 20 14:30 libs/ -rw-rw-r-- 1 jd jd 32K Jul 20 14:30 license.txt -rw-rw-r-- 1 jd jd 39K Jul 20 14:30 license_german.txt drwxrwxr-x 5 jd jd 4.0K Jul 20 14:30 licenses/ drwxrwxr-x 7 jd jd 4.0K Jul 21 07:45 logs/ drwxrwxr-x 3 jd jd 4.0K Jul 20 14:30 themes/ drwxrwxr-x 6 jd jd 4.0K Jul 21 07:45 tmp/ drwxrwxr-x 5 jd jd 4.0K Jul 20 14:30 translations/ drwxrwxr-x 3 jd jd 4.0K Jul 20 14:29 update/ Code:
root@odhc1-02:~# ll -h /usr/bin/ | grep java lrwxrwxrwx 1 root root 22 Jul 20 13:57 java -> /etc/alternatives/java* Code:
[Unit] Description=JDownloader Service After=network.target [Service] Environment=JD_HOME=/application/JDownloader Type=oneshot ExecStart=/usr/bin/java -jar /application/JDownloader/JDownloader.jar RemainAfterExit=yes User=jd Group=jd [Install] WantedBy=multi-user.target Last edited by Broler; 21.07.2023 at 10:58. |
#12
|
|||
|
|||
![]()
Now I am able to create the deamon. The only notable differences i think exist are »After=network.target« and »PIDFile=/application/JDownloader/JDownloader.pid«.
Other differences are the omission of the group ID and type. But this did not explain the errormessage because of »Invalid user/group name or numeric ID«. Here the jdownloader.service file Code:
[Unit] Description=JDownloader Wants=network.target After=network.target [Service] Type=simple ExecStart=/usr/bin/java -jar /application/JDownloader/JDownloader.jar PIDFile=/application/JDownloader/JDownloader.pid User=jd RemainAfterExit=yes [Install] WantedBy=multi-user.target |
![]() |
Thread Tools | |
Display Modes | |
|
|