e-alfred/ocdownloader

Working Daemon but after reboot I

Happyfeet01 opened this issue · 4 comments

Hello,

I made an working Docker Container with Aria2 but after Container restart. The old downloads show me „GID not found“

I made following steps.
Running Nextcloud with Docker-compose with this Dockerfile

`FROM nextcloud:latest

RUN apt-get update && apt-get -y install apt-utils curl RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && chmod a+rx /usr/local/bin/youtube-dl
RUN apt-get -y install aria2 python
RUN chmod 740 /var/www/html/custom_apps/ocdownloader/SERVER/fallback.*
RUN apt install sudo
RUN sudo -u www-data aria2c --enable-rpc --rpc-allow-origin-all -c -D --check-certificate=false
RUN apt-get -y install ruby-redis memcached coturn
copy turnserver.conf /etc/turnserver.conf
RUN echo "TURNSERVER_ENABLED=1" >> /etc/default/coturn && service coturn restart
RUN apt -y install ffmpeg imagemagick ghostscript `

For an reboot I add at the crontab on my Host System this reboot command

sudo -u www-data aria2c --enable-rpc --rpc-allow-origin-all -c -D --check-certificate=false

What can make better? Okay I can Setup Aria2c on my Hostsystem and not with Docker but that is not my Challenge. 😁

Well, your command is not enough.

You have to start Aria2c with a save file that contains all your old downloads. If there is no save file, all previous downloads in Aria2c are gone and ocDownloader cannot display any information on them because it relies on Aria2c knowing about all downloads.

This Is my command

@reboot sudo -uwww-data aria2c --enable-rpc --rpc-allow-origin-all -c -D --log=/var/log/aria2c/aria2c.log --check-certificate=false --save-session=/var/local/aria2c/aria2c.sess --rpc-save-upload-metadata=true --force-save=true --log-level=warn --rpc-listen-all=false

It works but with this error

2019-11-09 17:31:23.644317 [ERROR] [DHTAutoSaveCommand.cc:114] Exception caught while saving DHT routing table to /root/.cache/aria2/dht.dat Exception: [DHTRoutingTableSerializer.cc:88] errorCode=1 Failed to save DHT routing table to /root/.cache/aria2/dht.dat.

You save the session file but you forgot to load it after every start of your Aria2c daemon. This is done using the --input-file option. The command should look like this as mentioned in the Readme of this repository:

sudo -u www-data /usr/bin/aria2c --enable-rpc --rpc-allow-origin-all -D -c --log=/var/log/aria2.log --check-certificate=false --save-session=/var/www/aria2c.sess --save-session-interval=2 --continue=true --input-file=/var/www/aria2c.sess --rpc-save-upload-metadata=true --force-save=true --log-level=warn

Thanks :-)