ocdownloader icon indicating copy to clipboard operation
ocdownloader copied to clipboard

"Returned GID is null! Is Aria2c running as a daemon" error after reboot

Open RussianNeuroMancer opened this issue 4 years ago • 9 comments

Steps to reproduce

  1. Configure aria2c as suggested on Aria2c Daemon Setup page on Ubuntu 20.04.
  2. Reboot
  3. /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

RussianNeuroMancer avatar Jan 09 '21 03:01 RussianNeuroMancer

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.

xkill avatar Feb 11 '21 13:02 xkill

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.

xkill avatar Feb 11 '21 13:02 xkill

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.

RussianNeuroMancer avatar Feb 13 '21 10:02 RussianNeuroMancer

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.

xkill avatar Feb 14 '21 20:02 xkill

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:

Снимок экрана от 2021-02-15 17-38-48

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?

RussianNeuroMancer avatar Feb 15 '21 09:02 RussianNeuroMancer

There is no option to set secret at "Additional settings -> ocDownloader".

aledr avatar Feb 15 '21 23:02 aledr

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.

aledr avatar Feb 16 '21 01:02 aledr

@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 avatar Mar 18 '21 15:03 e-alfred

@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.

RussianNeuroMancer avatar Mar 18 '21 19:03 RussianNeuroMancer