mojeda Posted April 5, 2014 Report Share Posted April 5, 2014 (edited) I'm trying to sync files between 2 ubuntu servers and get the error message in the web gui "Don't have permissions to write to the selected folder" sync.log in /var/lib/btsync/ Gives the following Error Message: Check: Too many open files Seems to be hit and miss, I previously synced 1.9GBs worth of files (few hundred files) and it worked fine, however now I'm syncing just 300MBs where it's maybe 1-200ish files. Edit: I'm also seeing "status:144 error:Check: Too many open files meta:1 conns:0 io:0" Edited April 5, 2014 by mojeda Quote Link to comment Share on other sites More sharing options...
mojeda Posted April 5, 2014 Author Report Share Posted April 5, 2014 (edited) I ran the below command and it lists 711 open files in my shared folder.lsof -Fn -u btsync | sort | uniq | grep /sharedIt's almost as if if btsync tries to sync too many files and hits the limit, it "locks up."cat /proc/sys/fs/file-maxShows that open file limit is set to 200k overall system. I can't check the ulimit for the btsync user since it does not have shell acess however I applied higher soft and hard nofile limits for all users.ulimit -Snulimit -HnSoft limit is now 20k while hard limit is 50k. However the issue still persists. Edit: Changing the user it runs as also doesn't fix the problem. Edited April 5, 2014 by mojeda Quote Link to comment Share on other sites More sharing options...
Firon Posted April 5, 2014 Report Share Posted April 5, 2014 did you adjust /etc/security/limits.conf and reboot? or just set ulimit -n in the init script? you need to do one of the two. Quote Link to comment Share on other sites More sharing options...
mojeda Posted April 5, 2014 Author Report Share Posted April 5, 2014 did you adjust /etc/security/limits.conf and reboot? or just set ulimit -n in the init script?you need to do one of the two. I've adjusted limits.conf and restarted, yes.* soft nofile 20000* hard nofile 50000Users are confirming the above with ulimit -Sn and -Hn. Quote Link to comment Share on other sites More sharing options...
Firon Posted April 5, 2014 Report Share Posted April 5, 2014 Hmm, okay. Does it match what you see in /proc/$pid/limits too? Quote Link to comment Share on other sites More sharing options...
mojeda Posted April 5, 2014 Author Report Share Posted April 5, 2014 Strangely no it does not.Max open files 1024 4096 filesHowever the user in which btsync is running as shows the limits I previously set...~$ ulimit -Sn20000~$ ulimit -Hn50000 Quote Link to comment Share on other sites More sharing options...
Firon Posted April 5, 2014 Report Share Posted April 5, 2014 It's probably inheriting limits from the system process that actually started it. The easiest fix is to modify the init script to explicitly set ulimit. A lot of start scripts already provide a mechanism to specify it via the defaults file, but YMMV. Quote Link to comment Share on other sites More sharing options...
mojeda Posted April 5, 2014 Author Report Share Posted April 5, 2014 It's probably inheriting limits from the system process that actually started it.The easiest fix is to modify the init script to explicitly set ulimit. A lot of start scripts already provide a mechanism to specify it via the defaults file, but YMMV.I've modified the init script to set the ulimit to 20k and its limit is now 20k. It finally did sync all the files but when I check for open files it still has them open. It's not closing them like I would think it should? I imagine I will just run into the same issue once it has around 20k files open still.... Quote Link to comment Share on other sites More sharing options...
shawnv Posted April 5, 2014 Report Share Posted April 5, 2014 I think this is related to my post here http://forum.bittorrent.com/topic/29158-1380-ubuntu-100-cpu/ and it only happens on ubuntu with the new version 1.3.80 this wasn't happening before on 1.2.X Quote Link to comment Share on other sites More sharing options...
mojeda Posted April 5, 2014 Author Report Share Posted April 5, 2014 I think this is related to my post here http://forum.bittorrent.com/topic/29158-1380-ubuntu-100-cpu/ and it only happens on ubuntu with the new version 1.3.80 this wasn't happening before on 1.2.XInteresting... I only decided to use ubuntu because I didn't think tuxpoldo had a debian version of the btsync ppa repository, however it looks like it does. I'm going to try it on a debian server and see how that goes. Quote Link to comment Share on other sites More sharing options...
martinjohn Posted April 5, 2014 Report Share Posted April 5, 2014 I was just about to start a thread about this (as I hadn't had much luck finding any solutions) - am getting the same issue with Ubuntu (on a Raspberry PI) with this version but am not having the issues with the same folder on a number of different OSs with different BT Sync versions Centos - 1.1.82FreeBSD - 1.2.82 Was thinking it was a problem with the ARM version or the lack of processing power with the PI but seems more generic Quote Link to comment Share on other sites More sharing options...
mojeda Posted April 5, 2014 Author Report Share Posted April 5, 2014 It's been roughly 10 hours, and my ubuntu server is still showing that btsync user has 2,196 files open in the my shared folder. Quote Link to comment Share on other sites More sharing options...
martinjohn Posted April 5, 2014 Report Share Posted April 5, 2014 Hmm - tried an older version (http://btsync.s3-website-us-east-1.amazonaws.com/) And now getting connection closed issues (similar to http://forum.bittorrent.com/topic/24886-sync-over-relay-server-blocked-downloading-file-file-due-connection-closed/) Doesn't seem to want to work on my Pi Shame, had it working a few months backOh, before I switched I increased the number of open files but once it hit 20k I thought it was getting rather silly. Quote Link to comment Share on other sites More sharing options...
encript Posted April 5, 2014 Report Share Posted April 5, 2014 I am having this same issue. First I was getting "You don't have permissions to write to the selected folder" after upgrading. When I checked the log I saw it said too many files open. When can I do here? Quote Link to comment Share on other sites More sharing options...
Firon Posted April 5, 2014 Report Share Posted April 5, 2014 As a workaround, you can increase your ulimit for open files. I guess the newest BTSync isn't closing files correctly. Quote Link to comment Share on other sites More sharing options...
encript Posted April 5, 2014 Report Share Posted April 5, 2014 Where can I download version before this? Quote Link to comment Share on other sites More sharing options...
shizeon Posted April 6, 2014 Report Share Posted April 6, 2014 I'm also experiencing this problem. I had one folder with 17.2 GB and around 12,000 files that was syncing fine until I updated to 1.3.80. All of a sudden I get the " Check: Too many open files" and the webUI shows 'Don't have permissions to write to the Selected folder'. Running ubuntu 64 13.10. I reverted back to 1.3.77 and everything is working fine again. 1.3.80 eventually freezes up completely. Quote Link to comment Share on other sites More sharing options...
shawnv Posted April 6, 2014 Report Share Posted April 6, 2014 I'm also experiencing this problem. I had one folder with 17.2 GB and around 12,000 files that was syncing fine until I updated to 1.3.80. All of a sudden I get the " Check: Too many open files" and the webUI shows 'Don't have permissions to write to the Selected folder'. Running ubuntu 64 13.10. I reverted back to 1.3.77 and everything is working fine again. 1.3.80 eventually freezes up completely. How do I get version 1.3.77? Quote Link to comment Share on other sites More sharing options...
shizeon Posted April 6, 2014 Report Share Posted April 6, 2014 (edited) How do I get version 1.3.77? Not sure where you grab it offically, can't seem to find a link on the website to let you get at past versions. I saved a copy of mine before upgrading. It is the linux x64 version. [link removed] Edited April 6, 2014 by GreatMarko Sync should only be downloaded through official BitTorrent Sync channels. For 1.3.77, please use http://syncapp.bittorrent.com/1.3.77/ Quote Link to comment Share on other sites More sharing options...
encript Posted April 6, 2014 Report Share Posted April 6, 2014 Anyone have an older 32-bit version for ubuntu? Quote Link to comment Share on other sites More sharing options...
mojeda Posted April 6, 2014 Author Report Share Posted April 6, 2014 (edited) Softpedia seems to have 1.3.77 both 64 and 32 bit versions: [link removed] If you're trying to install via PPA I'm not sure. Edited April 6, 2014 by GreatMarko For your safety, Sync should only be downloaded through official BitTorrent Sync channels. For 1.3.77, please use http://syncapp.bittorrent.com/1.3.77/ Quote Link to comment Share on other sites More sharing options...
shawnv Posted April 6, 2014 Report Share Posted April 6, 2014 Softpedia seems to have 1.3.77 both 64 and 32 bit versions: [link removed] If you're trying to install via PPA I'm not sure. Thanks Quote Link to comment Share on other sites More sharing options...
antimojv Posted April 6, 2014 Report Share Posted April 6, 2014 Anyway for example it's not clear how to revert to 1.3.77 on "Raspbian GNU/Linux 7 (wheezy)" for example , i use the unofficial distributionhttp://forum.bittorrent.com/topic/18974-debian-and-ubuntu-server-unofficial-packages-for-bittorrent-sync/ Could someone help me (and probably ohter person) on how to revert to previous version ? Quote Link to comment Share on other sites More sharing options...
encript Posted April 6, 2014 Report Share Posted April 6, 2014 Okay, I went to 1.3.77 and all is good again. I'll wait for whatever is after 1.3.8 and make a copy of the binary before updating. Lesson learned. Quote Link to comment Share on other sites More sharing options...
tuxpoldo Posted April 6, 2014 Report Share Posted April 6, 2014 Anyway for example it's not clear how to revert to 1.3.77 on "Raspbian GNU/Linux 7 (wheezy)" for example , i use the unofficial distributionhttp://forum.bittorrent.com/topic/18974-debian-and-ubuntu-server-unofficial-packages-for-bittorrent-sync/ Could someone help me (and probably ohter person) on how to revert to previous version ? There is very DIRTY way to revert: See here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.