Btsync listen ip:port error

Installed btsync while my active interface was tun0, this resulted in btsync using tun0 int ip to write to /etc/btsync/config.json, which is that start up directory called upon starting the service with QB. another thing since its using this file the var/lib/btsync folder does not exit so it can also not save data such as btsync user from /gui/ as well as directory to stay synced too. Yesterday i was testing the applications that i could use for btsync, i had it set up 2 sync folders which isnt much compared to what my plans are in the next week to have it sync all types of folders to my seedbox for automation to plex. And since im not too sure if it has to reindex(god i hope not 1.2TB of data takes forever) if i recreate the sync folders.

Thought on what i should do from here, i know what i could do, i could delete the config.json(backup first) and cp the user_config.json to config.json and that would to my knowledge fix the issue. But ill wait for the overlords to give me their impressions first.

I don’t use btsync so some shots in the dark here.

Can you not just edit the /etc/btsync/config.json with the proper IP that should’ve been added during the installation.

Secondly if /var/lib/btsync doesn’t exist (which it sounds like it should) it’s possible the installation didn’t complete successfully and may have thrown an error (but not a fatal one) when the IP it grabbed was wrong.

If I were you, I’d try removing and reinstalling the module again but ensure that no tunnelling or other is taking place. Barring that, manually edit the IP variable in the install script to match your public facing IP and go from there.

There is also a user_config in the btsync folder with everything built out to $home but its not called by default from the init.d/btsync. i would just update that to call the user_config but i dont know from there if i have to re update rc or not.

These are the two functions from the installer that likely got botched – if you are reluctant to reinstall btsync then look through these commands

function _installBTSync4() {
  cd && mkdir /home/"${MASTER}"/sync_folder
  sudo chown ${MASTER}:btsync /home/${MASTER}/sync_folder
  sudo chmod 2775 /home/${MASTER}/sync_folder
  sudo usermod -a -G btsync ${MASTER} >/dev/null 2>&1
}
function _installBTSync5() {
  sed -i 's/BTSYNC=no/BTSYNC=yes/g' /home/"${MASTER}"/.startup
  cp -r ${local_setup}templates/btsync/config.json.template /etc/btsync/config.json
  cp -r ${local_setup}templates/btsync/user_config.json.template /etc/btsync/user_config.json
  sudo sed -i "s/BTSGUIP/$BTSYNCIP/g" /etc/btsync/config.json
  sudo sed -i "s/BTSGUIP/$BTSYNCIP/g" /etc/btsync/user_config.json
}

the $home/sync_folder is present but its not being called, the service which i presume is called from init.d is
DAEMON=/usr/bin/btsync
BTSYNC_USER=btsync
CONFIG=/etc/btsync/config.json

which i havnt touched while it should be i presume pointing to CONFIG=/etc/btsync/user_config.json
and my .startup isnt calling a specific conf file like btsync localhost:8888 -conf blah blah blah.

I will go ahead and try to uninstall/reinstall.

Uninstalled/reinstalled same thing, i can manually change the ip no problem but when i uninstall the init.d file goes away and reinstalled adds it back in with the same config file.

alright i guess im going to have to sum it up to just configuring it the way i want it since i did a search and my new problem i run into is that the way the service is set up btsync is both the user and group for itself so it only has permission to its folder, which in most cases wouldnt be an issue, but for me my sda is a 150gb ssd and my media files are on sdb/sdc so to correctly and easily automate my life im going to just add btsync to plex group or something to sync directly to my other drives.

Marked as resolved

this might help idk maybe it is what i used to allow plex into home user dir

username=dtech

usermod -a -G dtech plex
chown dtech:plex /home/dtech < replace with dir you want.
chmod 755 /home/dtech
and replace plex with btsync
and you should be set :smiley:

so
usermod -a -G (username) btsync
chown (username):btsync (where you want it to get into)
chmod 755 (same place you want it)

that should fix your problem idk maybe i am wrong but could always try :smiley:

all i did was add btsync group to the folder i wanted to sync on my HDD’s.

1 Like