Transmission settings overwritten at launch

I was trying to make some changes to my Transmission settings.json file, but every time I re-start the daemon the old settings get over-written over any changes I have made. I seem to remember there was a “reload” command for daemons that would accept any changes that had been made to the config files, but I can’t figure out what it is. I wonder if anyone would be kind enough to help?

You need to stop transmission first and only then should you make the changes to settings.json.

Thank you for this suggestion. I am actually stopping the transmission daemon before making any changes to the settings.

I’m a little surprised to hear that this is happening.

You could try kill -HUP, though I’ve never tried it myself on transmission.

Edit: I came across this thread: daemon should reload settings.json on SIGHUP

Thanks for the input! I checked out that thread but was unable to make sense of it. Is there any specific guidance for how to get the edits to the configuration file to stick?

How are you stopping the daemon? You need to stop the service by doing sudo service transmission-daemon stop otherwise it will restart the daemon and overwrite the settings.

I realized I’ve been doing something wrong: I’m using the bundled OSMC version of Transmission and have been starting and stopping the service by using sudo service transmission start and sudo service transmission stop. When I try to replace transmission with transmission-daemon, I get the message Failed to start transmission-daemon.service: Unit transmission-daemon.service not found.

Can I safely install transmission-daemon using apt-get? I thought I already had everything I needed from the bundled OSMC version, but perhaps that is not the case.

To start and stop you need to:

sudo systemctl stop transmission
sudo systemctl start transmission

(You may need to use transmission-daemon instead, I’m not sure since I don’t have it installed)

Do not install the other version of transmission, it will interfere with the osmc store version.

Thank you for this! Unfortunately the result seems to be the same - the settings.json file is overwritten on the next launch.

The really odd thing is that I was able at one point to edit the file and get the changes to stick.

You’re telling us it doesn’t work but providing no evidence for us to check.

I don’t use the OSMC version of transmission, so I just installed it. AFAICT, it doesn’t overwrite my changes to the settings.json file. Here’s the evidence:

osmc@osmc:~/.config/transmission-daemon$ ls -la
total 24
drwxr-xr-x 5 osmc osmc 4096 May 21 18:16 .
drwxr-xr-x 3 osmc osmc 4096 May 21 17:53 ..
drwxr-xr-x 2 osmc osmc 4096 May 21 17:53 blocklists
drwxr-xr-x 2 osmc osmc 4096 May 21 17:53 resume
-rw------- 1 osmc osmc 2195 May 21 18:16 settings.json
drwxr-xr-x 2 osmc osmc 4096 May 21 17:53 torrents
osmc@osmc:~/.config/transmission-daemon$ systemctl stop transmission
osmc@osmc:~/.config/transmission-daemon$ systemctl status transmission
● transmission.service - Transmission BitTorrent Daemon
   Loaded: loaded (/lib/systemd/system/transmission.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2019-05-21 18:35:42 UTC; 7s ago
  Process: 7834 ExecStart=/usr/bin/transmission-daemon -f --log-error --allowed *.*.*.* (code=exited, status=0/SUCCESS)
  Process: 7831 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
 Main PID: 7834 (code=exited, status=0/SUCCESS)

May 21 18:15:53 osmc systemd[1]: Starting Transmission BitTorrent Daemon...
May 21 18:16:04 osmc systemd[1]: Started Transmission BitTorrent Daemon.
May 21 18:16:05 osmc transmission-daemon[7834]: [2019-05-21 18:16:05.263] UDP Failed to set receive buffer: requested 4194304, got 327680 (tr-udp.c:84
May 21 18:16:05 osmc transmission-daemon[7834]: [2019-05-21 18:16:05.264] UDP Failed to set send buffer: requested 1048576, got 327680 (tr-udp.c:95)
May 21 18:35:41 osmc systemd[1]: Stopping Transmission BitTorrent Daemon...
May 21 18:35:42 osmc systemd[1]: Stopped Transmission BitTorrent Daemon.
osmc@osmc:~/.config/transmission-daemon$ vi settings.json 
osmc@osmc:~/.config/transmission-daemon$ grep rpc-username settings.json 
    "rpc-username": "dillthedog",
osmc@osmc:~/.config/transmission-daemon$ systemctl start transmission
osmc@osmc:~/.config/transmission-daemon$ grep rpc-username settings.json 
    "rpc-username": "dillthedog",
osmc@osmc:~/.config/transmission-daemon$ systemctl stop transmission
osmc@osmc:~/.config/transmission-daemon$ grep rpc-username settings.json 
    "rpc-username": "dillthedog",
osmc@osmc:~/.config/transmission-daemon$ sudo systemctl start transmission
osmc@osmc:~/.config/transmission-daemon$ grep rpc-username settings.json 
    "rpc-username": "dillthedog",
osmc@osmc:~/.config/transmission-daemon$ ps -ef|grep [t]ransm
osmc      7966     1  0 18:38 ?        00:00:00 /usr/bin/transmission-daemon -f --log-error --allowed *.*.*.*

Thank you for the detailed response! I had hoped that I’d produce a different result when I followed your instructions, but it seems that I’ve run into the same problem. Here’s my transcript:

osmc@vero:~/.config/transmission-daemon$ ls -la
total 32
drwxr-xr-x 5 osmc osmc 4096 May 22 17:36 .
drwxr-xr-x 4 osmc osmc 4096 May 18 15:31 ..
drwxr-xr-x 2 osmc osmc 4096 May 15 15:09 blocklists
-rw------- 1 osmc osmc  820 May 21 23:29 dht.dat
drwxr-xr-x 2 osmc osmc 4096 May 23 01:20 resume
-rw------- 1 osmc osmc 2199 May 21 23:30 settings.json
-rw------- 1 osmc osmc  153 May 22 17:36 stats.json
drwxr-xr-x 2 osmc osmc 4096 May 23 01:20 torrents
osmc@vero:~/.config/transmission-daemon$ systemctl stop transmission
osmc@vero:~/.config/transmission-daemon$ systemctl status transmission
● transmission.service - Transmission BitTorrent Daemon
   Loaded: loaded (/lib/systemd/system/transmission.service; enabled; vendor pre
   Active: inactive (dead) since Thu 2019-05-23 13:48:31 CEST; 17s ago
  Process: 1010 ExecStart=/usr/bin/transmission-daemon -f --log-error --allowed
  Process: 590 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
 Main PID: 1010 (code=exited, status=0/SUCCESS)

May 21 23:30:21 vero systemd[1]: Starting Transmission BitTorrent Daemon...
May 21 23:30:31 vero systemd[1]: Started Transmission BitTorrent Daemon.
May 23 13:48:30 vero systemd[1]: Stopping Transmission BitTorrent Daemon...
May 23 13:48:31 vero transmission-daemon[1010]: Closing transmission session...
May 23 13:48:31 vero systemd[1]: Stopped Transmission BitTorrent Daemon.
lines 1-12/12 (END)
osmc@vero:~/.config/transmission-daemon$ vi settings.json
osmc@vero:~/.config/transmission-daemon$ grep rpc-whitelist settings.json
    "rpc-whitelist": "127.0.0.1,192.168.*.*",
    "rpc-whitelist-enabled": true,
osmc@vero:~/.config/transmission-daemon$ systemctl start transmission
osmc@vero:~/.config/transmission-daemon$ grep rpc-whitelist settings.json
    "rpc-whitelist": "*.*.*.*",
    "rpc-whitelist-enabled": true,
osmc@vero:~/.config/transmission-daemon$

Ok, now we have something to work with. :wink:

The problem is in this line:

ExecStart=/usr/bin/transmission-daemon -f --log-error --allowed *.*.*.*

The man page tells us that --allowed “Allow[s] RPC access to a comma-delimited whitelist of IP addresses.”. Clearly, it has precedence over rpc-whitelist in settings.json.

As a quick workaround, you can edit file /lib/systemd/system/transmission.service and remove the --allowed *.*.*.* part. Longer-term, I think that @sam_nazarko needs to do the same, since the setting is already in settings.json and having it in two places seems to serve no useful purpose, as well as causing confusion.

Thank you @dillthedog, that worked! I really appreciate your persistence in getting to the root of this issue.

I was actually trying to change the whitelists so that I could manage my torrents in the terminal. Now that I’ve succeeded in making the change, I realize that transmission-remote-cli does not seem to be part of the OSMC Transmssion package. Do you happen to know if transmission-remote-cli is likely to be able to control OSMC Transmssion? I’d rather not install it if it’s going to create problems.

I’d recommend transgui.

1 Like