btwalker

Error: Selected folder is already added to BitTorrent Sync

Recommended Posts

Hi all

Setup

-------

Ubuntu server 12.04.2 LTS 64bit

btsync ver Version 1.0.134

Trying to start btsnyc at boot time by adding "sudo -u btsync -i /opt/btsync/btsync --config /home/btsync/.btsync/btsync.conf" to rc.local.

When it boots up systems find each other and syncs file etc but I get the error message in sync.log that "Error while adding folder /btsyncstor: Selected folder is already added to BitTorrent Sync." immediately before this line is "Loaded folder /btsyncstor".

If i start btsync after I log in without using rc.local then I never get this error, so I assume it has to do with how I am starting btsync and somewhere along the line it is trying to load the sync folder twice?

I am not too sure why it is doing this.

Help and thanks. :)

Share this post


Link to post
Share on other sites

Please see the unofficial FAQ for more information on the "Selected folder is already added to BitTorrent Sync" error

Thanks for your replay. Yes I have already seen this. But I have not added the folder twice, just once in the config file which is what has me puzzled about this error in the log. Is that what you mean? I am sharing exactly one folder with this one secret on this system. There are no other btsync shared folders with the same secret.

Share this post


Link to post
Share on other sites

Well, other possibilities could be that you've somehow ended up with TWO instances of BitTorrent Sync running at the same time, or maybe the config file is being loaded TWICE?

Share this post


Link to post
Share on other sites

Well, other possibilities could be that you've somehow ended up with TWO instances of BitTorrent Sync running at the same time, or


btsync@btsync:~$ ps aux | grep btsync
btsync 1150 0.2 0.4 405888 4720 ? Ssl 17:59 0:07 /opt/btsync/btsync --config /home/btsync/.btsync/btsync.conf
root 1189 0.0 0.3 54672 3304 ? Ss 17:59 0:00 sshd: btsync [priv]
btsync 1191 0.0 0.1 54672 1420 ? S 17:59 0:00 sshd: btsync@pts/0
btsync 1192 0.0 0.7 26144 7380 pts/0 Ss 17:59 0:00 -bash
btsync 1315 0.0 0.1 18160 1256 pts/0 R+ 18:54 0:00 ps aux
btsync 1316 0.0 0.0 9384 924 pts/0 S+ 18:54 0:00 grep --color=auto btsync

Only one instance is running...

maybe the config file is being loaded TWICE?

This is what I thought in my original post. Which is where I need the help with as I only ran it in the rc.local file. I also tried the /etc/init.d method and get the same error in the log file. I can't see where it would attempt to load the config a second time.

Share this post


Link to post
Share on other sites

More information.

I don't think te config is being run twice because, I tried deleting everying inside the sync folder, and the first time btsync was ran this error is not in the log. It however appears in the log whenever btsync is started.

I am wondering if this has to do because I am creating my sycn folders via the config file and not the webgui. I will try to test this and see.

Share this post


Link to post
Share on other sites

I set up the sync folder via the web gui, and the error is gone.

So I do not know if I did something wrong when setting it up via the config file OR setting up via the config file is incompatible with tyring to launch btsync at boot time instead of at login time, OR there is a bug when setting up a folder via the config file and not the gui.

Share this post


Link to post
Share on other sites

I see the same behaviour if the sync folder is explicitly set in the config file. This is on 1.1.15.

Same thing here with preconfigured folders in config.json. I guess it's a B-U-G ! :-)

Share this post


Link to post
Share on other sites

Same thing here with preconfigured folders in config.json. I guess it's a B-U-G ! :-)

Same here. It's a bug. I tried with a "fresh" install to be sure - no change. (using 1.1.48 on ARM and windows)

Share this post


Link to post
Share on other sites

Are there any updates to this? I've been fighting this all day, assuming I was doing something wrong.

 

I've recreated the issue many times today an Linux x64 on both 1.148 and 1.1.82.

Share this post


Link to post
Share on other sites

Same issue. To reproduce:

 

  • Gracefully exit btsync-daemon,
  • Restart btsync-deamon with same --config file as last time,
  • "Error: Selected folder is already added to BitTorrent Sync"

It's a serious problem when it comes to repeatable deployments.

Share this post


Link to post
Share on other sites

Yes, i am able to replicate this with btsync_glibc23_x64-1.2.73.tar.gz and also btsync_i386-1.2.73.tar.gz

 

edit: in the logfile, i am also seeing:

 

Loading config file version 1.1.42 (although there doesn't seem to be anything specific to 1.1.42)

Share this post


Link to post
Share on other sites

I'm getting this error on iOS too.

 

The app has no folders yet and has never been used, but I get the error "Folder is already added to BitTorrent Sync" trying to add one.

 

iOS 6, app version 1.2.36.

 

I tried erasing the app, re-installing and still get the same error.

 

This must be a new bug, because i'm using the app with no issues on another iOS device.

Share this post


Link to post
Share on other sites

Sorry, I can't help now as we were just trying BTsync out.  I still have great hope for it but it seems it's not ready for prime time (which you know as it still has the beta tag).  We've moved to another solution in the mean time and will hopefully be back next year when it's all working.

 

P.S. I promise I'm not trolling in posting this, I am mearly trying to give a bit of feedback to this bug.  It's directly affecting users.

 

Thanks again for a great project

Share this post


Link to post
Share on other sites

I am having this problem as well. I am running tuxpoldo's build of btsync (version 1.2.82) on Debian Testing (Linux linux 3.11-2-amd64 #1 SMP Debian 3.11.10-1 (2013-12-04) x86_64 GNU/Linux). The problem is easily reproducable on my machine:

# ps aux | grep btsyncjackson  10576  0.2  0.9 942368 76616 ?        Sl   12:19   0:04 evince /home/jackson/collections/software/linux/btsync/BitTorrentSyncUserGuide.pdfroot     11381  0.0  0.0  10356   916 pts/1    R+   12:52   0:00 grep btsync# /usr/lib/btsync/btsync-daemon --nodaemon --config /etc/btsync/default.conftotal physical memory 536870912 max disk cache 2097152Using IP address 192.168.0.100Loading config file version 1.2.82Loaded folder /home/shared/btsync_testError while adding folder /home/shared/btsync_test: Selected folder is already added to BitTorrent Sync.^CReceived shutdown request via signal 2Shutdown. Saving config sync.dat

Here is my default.conf file (with device_name and secret blanked out for privacy):

//// DAEMON_UID=shared// DAEMON_GID=shared// DAEMON_UMASK=0002//{   "device_name": "",  "storage_path" : "/home/shared/.btsync",  "listening_port" : 0,         // 0 - randomize port  "check_for_updates" : false,  // use apt for updates  "use_upnp" : false,           // Don't try to talk through NAT  "download_limit" : 0,         // limits in kB/s  "upload_limit" : 0,           // 0 = no limits  "webui" : {},                 // Disable WebUI  "shared_folders" :  [    {      "secret" : "",      "dir" : "/home/shared/btsync_test",      "use_relay_server" : false, // LAN only      "use_tracker" : false,    // LAN only      "use_dht" : false,        // LAN only      "search_lan" : true,      // Look for sharing computers on LAN      "use_sync_trash" : true   // Save files deleted on other devices    }  ]// Advanced preferences can be added to config file.// Info is available in BitTorrent Sync User Guide.}

Note that if I delete all the .dat files that btsync creates, it works. But then fails again on the next run:

# rm /home/shared/.btsync/*.dat# /usr/lib/btsync/btsync-daemon --nodaemon --config /etc/btsync/default.conf By using this application, you agree to our Privacy Policy and Terms.http://www.bittorrent.com/legal/privacyhttp://www.bittorrent.com/legal/terms-of-usetotal physical memory 536870912 max disk cache 2097152Using IP address 192.168.0.100^CReceived shutdown request via signal 2Shutdown. Saving config sync.dat# /usr/lib/btsync/btsync-daemon --nodaemon --config /etc/btsync/default.conf total physical memory 536870912 max disk cache 2097152Using IP address 192.168.0.100Loading config file version 1.2.82Loaded folder /home/shared/btsync_testError while adding folder /home/shared/btsync_test: Selected folder is already added to BitTorrent Sync.

I don't know what the correct behavior should be (ignoring .dat if --config is given, ignoring .dat if webUI disabled in config file, refraining from writing .dat if --config is given, something else ...), but something is definately borked in the current linux implementation.

Share this post


Link to post
Share on other sites

I am having this problem as well. I am running tuxpoldo's build of btsync (version 1.2.82) on Debian Testing (Linux linux 3.11-2-amd64 #1 SMP Debian 3.11.10-1 (2013-12-04) x86_64 GNU/Linux). The problem is easily reproducable on my machine...

You should ask tuxpoldo directly because he is a maintainer of his own repository with his own understanding of "How it should work (pre-install, post-install scripts i think)"...

 

Error while adding folder. Selected folder is already added:

Means that one folder is added to config file twice. Looks like pre-install or post-install script causing this. I'm using official package of btsync and never seen such errors :rolleyes:

Share this post


Link to post
Share on other sites

Are you using a JSON config file, or configuring with the WebUI?

 

I tried this with vanilla btsync, and get the same error as above. None of tuxpolo's scripts are adding the folder twice. What it appears to be happening is that btsync adds it once when reading the *.dat files, and then again when reading the json config file. In summary:

 

* If I use --config and there are no .dat files, it works fine.

* If I don't use --config and setup using the WebUI, it works fine.

* If I don't use --config and there are .dat files from a previous successful run with --config, it works fine.

* If I use --config and there are pre-existing .dat files, it gives me the error about "folder already added", and fails to synchronize with other computers.

Share this post


Link to post
Share on other sites

I thought I was the victim of this bug at first, but after testing, it seems the error message isn't stopping my folders in question from syncing, both to or from the btsync installs affected. I have 3 btsync installs with 3 folders setup syncing in various degrees between each, and after restarting btsync once each install is currently spitting out "Error while adding folder /home/btsync: Selected folder is already added to BitTorrent Sync." for each folder, yet still working fine.

 

Perhaps this is just a fluke on my part, but if not I believe the issue might just be cosmetic at this point, with btsync simply trying to generate the new .dat files, failing cause they're already there, and just moving on, continuing to sync as it's already got the .dat squared away.

Share this post


Link to post
Share on other sites

Hi all,

 

We know why this message pops up in the log, and eventually will fix it. It should not bring any functional or usability issues to your BTSync, so just ignore it for now.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.