JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 21.12.2016, 12:03
wuethrich
Guest
 
Posts: n/a
Default JDownloader 2 on Ubuntu Server 16.04

Install Java and get JDownloader with the following commands.
Code:
sudo apt install openjdk-8-jre-headless
wget http://installer.jdownloader.org/JDownloader.jar
After that move JDownloader.jar and change the owner to the user (e.g. media) under which JDownloader should be executed.
Code:
sudo mkdir /opt/jdownloader
sudo mv jdownloader.jar /opt/jdownloader
sudo chown media:media /opt/jdownloader
Now we are ready to install JDownloader. Execute this command several times until you get asked for your My JDownloader login credentials on the console.
Code:
java -jar /opt/jdownloader/JDownloader.jar -norestart
Then create a new systemd unit under /etc/systemd/system/jdownloader.service and paste this script.
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
To enable JDownloader on startup run this command.
Code:
sudo systemctl enable jdownloader.service
After a reboot you can access your server under https://my.jdownloader.org

Enjoy!

Source: **External links are only visible to Support Staff****External links are only visible to Support Staff**
Reply With Quote
  #2  
Old 18.04.2017, 11:16
rabazzoni
Guest
 
Posts: n/a
Default

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
and it returns me the following messages:

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'.
Help!

SOLVED!

Last edited by rabazzoni; 18.04.2017 at 11:36. Reason: SOLVED!
Reply With Quote
  #3  
Old 18.04.2017, 14:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,544
Default

Would be nice if you can share how you solved it ?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #4  
Old 19.04.2017, 10:00
rabazzoni
Guest
 
Posts: n/a
Default

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
Hope this helps someone.

Last edited by rabazzoni; 19.04.2017 at 10:03.
Reply With Quote
  #5  
Old 19.04.2017, 14:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,544
Default

Thanks for the feedback!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #6  
Old 13.01.2018, 15:21
thomas087
Guest
 
Posts: n/a
Default

@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.
Reply With Quote
  #7  
Old 15.01.2018, 14:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,544
Default

Thanks for the feedback! Glad you could solve it by yourself!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #8  
Old 14.08.2018, 00:58
LeRob
Guest
 
Posts: n/a
Default

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
now journalctl -b brings this:
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-
And now I can't connect via myjdownloader...

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!
Reply With Quote
  #9  
Old 14.08.2018, 02:52
LeRob
Guest
 
Posts: n/a
Default

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?
Reply With Quote
  #10  
Old 14.08.2018, 17:49
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,544
Default

@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 &
sudo -c "start.sh" heimnetz
__________________
JD-Dev & Server-Admin
Reply With Quote
  #11  
Old 21.07.2023, 10:49
Broler Broler is offline
Modem User
 
Join Date: Jul 2023
Posts: 2
Default

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.
I am wondering because of the message »jd # Should be owner of /application/JDownloader« it is not true und it is with the comment that was in my jdownloader.service file
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/
I was wondering about the Java installation
Code:
root@odhc1-02:~# ll -h /usr/bin/ | grep java
lrwxrwxrwx  1 root root      22 Jul 20 13:57 java -> /etc/alternatives/java*
here my unit file »root@odhc1-02:~# nano /etc/systemd/system/jdownloader.service«
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
PS. I am using Ubuntu 22.02 on odroid hc1

Last edited by Broler; 21.07.2023 at 10:58.
Reply With Quote
  #12  
Old 23.07.2023, 09:50
Broler Broler is offline
Modem User
 
Join Date: Jul 2023
Posts: 2
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 16:40.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.