JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1041  
Old 03.11.2016, 23:52
BlueHazard BlueHazard is offline
Junior Loader
 
Join Date: Mar 2015
Posts: 14
Default

Hat bisher eigentlich jemand einen guten .service für systemd erstellen können? Bei mir treten immer wieder Fehler auf im Zusammenhang mit dem su Befehl und als root möchte ich den jDownloader schon nicht grade laufen lassen. Und wo genau kommt eigentlich die Konfigurationsdatei hin? Ich bin übrigens auf einem Arch Linux und verwende den Build aus dem AUR. Da hat's auch schon einige scripts dabei aber die scheinen nur in direkter ausführung zu funktionieren und ich suche nach einer Möglichkeit, den Downloader irgendwie als Daemon zum laufen zu bringen. Danke für die Hilfe
Reply With Quote
  #1042  
Old 04.11.2016, 08:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

Welche Probleme genau hast du denn im Zusammenhang mit su ? Klingt eher nach nem (Denk-)Fehler im Script aus?
Kannst das Script gerne mal an support@jdownloader.org schicken
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1043  
Old 04.11.2016, 17:52
BlueHazard BlueHazard is offline
Junior Loader
 
Join Date: Mar 2015
Posts: 14
Default

Hm ich glaube es handelt sich doch nicht um einen Fehler direkt in su. jDownloader scheint bei der Ausführung ein Problem zu haben aber ich weiss nicht, wohin das Log gespeichert wird, falls überhaupt. Meine Unit sieht bisher so aus:

Code:
[Unit]
Wants=network-online.target
After=network-online.target
description=jDownloader 2 Server Daemon

[Service]
Type=oneshot
ExecStart=/bin/su - jdownloader -c "java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar &"
RemainAfterExit=True

[Install]
WantedBy=multi-user.target

journalctl beinhält nach daemon-reload und start folgendes:
Code:
Nov 04 17:47:59 arch-mediaserver su[13707]: (to jdownloader) root on none
Nov 04 17:47:59 arch-mediaserver su[13707]: pam_unix(su-l:session): session opened for user jdownloader by (uid=0)
Nov 04 17:47:59 arch-mediaserver su[13707]: pam_unix(su-l:session): session closed for user jdownloader
Nov 04 17:47:59 arch-mediaserver systemd[1]: jDownloader.service: Main process exited, code=exited, status=1/FAILURE
Nov 04 17:47:59 arch-mediaserver systemd[1]: Failed to start jDownloader.service.
-- Subject: Unit jDownloader.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit jDownloader.service has failed.
--
-- The result is failed.
Nov 04 17:47:59 arch-mediaserver systemd[1]: jDownloader.service: Unit entered failed state.
Nov 04 17:47:59 arch-mediaserver systemd[1]: jDownloader.service: Failed with result 'exit-code'.
Dass es einen Denkfehler gibt, schliesse ich nicht aus, schliesslich habe ich noch kaum Scripts geschrieben besonders keine für systemd

Last edited by BlueHazard; 04.11.2016 at 17:54.
Reply With Quote
  #1044  
Old 04.11.2016, 18:03
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

also ich verwende su immer mit folgender reihenfolge
su -c "command" user &
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1045  
Old 04.11.2016, 18:09
BlueHazard BlueHazard is offline
Junior Loader
 
Join Date: Mar 2015
Posts: 14
Default

Hm, schon der Befehl

Code:
/bin/su -c "java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar" jdownloader &
scheint nicht zu klappen...
Reply With Quote
  #1046  
Old 04.11.2016, 18:12
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

-absoluten Pfad zu java
-existiert /opt/JDownloader bereits
-chown -R jdownloader /opt/JDownloader
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1047  
Old 04.11.2016, 18:18
BlueHazard BlueHazard is offline
Junior Loader
 
Join Date: Mar 2015
Posts: 14
Default

Hmm, also habe grade bemerkt, dass whereis su
su: /usr/bin/su /usr/share/man/man1/su.1.gz
ausgibt also habe ich das mal angepasst
whereis java gibt
java: /usr/bin/java /usr/lib/jvm/java-8-openjdk/jre/bin/java
aus und auch unter Verwendung der angepassten Pfade gibt's keinen Unterschied, der Prozess terminiert noch immer mit Code 1.

/opt/JDownloader existiert, beinhält eine JDownloader.jar und alles gehört bereits dem "jdownloader" User
Reply With Quote
  #1048  
Old 04.11.2016, 18:33
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

Ich kann dir eben noch Teamviewer anbieten. Einfach ID und PW an support@jdownloader.org schicken

Ẃas kommt denn im Terminal wenn du den Befehl eingibst? ohne & am Ende?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1049  
Old 04.11.2016, 18:37
BlueHazard BlueHazard is offline
Junior Loader
 
Join Date: Mar 2015
Posts: 14
Default

Dann geschieht genau gar nichts. Mit & wird wenigstens noch eine PID ausgegeben
Reply With Quote
  #1050  
Old 04.11.2016, 18:48
BlueHazard BlueHazard is offline
Junior Loader
 
Join Date: Mar 2015
Posts: 14
Default

Habs hingekriegt. In der systemd unit gibts die möglichkeit, den command als einen anderen User auszuführen indem man User= setzt. Das File sieht nun so aus
Code:
[Unit]
Wants=network-online.target
After=network-online.target
description=jDownloader 2 Server Daemon

[Service]
Type=oneshot
User=jdownloader
ExecStart=/bin/java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar
RemainAfterExit=True

[Install]
WantedBy=multi-user.target
Jetzt muss ich den JDownloader "nur" noch konfigurieren
Reply With Quote
  #1051  
Old 04.11.2016, 18:52
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

was kommt denn wenn du
/bin/java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar
ausführst?
Das Angebot für Teamviewer steht die nächsten paar mins noch
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1052  
Old 15.02.2017, 07:19
zorro3210 zorro3210 is offline
Baby Loader
 
Join Date: May 2016
Posts: 6
Default

I did install using this: https://support.jdownloader.org/Know...bedded-devices

and after filling my login/pass I have this.

Last edited by Jiaz; 15.02.2017 at 11:59.
Reply With Quote
  #1053  
Old 15.02.2017, 12:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

@zorro3210:
What browser do you use? Something tries to establish a direct connection to your JDownloader but is not sending proper requests.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1054  
Old 15.02.2017, 12:37
zorro3210 zorro3210 is offline
Baby Loader
 
Join Date: May 2016
Posts: 6
Default

Quote:
Originally Posted by Jiaz View Post
@zorro3210:
What browser do you use? Something tries to establish a direct connection to your JDownloader but is not sending proper requests.
I did ctrl+C and relaunche and it is solved...
Thanks..

I have few questions:
1) the installation/update tooks approx 2h. Normal?
2) If I reboot my NAS I have to relaunch it manually? Is there a way that it is launched automatically at each NAS reboot?
3) If I relaunch and there is a JD update is it going to take again so much time according to you?
thanks again
Reply With Quote
  #1055  
Old 15.02.2017, 13:15
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

1.) What java version do you use? In case it is a ZeroVM (Synology default) it is about 80-100 times slower than usual
2.) When you install it manually, you have to create autostart scripts yourself. Google should provide fast help on the topic
3.) see answer 1
Thanks for the feedback
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1056  
Old 15.02.2017, 19:07
zorro3210 zorro3210 is offline
Baby Loader
 
Join Date: May 2016
Posts: 6
Default

1) 3) I am using the default one from Synology. What do you suggest then?
2) I can find how to do it. Could you please confirm me that the command to be launched is java -jar JDownloader.jar -norestart? if not which one it is please?
thanks
Reply With Quote
  #1057  
Old 16.02.2017, 10:43
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

1.) 3.) use proper OpenJDK or Oracle Version, for example see here
https://board.jdownloader.org/showpo...50&postcount=8

2.) java -jar JDownloader.jar &
2.1.) -norestart is only required during setup to enter the logins

Possible Script, see https://board.jdownloader.org/showpo...&postcount=295
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1058  
Old 25.02.2017, 06:37
zorro3210 zorro3210 is offline
Baby Loader
 
Join Date: May 2016
Posts: 6
Default

Sorry for my late reply..

Thanks for your help..

I am having notification for an update. I do it from myJD and after relaunch still the same message.
Any idea what is going on? I guess should be written in the log.. where I can find it?
thanks again
Reply With Quote
  #1059  
Old 27.02.2017, 10:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 63,945
Default

@zorro3210: close JDownloader and fix your permissions
sudo chown -R user:group /path
replace user, group and path with correct values
I'm very sure that you have issues with ownership/permission and JDownloader is unable to finalize the update
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1060  
Old 01.03.2017, 06:40
zorro3210 zorro3210 is offline
Baby Loader
 
Join Date: May 2016
Posts: 6
Default

Quote:
Originally Posted by Jiaz View Post
@zorro3210: close JDownloader and fix your permissions
sudo chown -R user:group /path
replace user, group and path with correct values
I'm very sure that you have issues with ownership/permission and JDownloader is unable to finalize the update
Thanks... all ok now with update!
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 05:54.
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.