JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 21.12.2016, 12:03
wuethrich wuethrich is offline
Modem User
 
Join Date: Dec 2016
Posts: 2
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 rabazzoni is offline
Modem User
 
Join Date: Apr 2017
Posts: 2
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: 64,713
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 rabazzoni is offline
Modem User
 
Join Date: Apr 2017
Posts: 2
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: 64,713
Default

Thanks for the feedback!
__________________
JD-Dev & Server-Admin
Reply With Quote
  #6  
Old 13.01.2018, 15:21
thomas087 thomas087 is offline
Baby Loader
 
Join Date: Oct 2016
Posts: 5
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: 64,713
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 LeRob is offline
Modem User
 
Join Date: Aug 2018
Posts: 2
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 LeRob is offline
Modem User
 
Join Date: Aug 2018
Posts: 2
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: 64,713
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
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 22:03.
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 - 2019, Jelsoft Enterprises Ltd.