ety001@ETYkali:~$ xrandr Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 LVDS1 connected (normal left inverted right x axis y axis) 1920x1080 60.0 + 59.9 40.0 1680x1050 60.0 59.9 1600x1024 60.2 1400x1050 60.0 1280x1024 60.0 1440x900 59.9 1280x960 60.0 1360x768 59.8 60.0 1152x864 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1024x768 60.0 800x600 60.3 56.2 848x480 60.0 640x480 59.9 HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis)
Mar 31 22:31:40 alarmpi aria2c[150]: 03/31 22:31:40 [ERROR] IPv4 RPC: failed to bind TCP port 6800 Mar 31 22:31:40 alarmpi aria2c[150]: Exception: [SocketCore.cc:293] errorCode=1 Failed to bind a socket, cause: Name or service not known
绑定失败?怎么破?
再看下 Wiki 上 /etc/systemd/system/aria2c.service 这个配置文件,貌似没啥问题,然后又手动启动了下,也失败了。 执行 systemctl status aria2c 发现程序成功返回0,systemctl显示也是正在执行,但是ps一下,没有aria2c的进程。
见鬼了!
继续看 wiki ,发现里面说到
1
Ensure your config is set to deamonize (use daemon=true).
Type=forking: systemd considers the service started up once the process forks and the parent has exited. For classic daemons use this type unless you know that it is not necessary.
The most typical case is that the unit A requires the unit B to be running before A is started. In that case add Requires=B and After=B to the [Unit] section of A. If the dependency is optional, add Wants=B and After=B instead. Note that Wants= and Requires= do not imply After=, meaning that if After= is not specified, the two units will be started in parallel.