Aria2 with AriaNG setup on OpenWrt

Hi,

I'm attempting to set up an Aria2 service so I can download large files, both direct and torrent, directly to my openWRT device without leaving my power-hungry PC on overnight. Unfortunately I'm a bit in over my head. As it stands both Aria2 and the AriaNG packages are installed, but the GUI webpage shows the message "Aria2 Status: Disconnected" .

I've tried tinkering with it with little clue of what I was doing and failed to get anything to work. Would anyone be able to look at my logs and advise?

Last 50 lines of log file:

No log data.

Last 50 lines of syslog:

Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]: 10/07 15:41:53 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]:
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]: 10/07 15:41:53 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]:
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8617]: jail: jail (8622) exited with exit: 0
Fri Oct  7 15:41:53 2022 daemon.info aria2: Please make sure user 'aria2' has write access to download dir: /mnt/sdb1/aria2
Fri Oct  7 15:41:53 2022 daemon.info aria2: Aria2 will run with user 'aria2'.
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]: 10/07 15:39:45 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]:
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]: 10/07 15:39:45 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]:
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:45 2022 daemon.info aria2: Please make sure user 'aria2' has write access to download dir: /mnt/sdb1/aria2
Fri Oct  7 15:39:45 2022 daemon.info aria2: Aria2 will run with user 'aria2'.
Fri Oct  7 15:39:33 2022 daemon.info procd: Instance aria2::aria2.main s in a crash loop 6 crashes, 0 seconds since last crash
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]: jail: jail (8496) exited with exit: 1
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]: 10/07 15:39:33 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]:
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]: 10/07 15:39:33 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]:
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]: jail: jail (8494) exited with exit: 1
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]: 10/07 15:39:28 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]:
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]: 10/07 15:39:28 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]:
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]: jail: jail (8482) exited with exit: 1
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]: 10/07 15:39:23 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]:
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]: 10/07 15:39:23 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]:
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]: jail: jail (8474) exited with exit: 1
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]: 10/07 15:39:18 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]:
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]: 10/07 15:39:18 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]:
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:13 2022 daemon.info aria2c[8463]: jail: jail (8464) exited with exit: 1
Fri Oct  7 15:39:13 2022 daemon.info aria2c[8463]: 10/07 15:39:13 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:13 2022 daemon.info aria2c[8463]:
Fri Oct  7 15:39:13 2022 daemon.info aria2c[8463]: 10/07 15:39:13 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:13 2022 daemon.info aria2c[8463]:
Fri Oct  7 15:39:13 2022 daemon.info aria2c[8463]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:08 2022 daemon.info aria2c[8432]: jail: jail (8439) exited with exit: 1
Fri Oct  7 15:39:08 2022 daemon.info aria2c[8432]: 10/07 15:39:08 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:08 2022 daemon.info aria2c[8432]:
Fri Oct  7 15:39:08 2022 daemon.info aria2c[8432]: 10/07 15:39:08 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
R

Could disable the jail...?

Honestly I'm not exactly sure what a jail entails, or how it got there. I never knowingly created one, in any case.

Think it's new for 22.03 What is /sbin/ujail? What does it do exactly?

Would placing the AriaNG inside the jail somehow be the solution? If it's a security feature, I'm hesitant to disable it without knowing if it's advisable.

That would be an option, even better if both could be placed in the same one...

Is aria2 service enabled and running?

/etc/init.d/aria2 enable
/etc/init.d/aria2 start

Yes, here is the current log output.

Sun Oct  9 10:48:00 2022 daemon.info aria2c[12023]: 10/09 10:48:00 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Sun Oct  9 10:48:00 2022 daemon.info aria2c[12023]:
Sun Oct  9 10:48:00 2022 daemon.info aria2c[12023]: 10/09 10:48:00 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Sun Oct  9 10:48:00 2022 daemon.info aria2c[12023]:
Sun Oct  9 10:48:00 2022 daemon.info aria2c[12023]: jail: exec-ing /usr/bin/aria2c
Sun Oct  9 10:48:00 2022 daemon.info aria2: Please make sure user 'aria2' has write access to download dir: /mnt/sdb1/aria2
Sun Oct  9 10:48:00 2022 daemon.info aria2: Aria2 will run with user 'aria2'.
Sun Oct  9 10:47:48 2022 daemon.info aria2: Instance "main" disabled.
Fri Oct  7 15:52:15 2022 daemon.info aria2c[8827]: jail: jail (8828) exited with exit: 0
Fri Oct  7 15:52:14 2022 daemon.info aria2: Instance "main" disabled.
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]: 10/07 15:41:53 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]:
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]: 10/07 15:41:53 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]:
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8827]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:41:53 2022 daemon.info aria2c[8617]: jail: jail (8622) exited with exit: 0
Fri Oct  7 15:41:53 2022 daemon.info aria2: Please make sure user 'aria2' has write access to download dir: /mnt/sdb1/aria2
Fri Oct  7 15:41:53 2022 daemon.info aria2: Aria2 will run with user 'aria2'.
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]: 10/07 15:39:45 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]:
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]: 10/07 15:39:45 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]:
Fri Oct  7 15:39:45 2022 daemon.info aria2c[8617]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:45 2022 daemon.info aria2: Please make sure user 'aria2' has write access to download dir: /mnt/sdb1/aria2
Fri Oct  7 15:39:45 2022 daemon.info aria2: Aria2 will run with user 'aria2'.
Fri Oct  7 15:39:33 2022 daemon.info procd: Instance aria2::aria2.main s in a crash loop 6 crashes, 0 seconds since last crash
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]: jail: jail (8496) exited with exit: 1
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]: 10/07 15:39:33 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]:
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]: 10/07 15:39:33 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]:
Fri Oct  7 15:39:33 2022 daemon.info aria2c[8495]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]: jail: jail (8494) exited with exit: 1
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]: 10/07 15:39:28 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]:
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]: 10/07 15:39:28 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]:
Fri Oct  7 15:39:28 2022 daemon.info aria2c[8493]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]: jail: jail (8482) exited with exit: 1
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]: 10/07 15:39:23 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]:
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]: 10/07 15:39:23 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]:
Fri Oct  7 15:39:23 2022 daemon.info aria2c[8481]: jail: exec-ing /usr/bin/aria2c
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]: jail: jail (8474) exited with exit: 1
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]: 10/07 15:39:18 [e[1;33mWARNe[0m] --rpc-passwd option will be deprecated in the future release.
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]:
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]: 10/07 15:39:18 [e[1;33mWARNe[0m] --rpc-user option will be deprecated in the future release. Migrate to --rpc-secret option as soon as possible.
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]:
Fri Oct  7 15:39:18 2022 daemon.info aria2c[8473]: jail: exec-ing /usr/bin/aria2c

Oh I'm sorry. Somehow I didn't see the log. My bad!

Apologies for the bump but I haven't been able to understand or make any headway on this. Anyone with experience about jails in general or aria2?

I just installed it on 22.03.

enabled, and changed the default storage path, in /etc/config/aria2,
browsed the webUI, and added a file, it was DLed without any issues.

Thanks for the reply. I tried starting over with new config files, and it sadly doesn't seem to be working. I'm wondering if it's due to the download directory being on an external SSD I just added? Maybe I failed to set it up properly?

Last 50 lines of log file:

No log data.

Last 50 lines of syslog:

Wed Oct 12 18:57:42 2022 daemon.info aria2c[6705]: jail: exec-ing /usr/bin/aria2c
Wed Oct 12 18:57:42 2022 daemon.info aria2: Please make sure user 'aria2' has write access to download dir: /mnt/sdb1/aria2
Wed Oct 12 18:57:42 2022 daemon.info aria2: Aria2 will run with user 'aria2'.
Wed Oct 12 18:57:04 2022 daemon.err aria2: Can't create config dir: /etc/config/aria2
Wed Oct 12 18:54:24 2022 daemon.err aria2: Please create download dir first.

What are the permissions of /mnt/sdb1/aria2 ?

:/mnt/sdb1# ls -lah
drwxr-xr-x    4 root     root        4.0K Oct  7 12:49 .
drwxr-xr-x    3 root     root        4.0K Oct  7 14:10 ..
drwxr-xr-x    2 root     root        4.0K Oct  7 12:49 aria2
drwx------    2 root     root       16.0K Oct  7 10:15 lost+found

Am I correct in saying I'd have to set up a group for the aria2 user account, and give read-write permissions to it?

No, but you need to change the permissions of the dir to 777.

Unfortunately, no dice it seems. I did the following

root@FutroS920:/mnt/sdb1# chmod 777 aria2
root@FutroS920:/mnt/sdb1# ls -lah
drwxr-xr-x    4 root     root        4.0K Oct  7 12:49 .
drwxr-xr-x    3 root     root        4.0K Oct  7 14:10 ..
drwxrwxrwx    2 root     root        4.0K Oct  7 12:49 aria2
drwx------    2 root     root       16.0K Oct  7 10:15 lost+found

But AriaNG doesn't seem to be accepting downloads, still showing the red disconnected box in the sidebar.

Last 50 lines of log file:

No log data.

Last 50 lines of syslog:

Mon Oct 17 08:32:41 2022 daemon.info aria2c[4376]: jail: exec-ing /usr/bin/aria2c
Mon Oct 17 08:32:41 2022 daemon.info aria2: Please make sure user 'aria2' has write access to download dir: /mnt/sdb1/aria2
Mon Oct 17 08:32:41 2022 daemon.info aria2: Aria2 will run with user 'aria2'.

Bumping this again, just in case anyone has any insight..

Same issue, still no sulution.
Luci shows "The Aria2 service is not running.", however /etc/init.d/aria2 status shows "running".
Below are logs:

Sun Dec 18 21:45:18 2022 daemon.info procd: Instance aria2::aria2.main s in a crash loop 6 crashes, 0 seconds since last crash
Sun Dec 18 21:45:18 2022 daemon.info aria2c[8202]: jail: jail (8203) exited with exit: 1
Sun Dec 18 21:45:18 2022 daemon.err aria2c[8202]: See 'aria2c -h'.
Sun Dec 18 21:45:18 2022 daemon.err aria2c[8202]: Usage: aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE]...
Sun Dec 18 21:45:18 2022 daemon.err aria2c[8202]: Specify at least one URL.
Sun Dec 18 21:45:18 2022 daemon.info aria2c[8202]: jail: exec-ing /usr/bin/aria2c
Sun Dec 18 21:45:13 2022 daemon.info aria2c[8194]: jail: jail (8195) exited with exit: 1

Sadly, I've more or less abandoned setting this up for the moment, with other things to worry about. But I'd still be hopeful someone is able to provide advice on this issue.