raspbian 下 Transmission-daemon 不能随开机正常自启,如何解决?
最近刚入一个 RasPi 想用来做下载机,通过 apt 装完 transmission-daemon 修改 settings.json 之后正常运行,但是每次开机之后在通过内网浏览器访问对应 9091 端口都会出现 ERR_CONNECTION_REFUSED 错误,每次都要手动 systemctl restart transmission-daemon.service
才能正常访问 web 界面。
这是 transmission-daemon 的 settings.json:
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": false,
"download-dir": "/Download/Transmission",
"download-limit": 100,
"download-limit-enabled": 0,
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/var/lib/transmission-daemon/Downloads",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 1,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
"peer-limit-per-torrent": 50,
"peer-port": 56209,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": true,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": false,
"preallocation": 1,
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "*",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "*",
"rpc-whitelist": "10.0.0.*",
"rpc-whitelist-enabled": true,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 14,
"utp-enabled": true
}
试了下开机之后 systemctl status transmission-daemon.service
,结果:
● transmission-daemon.service - Transmission BitTorrent Daemon
Loaded: loaded (/lib/systemd/system/transmission-daemon.service; enabled)
Active: active (running) since 四 2016-09-29 17:17:09 CST; 7min ago
Main PID: 582 (transmission-da)
Status: "Idle."
CGroup: /system.slice/transmission-daemon.service
└─582 /usr/bin/transmission-daemon -f --log-error
9月 29 17:17:09 raspberrypi systemd[1]: Started Transmission BitTorrent Daemon.
9月 29 17:17:10 raspberrypi transmission-daemon[582]: [2016-09-29 17:17:10.083 CST] UDP Failed to set receive buffer: requested 4194304, got 327680 (tr-udp.c:78)
9月 29 17:17:10 raspberrypi transmission-daemon[582]: [2016-09-29 17:17:10.083 CST] UDP Failed to set send buffer: requested 1048576, got 327680 (tr-udp.c:89)
/etc/systemd/system/multi-user.target.wants/transmission-daemon.service
的配置是默认并没有改过:
[Unit]
Description=Transmission BitTorrent Daemon
After=network.target
[Service]
User=debian-transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error
ExecReload=/bin/kill -s HUP $MAINPID
[Install]
WantedBy=multi-user.target
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
缓存设的有问题
报错第一个提示是你接受缓存是4M,但是实际UDP缓存只有32K
配置文件里面cache是4M
所以去修改UDP缓冲区大小吧,方法搜一下到处都是,我这里就不复制粘贴了