settings changes not accepted. .json file not in default locations.[Solved]

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
fatmann66
Posts: 6
Joined: Sun Feb 05, 2017 6:41 pm

settings changes not accepted. .json file not in default locations.[Solved]

Post by fatmann66 »

Ubuntu 16.04
clean install from apt-get

stopped transmission-daemon and update /etc/transmission-daemon/settings.json (for testing changed RPC port to 9093)

started and tested no response on 9093 on 9091 get message saying to enable rpc (it is).

/etc/defaults/trannsmission-daemon states:

Code: Select all

# defaults for transmission-daemon
# sourced by /etc/init.d/transmission-daemon

# Change to 0 to disable daemon
ENABLE_DAEMON=1

# This directory stores some runtime information, like torrent files 
# and links to the config file, which itself can be found in 
# /etc/transmission-daemon/settings.json
CONFIG_DIR="/var/lib/transmission-daemon/info" 

# Default options for daemon, see transmission-daemon(1) for more options
OPTIONS="--config-dir $CONFIG_DIR"

# (optional) extra options to start-stop-daemon
#START_STOP_OPTIONS="--iosched idle --nicelevel 10"
ran a search for settings.json as root
results were:
/etc/transmission-daemon/
/home/config/transmission/ ( changed this port to 9094) still only 9091 responds
renamed both above settings.json files started transmission-daemon -> it started without error and 9091 responded

not sure where to go from here? is there any way to find out what file it's using because it's clearly not using the default as it should be.
is there a specific command or log I can check that clearly states where the config is coming from?

any help would be much appreciated.

regards,
Fatmann66
Last edited by fatmann66 on Tue Feb 07, 2017 10:16 pm, edited 2 times in total.
fatmann66
Posts: 6
Joined: Sun Feb 05, 2017 6:41 pm

Re: settings changes not accepted. .json file not in default locations.

Post by fatmann66 »

so for anyone else who ran into this issue I did the following:

looks as the default init.d script wasn't reading the correct config file and I was unable to find a log that stated what file if any it was using.

from the wiki I used the provided daemon script. renaming the default 16.04 script and using this one in it place.
https://trac.transmissionbt.com/wiki/Scripts/initd

once I started transmission-daemon with this script it used the default config file

NOTE: I wouldn't suggest doing the above. it didn't work out as Ubuntu 16.04 implemented a new was services are started "systemd" this could cause two instances running 1 from init.d and 1 from systemd
Last edited by fatmann66 on Tue Feb 07, 2017 10:14 pm, edited 1 time in total.
fatmann66
Posts: 6
Joined: Sun Feb 05, 2017 6:41 pm

Re: settings changes not accepted. .json file not in default locations.

Post by fatmann66 »

now I'm really confused.

if I start transmission from /etc/init.d.transmission-daemon start it reads to correct config file.
but if I start transmission service transmission-daemon start the original instance starts on port 9091
(I'm aware that this is happening because I changed the start script in init.d)

does anyone have any suggestions on how to find out what config file the original (I.e. service transmission-daemon start) is calling.
fatmann66
Posts: 6
Joined: Sun Feb 05, 2017 6:41 pm

Re: settings changes not accepted. .json file not in default locations.

Post by fatmann66 »

found this bug report:
https://bugs.debian.org/cgi-bin/bugrepo ... bug=734467

that indicates that the defaults file is ignored.

Code: Select all

journalctl -b | grep trans
pointed out that it was trying to load the settings.json from the home directory (which doesn't exist)

per the bug report I updated the .service file with the --config-dir this did allow transmission to start. I'm still having issue though with it not seeding after the torrent completes the download.

It looks the default version is buggy in 16.04.

I think the main tow issue are:

1) I didn't realize they made major changes in 16.04 on how servers were run I.E. systemd as this what was ultimately calling the daemon when you issue the service start command.

2) I wouldn't have thought Ubuntu would have released a bugged package and not applied the update that fixed it. (1) wouldn't have made a difference if it just worked

Ok,

it looks like this is caused by bad version of Transmission that ships as the default package of Ubuntu 16.04. by adding the PPA for transmission and updating you get 2.92 which seems stable and resolves a few problems that I was having.
Post Reply