ocdownloader
ocdownloader copied to clipboard
"Returned GID is null! Is Aria2c running as a daemon" error after reboot
Steps to reproduce
- Configure aria2c as suggested on Aria2c Daemon Setup page on Ubuntu 20.04.
- Reboot
- /var/run was re-created during boot, because it's tmpfs, so there is no /var/run/aria2c anymore, so deamon does not start and session file is lost.
Expected behaviour
I guess instruction in wiki shouldn't suggest using tmpfs for storing session file?
Aria2c configuration (remove if not used):
Which command line/configuration options are you using: --console-log-level=warn --conf-path=/etc/aria2c.daemon
Aria2c error log
Aria2c log file (set the log level to debug by using --log-level=debug)
Exception: [download_helper.cc:563] errorCode=1 Ошибка открытия файл /var/run/aria2c/aria2c.sess: File not found or it is a directory
Hi,
I just fixed the wiki: the systemd service to automatically create the /var/run/
folder.
Basically adding the following to the service section:
RuntimeDirectory=aria2c
RuntimeDirectoryMode=0755
ExecStartPre=-/bin/touch /var/run/aria2c/aria2c.sess
Now Aria starts fine. But I'm still having the GID error.
Seems a problem with ocdownloader, I'm also debugging why youtube-dl does not work.
OK, seems an update removed the rpc-secret from ocDownloader configuration. So go to NextCloud settings -> Additional settings And change the secret.
There is a issue on the admin panel and the aria2c settings does not appear, so change to curl and change it back to aria2c to see the settings.
Basically adding the following to the service section
Could you please explain how this supposed to fix the issue? /var/run content is lost upon reboot (because it's tmpfs) so session file with all downloads will be lost (and dht peers will be lost too).
Did you actually tried to perform "Steps to reproduce" from bugreport description?
seems an update removed the rpc-secret from ocDownloader configuration.
Unrelated in my case, I never set rpc-secret in first place.
Basically adding the following to the service section
Could you please explain how this supposed to fix the issue? /var/run content is lost upon reboot (because it's tmpfs) so session file with all downloads will be lost (and dht peers will be lost too).
RuntimeDirectory
automatically creates the run folder.
Tested and works fine.
I updated the wiki page too to match the changes.
RuntimeDirectory automatically creates the run folder.
Yes, it does, but /var/run/aria2c/aria2c.sess content is lost upon reboot, so it's empty. Therefore ocDownloader can not find downloads that was there before reboot, which lead to "Error, GID not found!" error as I just tested:
Tested and works fine.
Did you have running torrent downloads before reboot when you tested it? How /var/run/aria2c/aria2c.sess content is supposed to be restored after reboot? How DHT peers is supposed to be restored after reboot?
There is no option to set secret at "Additional settings -> ocDownloader".
There is no option to set secret at "Additional settings -> ocDownloader".
Fixed switching "Which downloader do you want to use?" to cURL and back to ARIA2. Options for ARIA2 are visible now.
@RussianNeuroMancer I am not sure where the Readme suggests that the session file should be stored on a temporary filesystem. Maybe we should add a warning that the session file shouldn't be stored on any kind of temporary filesystem?
I will update the wiki page as necessary.
@e-alfred
Maybe we should add a warning that the session file shouldn't be stored on any kind of temporary filesystem?
This, and also provide working configuration instead of this current one.