Transmission daemon overwrites settings.json to the default
Transmission daemon overwrites settings.json to the default
I can not seem to configure the settings.json file on Centos 5. Every time I start the daemon the file gets its default values. I want to configure only "rpc-authentication-required" : false, Or better yet to at least set a log in account.
I tried all of the following but the issue remains:
1)
# service transmission-daemon stop
set my values at:
# sudo nano /var/lib/transmission/settings.json
# service transmission-daemon start
2)
# killall -HUP transmission-daemon
deleted settings.json file all together:
# rm -rf /var/lib/transmission/settings.json
# service transmission-daemon start
Default setting.json file was generated.
3) Downgraded from transmission-2.61-1geekery.i386 to transmission-2.22-1geekery.i386 [Same problem]
4)
I even changed the permission to the daemon folder to no-write, but still the default settings are forced.
I would appreciated if anyone encountered this issue and figure out a way around this bug.
This is my transmission log:
[12:57:23.465] RPC Server Adding address to whitelist: *.*.*.* (rpc-server.c:803)
[12:57:23.465] RPC Server Serving RPC and Web requests on port 127.0.0.1:9091/transmission/ (rpc-server.c:997)
[12:57:23.465] RPC Server Whitelist enabled (rpc-server.c:1001)
[12:57:23.465] RPC Server Password required (rpc-server.c:1004)
[12:57:23.465] UDP Failed to set receive buffer: requested 4194304, got 221184 (tr-udp.c:77)
[12:57:23.465] UDP Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf (tr-udp.c:82)
[12:57:23.465] UDP Failed to set send buffer: requested 1048576, got 221184 (tr-udp.c:88)
[12:57:23.465] UDP Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf (tr-udp.c:93)
[12:57:23.465] DHT Reusing old id (tr-dht.c:305)
[12:57:23.465] DHT Bootstrapping from 56 IPv4 nodes (tr-dht.c:153)
[12:57:23.465] Using settings from "/var/lib/transmission" (daemon.c:517)
[12:57:23.465] Saved "/var/lib/transmission/settings.json" (bencode.c:1731)
[12:57:23.465] transmission-daemon requiring authentication (daemon.c:537)
[12:57:23.465] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:72)
[12:57:23.465] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:72)
[12:57:25.467] Port Forwarding (UPnP) Found Internet Gateway Device "http://192.168.2.1:5431/uuid:0013-102d- ... nnection:1" (upnp.c:202)
[12:57:25.467] Port Forwarding (UPnP) Local Address is "192.168.2.146" (upnp.c:204)
[12:57:25.467] Port Forwarding (UPnP) Port forwarding through "http://192.168.2.1:5431/uuid:0013-102d- ... nnection:1", service "urn:schemas-upnp-org:service:WANIPConnection:1". (local address:$
[12:57:25.467] Port Forwarding (UPnP) Port forwarding successful! (upnp.c:282)
[12:57:25.467] Port Forwarding State changed from "Not forwarded" to "Forwarded" (port-forwarding.c:93)
I tried all of the following but the issue remains:
1)
# service transmission-daemon stop
set my values at:
# sudo nano /var/lib/transmission/settings.json
# service transmission-daemon start
2)
# killall -HUP transmission-daemon
deleted settings.json file all together:
# rm -rf /var/lib/transmission/settings.json
# service transmission-daemon start
Default setting.json file was generated.
3) Downgraded from transmission-2.61-1geekery.i386 to transmission-2.22-1geekery.i386 [Same problem]
4)
I even changed the permission to the daemon folder to no-write, but still the default settings are forced.
I would appreciated if anyone encountered this issue and figure out a way around this bug.
This is my transmission log:
[12:57:23.465] RPC Server Adding address to whitelist: *.*.*.* (rpc-server.c:803)
[12:57:23.465] RPC Server Serving RPC and Web requests on port 127.0.0.1:9091/transmission/ (rpc-server.c:997)
[12:57:23.465] RPC Server Whitelist enabled (rpc-server.c:1001)
[12:57:23.465] RPC Server Password required (rpc-server.c:1004)
[12:57:23.465] UDP Failed to set receive buffer: requested 4194304, got 221184 (tr-udp.c:77)
[12:57:23.465] UDP Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf (tr-udp.c:82)
[12:57:23.465] UDP Failed to set send buffer: requested 1048576, got 221184 (tr-udp.c:88)
[12:57:23.465] UDP Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf (tr-udp.c:93)
[12:57:23.465] DHT Reusing old id (tr-dht.c:305)
[12:57:23.465] DHT Bootstrapping from 56 IPv4 nodes (tr-dht.c:153)
[12:57:23.465] Using settings from "/var/lib/transmission" (daemon.c:517)
[12:57:23.465] Saved "/var/lib/transmission/settings.json" (bencode.c:1731)
[12:57:23.465] transmission-daemon requiring authentication (daemon.c:537)
[12:57:23.465] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:72)
[12:57:23.465] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:72)
[12:57:25.467] Port Forwarding (UPnP) Found Internet Gateway Device "http://192.168.2.1:5431/uuid:0013-102d- ... nnection:1" (upnp.c:202)
[12:57:25.467] Port Forwarding (UPnP) Local Address is "192.168.2.146" (upnp.c:204)
[12:57:25.467] Port Forwarding (UPnP) Port forwarding through "http://192.168.2.1:5431/uuid:0013-102d- ... nnection:1", service "urn:schemas-upnp-org:service:WANIPConnection:1". (local address:$
[12:57:25.467] Port Forwarding (UPnP) Port forwarding successful! (upnp.c:282)
[12:57:25.467] Port Forwarding State changed from "Not forwarded" to "Forwarded" (port-forwarding.c:93)
Last edited by elion on Tue Aug 21, 2012 1:54 am, edited 1 time in total.
Re: Transmission daemon overwrites settings.json to the defa
Oops.
That is correct. I was configuring the correct file but wrote the directory wrong earlier (corrected it now to avoid confusion). The correct directory is:
# sudo nano /var/lib/transmission/settings.json.
I stop daemon, then configure the file and save and exit. The settings exist until I start the daemon, thereafter the file get the original content.
That is correct. I was configuring the correct file but wrote the directory wrong earlier (corrected it now to avoid confusion). The correct directory is:
# sudo nano /var/lib/transmission/settings.json.
I stop daemon, then configure the file and save and exit. The settings exist until I start the daemon, thereafter the file get the original content.
Re: Transmission daemon overwrites settings.json to the defa
The parameters used while starting the daemon override anything settings.json has... so your problem is /etc/init.d/transmission-daemon, which probably loads its settings from /etc/default/transmission (I don't use Centos, but that's what I did for Gentoo).
This is pretty easy to see if you look at the command line of the running daemon: (you'll have to maximize the console to see most of the parameters, the line will be truncated to the width of the console), or
(which shows the whole command line w/o white space)
This is pretty easy to see if you look at the command line of the running daemon:
Code: Select all
ps -ef | grep trans
Code: Select all
cat /proc/$(pidof transmission-daemon)/cmdline
Re: Transmission daemon overwrites settings.json to the defa
I have a similar problem
viewtopic.php?f=8&t=13732
in the pointed folder is "settings.json", which is overwritten
viewtopic.php?f=8&t=13732
Code: Select all
root@comp# mypid=`ps -ef | grep trans | grep -v grep | awk '{ print $2; }'`; cat /proc/$mypid/cmdline
/usr/bin/transmission-daemon-T--blocklist-g/var/lib/transmission/.config/transmission
Re: Transmission daemon overwrites settings.json to the defa
abask :
And you are sure the daemon was not running when you changed the file?
Those are the only 2 cases: either the daemon was running and your changes are discarded, or the daemon is started with a set of parameters that override your settings (and will be written to the file by the daemon later).
And you are sure the daemon was not running when you changed the file?
Those are the only 2 cases: either the daemon was running and your changes are discarded, or the daemon is started with a set of parameters that override your settings (and will be written to the file by the daemon later).
Re: Transmission daemon overwrites settings.json to the defa
of course I edit file when daemon is stopped
-
- Posts: 552
- Joined: Sun Dec 13, 2009 10:44 pm
Re: Transmission daemon overwrites settings.json to the defa
If that really is the case then whatever problem you have must be CentOS specific, so I would recommend that you also check their forums.
The only other option that I can think of now is that it's the initiscript that is the one resetting the config, not the transmission daemon.
The only other option that I can think of now is that it's the initiscript that is the one resetting the config, not the transmission daemon.
Re: Transmission daemon overwrites settings.json to the defa
Edit - Removed all of the text. Didn't work, ended up installing Deluge. I think it's a fault with the package, but I couldn't find anywhere in the init script, default settings, or anything that would make it overwrite the settings file like that. Making it read only might fix the problem, but I just installed repoforge's deluge package and called it a day. Or night. It's incredibly old though 

Re: Transmission daemon overwrites settings.json to the defa
I would think that this is CentOS specific as im having the same issue with CentOS 6 however. I would of thought it would be up to a transmission developer to try to work this out and either patch it or make the rpm maintainer aware so they can fix it.
Re: Transmission daemon overwrites settings.json to the defa
Also making the file read only does not work. Transmission changes the permissions back to 600 automatically and then overwrites the file.
If anyone knows how to stop this from happening. Then please let the package maintainer know and they should be able to resolve
If anyone knows how to stop this from happening. Then please let the package maintainer know and they should be able to resolve
-
- Posts: 6
- Joined: Thu Feb 17, 2011 9:16 pm
Re: Transmission daemon overwrites settings.json to the defa
the transmission-daemon init script for centos, has a DAEMON_ARGS variable that is pre-populated with these values:
DAEMON_ARGS="-b -t -a \"*.*.*.*\" -e /var/log/transmission/transmission.log"
-b --blocklist Enable peer blocklists
-t --auth Require authentication
-a --allowed <list> Allowed IP addresses. (Default: 127.0.0.1)
-e --logfile <filename> Dump the log messages to this filename
Like many others redhat initscripts, transmission-daemon initscript load his config from: /etc/sysconfig/transmission-daemon
In this config file you can override DAEMON_ARGS variable pre-populated in the initscript
Due to the fact that transmission-daemon write settings.json on start and stop action, when starting/stopping with -t parameter, the file settings.json will be overwritten with the commandline settings.
So, never change settings.json parameters when transmission-daemon is running and change DAEMON_ARGS to reflect your needs via sysconfig file.
I'm thinking to change the default DAEMON_ARGS variable in the initscript to:
DAEMON_ARGS="-e /var/log/transmission/transmission.log"
In this way the first web interface connection will face a "forbidden error" due to the fact that rpc-whitelist is set to 127.0.0.1, but you can fully configure transmission via settings.json, and only if you want via sysconfig file.
Do you like these changes? Have you some suggestions?
Marco
DAEMON_ARGS="-b -t -a \"*.*.*.*\" -e /var/log/transmission/transmission.log"
-b --blocklist Enable peer blocklists
-t --auth Require authentication
-a --allowed <list> Allowed IP addresses. (Default: 127.0.0.1)
-e --logfile <filename> Dump the log messages to this filename
Like many others redhat initscripts, transmission-daemon initscript load his config from: /etc/sysconfig/transmission-daemon
In this config file you can override DAEMON_ARGS variable pre-populated in the initscript
Due to the fact that transmission-daemon write settings.json on start and stop action, when starting/stopping with -t parameter, the file settings.json will be overwritten with the commandline settings.
So, never change settings.json parameters when transmission-daemon is running and change DAEMON_ARGS to reflect your needs via sysconfig file.
I'm thinking to change the default DAEMON_ARGS variable in the initscript to:
DAEMON_ARGS="-e /var/log/transmission/transmission.log"
In this way the first web interface connection will face a "forbidden error" due to the fact that rpc-whitelist is set to 127.0.0.1, but you can fully configure transmission via settings.json, and only if you want via sysconfig file.
Do you like these changes? Have you some suggestions?
Marco