You are not logged in.

#1 2015-03-10 00:56:32

el.Quero
Member
Registered: 2014-11-15
Posts: 19

Aria2 daemon unable to bind socket at startup

Hi guys, I've tryed to set Aria2 as a system-wide daemon (not like the GutenYe method as suggested by the wiki). The steps are:

  • Create a new aria2 user (without login) for running it

  • Modify aria2.service

  • Modify aria2.conf

You can see modified files below:
aria2.service

[Unit]
Description=Aria2c download manager
After=network.target

[Service]
User=aria2
ExecStart=/usr/bin/aria2c --conf-path=/etc/aria2.conf

[Install]
WantedBy=multi-user.target

aria2.conf

continue
dir=<download directory>
file-allocation=falloc
log-level=warn
max-connection-per-server=4
max-concurrent-downloads=3
max-overall-download-limit=0
min-split-size=5M
enable-http-pipelining=true
enable-rpc=true
rpc-listen-all=true
rpc-allow-origin-all=true

PS: I removed the daemon=true setting because it was making some problems and systemd were showing aria2 as inactive.

Obviously, aria2 can write in the download directory and aria2.conf is owned by aria2.
If I start aria2 during exection time, all looks good and I can download files. But, if I try to enable it for start at startup, I get this error:

IPv4 RPC: failed to bind TCP port 6800
Exception: [SocketCore.cc:293] errorCode=1 Failed to bind a socket, cause: Name or service not known

If i try to restart it during runtime it works.

How can i fix this little annoyng bug?

Maybe this configuration may be reported in the wiki...

Last edited by el.Quero (2015-03-10 08:05:46)

Offline

#2 2015-03-13 22:07:48

el.Quero
Member
Registered: 2014-11-15
Posts: 19

Re: Aria2 daemon unable to bind socket at startup

Maybe I've posted in the wrong section? big_smile

Offline

#3 2015-04-01 06:57:13

ety001
Member
Registered: 2015-04-01
Posts: 1

Re: Aria2 daemon unable to bind socket at startup

make sure your network is STATIC IP

Offline

#4 2015-04-01 17:55:18

el.Quero
Member
Registered: 2014-11-15
Posts: 19

Re: Aria2 daemon unable to bind socket at startup

Maybe adding dhcpcd.service to After could resolve the issue? I think that setting a static ip on the machine only for an "aria bug" isn't that good... Is it possible?

Offline

#5 2015-06-01 09:51:54

heyuxiang
Member
Registered: 2008-10-09
Posts: 14

Re: Aria2 daemon unable to bind socket at startup

You need  After=network-online.target and Wants=network-online.target, this has been addressed here:
http://www.freedesktop.org/wiki/Softwar … orkTarget/
So your *.service should look like this:

[Unit]
Description=Aria2c download manager
After=network-online.target
Wants=network-online.target
[Service]
User=aria2
ExecStart=/usr/bin/aria2c --conf-path=/etc/aria2.conf

[Install]
WantedBy=multi-user.target

Last edited by heyuxiang (2015-06-01 10:03:20)

Offline

#6 2015-06-01 10:00:14

heyuxiang
Member
Registered: 2008-10-09
Posts: 14

Re: Aria2 daemon unable to bind socket at startup

And if the above still does not work, you may need to

systemctl enable systemd-networkd-wait-online

Offline

Board footer

Powered by FluxBB