Sign in to follow this  
tuxpoldo

Configuration directives Ignored?

Recommended Posts

Hi BitTorrent Developers,

since I use btsync also for the internal synchronisation of internal files in my servers, I setup some closed configuration, but now I'm wondering, if this is really possible. Look at this configuration file:



//!/usr/lib/btsync/btsync-daemon --nodaemon --config
//
// This btsync instance provides sync services for
// all common files in the YeaSoft Server Grid
//
{
"device_name" : "tuxpoldo - Server Sync Instance",
"storage_path" : "/var/lib/btsync-serversync",
"listening_port" : 11076,
"check_for_updates" : false,
"use_upnp" : false,
"download_limit" : 0,
"upload_limit" : 0,
"webui" : {},
"shared_folders" : [ {
"secret" : "blahblahblah",
"dir" : "/mnt/data/tftproot/yeaboot/",
"use_relay_server" : false,
"use_tracker" : false,
"use_dht" : false,
"search_lan" : true,
"use_sync_trash" : true,
"known_hosts" : [
"10.65.4.1:11076",
"10.65.0.16:11076",
"10.65.18.1:11076"
]
}
]
}

I would expect btsync to do nothing with PNP and not to try to reach any external system. If I look to the log file, I see the following strange things:


[20130428 14:15:58] Loading config file version 1.0.134
[20130428 14:15:59] Got 2 relay ips
[20130428 14:15:59] Server ip 67.215.229.106:3000
[20130428 14:15:59] Server ip 67.215.231.242:3000
[20130428 14:16:10] NAT-PMP: Unable to map port with NAT-PMP.

Question:

  1. Why does btsync search for relay servers if I disabled the use of relay servers?
  2. Why does btsync try to do any PNP stuff?

In my opinion these are serious security flaws that may decrease the trust of users in btsync...

Share this post


Link to post
Share on other sites

upnp and nat-pmp are separate, and likely covered under separate directives.

Relay servers are checked regardless due to the possibility of you wanting to add a secret that is otherwise firewalled.

Share this post


Link to post
Share on other sites

Hi!

Thank you for your answer!

upnp and nat-pmp are separate, and likely covered under separate directives.

Will you release in future a documentation covering all configuration directives?

Relay servers are checked regardless due to the possibility of you wanting to add a secret that is otherwise firewalled.

Is (or will) there any possibility to disable checking external relay servers? In such a configuration this would not make sense...

BTW: In such a setup only with linux boxes, I have the problem that I see no replication working. I have read somewhere that the linux version takes up to 20 minutes to detect file system changes. Is this true? What's about inotify? I found nothing in the logfile reguarding change notifications.

Share this post


Link to post
Share on other sites
BTW: In such a setup only with linux boxes, I have the problem that I see no replication working.
Does the web interface show the devices connected to each other?
I have read somewhere that the linux version takes up to 20 minutes to detect file system changes. Is this true?
It's BSD based platforms (freebsd, macos) that have this limitation, not Linux.

In the future, there may be configuration options to completely disable the searching for relay servers and/or define your own.

Share this post


Link to post
Share on other sites

Does the web interface show the devices connected to each other?

No - because the web interface is disabled. But in the log files I can see that the devices are talking each other

Share this post


Link to post
Share on other sites

You see wonderful things like:


[20130428 18:58:12] Got id message from peer yeasoft-gate2 - Server Sync (AA74DB661E5341829AFAB8865A9208AE78A3DB0F) 1.0.134
[20130428 18:58:12] Merge: processing root message, remote hash 141665E627775973D61E1C62812D802BC7FB91FA, timediff: 0
[20130428 18:58:12] Merge: requesting elements for root
[20130428 18:58:12] Merge: processing elements message for
[20130428 18:58:12] Merge: will request files for /alix-rescue-0804/*
[20130428 18:58:12] Merge: will request files for /alix-rescue-1004/*
[20130428 18:58:12] Merge: will request files for /alix-rescue-deb6/*
[20130428 18:58:12] Merge: will request files for /alix-rescue-deb7/*
[20130428 18:58:12] Merge: will request files for /bootutils/*
[20130428 18:58:12] Merge: will request files for /centos-62/*
[20130428 18:58:12] Merge: will request files for /clonezilla/*
[20130428 18:58:12] Merge: will request files for /debian-etch/*
[20130428 18:58:12] Merge: will request files for /debian-lenny/*
[20130428 18:58:12] Merge: will request files for /debian-squeeze/*
[20130428 18:58:12] Merge: will request files for /debian-wheezy/*
[20130428 18:58:12] Merge: will request files for /esxi35u5/*
[20130428 18:58:12] Merge: will request files for /esxi40u2/*
[20130428 18:58:12] Merge: will request files for /esxi41u1/*
[20130428 18:58:12] Merge: will request files for /isolinux.bin/*
[20130428 18:58:12] Merge: will request files for /isolinux.cfg/*
[20130428 18:58:12] Merge: will request files for /ldlinux.sys/*
[20130428 18:58:12] Merge: will request files for /memtest86/*
[20130428 18:58:12] Merge: will request files for /menu.cfg/*
[20130428 18:58:12] Merge: will request files for /netpoldo-0804/*
[20130428 18:58:12] Merge: will request files for /netpoldo-1004/*
[20130428 18:58:12] Merge: will request files for /netpoldo-1204/*
[20130428 18:58:12] Merge: will request files for /netpoldo-deb6/*
[20130428 18:58:12] Merge: will request files for /netpoldo-deb7/*
[20130428 18:58:12] Merge: will request files for /ontpre/*
[20130428 18:58:12] Merge: will request files for /pmagic/*
[20130428 18:58:12] Merge: will request files for /pxelinux.0/*
[20130428 18:58:12] Merge: will request files for /pxelinux.cfg/*
[20130428 18:58:12] Merge: will request files for /syslinux/*
[20130428 18:58:12] Merge: will request files for /syslinux.cfg/*
[20130428 18:58:12] Merge: will request files for /ubuntu-0804/*
[20130428 18:58:12] Merge: will request files for /ubuntu-1004/*
[20130428 18:58:12] Merge: will request files for /ubuntu-1110/*
[20130428 18:58:12] Merge: will request files for /ubuntu-1204/*
[20130428 18:58:12] Merge: will request files for /ubuntu-1304/*
[20130428 18:58:12] Merge: sending get_files message
[20130428 18:58:12] Got ping (broadcast: 0) from peer 10.65.2.142:22144 (AA74DB661E5341829AFAB8865A9208AE78A3DB0F) for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A
[20130428 18:58:12] Found peer for folder /mnt/data/tftproot/yeaboot AA74DB661E5341829AFAB8865A9208AE78A3DB0F 10.65.2.142:22144 direct:1
[20130428 18:58:12] Got ping (broadcast: 0) from peer 10.65.2.142:22144 (AA74DB661E5341829AFAB8865A9208AE78A3DB0F) for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A
[20130428 18:58:12] Found peer for folder /mnt/data/tftproot/yeaboot AA74DB661E5341829AFAB8865A9208AE78A3DB0F 10.65.2.142:22144 direct:1
[20130428 18:58:12] Sending broadcast ping for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A
[20130428 18:58:12] Send ping to peer (BA74128C764764607A8127590EAF307BA0CF297C) for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A:
[20130428 18:58:12] ping 10.65.2.129:22144 directly
[20130428 18:58:12] Send ping to peer (AA74DB661E5341829AFAB8865A9208AE78A3DB0F) for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A:
[20130428 18:58:12] ping 10.65.2.142:22144 directly
[20130428 18:58:12] Send ping to peer () for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A:
[20130428 18:58:12] ping 10.65.0.16:22144 directly
[20130428 18:58:12] Send ping to peer () for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A:
[20130428 18:58:12] ping 10.65.4.1:22144 directly
[20130428 18:58:12] Send ping to peer () for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A:
[20130428 18:58:12] ping 10.65.8.1:22144 directly
[20130428 18:58:12] Send ping to peer () for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A:
[20130428 18:58:12] ping 10.65.18.1:22144 directly
[20130428 18:58:12] Got ping (broadcast: 0) from peer 10.65.2.129:22144 (BA74128C764764607A8127590EAF307BA0CF297C) for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A
[20130428 18:58:12] Found peer for folder /mnt/data/tftproot/yeaboot BA74128C764764607A8127590EAF307BA0CF297C 10.65.2.129:22144 direct:1
[20130428 18:58:12] Got ping (broadcast: 0) from peer 10.65.2.129:22144 (BA74128C764764607A8127590EAF307BA0CF297C) for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A
[20130428 18:58:12] Found peer for folder /mnt/data/tftproot/yeaboot BA74128C764764607A8127590EAF307BA0CF297C 10.65.2.129:22144 direct:1
[20130428 18:58:13] Got ping (broadcast: 0) from peer 10.65.2.142:22144 (AA74DB661E5341829AFAB8865A9208AE78A3DB0F) for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A
[20130428 18:58:13] Found peer for folder /mnt/data/tftproot/yeaboot AA74DB661E5341829AFAB8865A9208AE78A3DB0F 10.65.2.142:22144 direct:1
[20130428 18:58:13] Got ping (broadcast: 0) from peer 10.65.2.142:22144 (AA74DB661E5341829AFAB8865A9208AE78A3DB0F) for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A
[20130428 18:58:13] Found peer for folder /mnt/data/tftproot/yeaboot AA74DB661E5341829AFAB8865A9208AE78A3DB0F 10.65.2.142:22144 direct:1
[20130428 18:58:13] Sending broadcast ping for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A
[20130428 18:58:13] Send ping to peer (BA74128C764764607A8127590EAF307BA0CF297C) for share A2EF1BEB6B4AD2FE6CDA3DA0CEF528DCC9F0B59A:
[20130428 18:58:13] ping 10.65.2.129:22144 directly

The problem is that nothing is replicated....

I must add some information: it seems to be a problem only on this machine (running on debian 6 squeeze i386). All the other machines in the grid are working fine:

yeasoft-gate2(10.65.0.16): ubuntu 12.04 (precise) amd64

ape-gate(10.65.4.1): debian 7 (wheezy) i386

ccm-mgmt(10.65.18.1): ubuntu 10.03 (lucid) i386

All machines are running with the glib23 version....

Share this post


Link to post
Share on other sites

does the account running btsync have permissions on the folders?

Yes - it has. The btsync instance is running as root, so this should not be a problem. In the meantime I have noticed another problem: on ape-gate (the debian wheezy machine) btsync stops working without leaving any trace in the log file. But now I can see a pattern: The machines with problems are tuxpoldo and ape-gate. Both machines are Alix 2D13 router boards running with only 256MB RAM and 512MB swap so I suppose that the problems are mainly due to the fact that there is too less RAM available...

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.

Sign in to follow this