Debian And Ubuntu Server Unofficial Packages For Bittorrent Sync


Recommended Posts

I posted a topic -  "pid_file" setting not working . Perhaps if I mention it here, maybe some one would be able to make a comment on it.

 

Thank you!

 

 

 

The solution is simple. You wrote:

 

The issue is -  when I run (without sudo, as I dont want to run it as root):

 

service btsync start

 

 

Exactly this is the error. btsync will not run as root because you specified it into the config file with DAEMON_UID=MYUSERNAME and not because you are issuing the command service as a user.

Link to comment
Share on other sites

In Raspbian, I get this error when running sudo apt-get update:
 

Err http://debian.yeasoft.net n/a/main Sources   404  Not FoundIgn http://mirrordirector.raspbian.org wheezy/rpi Translation-enErr http://debian.yeasoft.net n/a/contrib Sources  404  Not FoundErr http://debian.yeasoft.net n/a/non-free Sources  404  Not FoundErr http://debian.yeasoft.net n/a/main armhf Packages  404  Not FoundErr http://debian.yeasoft.net n/a/contrib armhf Packages  404  Not FoundErr http://debian.yeasoft.net n/a/non-free armhf Packages  404  Not FoundIgn http://debian.yeasoft.net n/a/contrib Translation-en_USIgn http://debian.yeasoft.net n/a/contrib Translation-enIgn http://debian.yeasoft.net n/a/main Translation-en_USIgn http://debian.yeasoft.net n/a/main Translation-enIgn http://debian.yeasoft.net n/a/non-free Translation-en_USIgn http://debian.yeasoft.net n/a/non-free Translation-enW: Failed to fetch http://debian.yeasoft.net/btsync/dists/n/a/main/source/Sources  404  Not FoundW: Failed to fetch http://debian.yeasoft.net/btsync/dists/n/a/contrib/source/Sources  404  Not FoundW: Failed to fetch http://debian.yeasoft.net/btsync/dists/n/a/non-free/source/Sources  404  Not FoundW: Failed to fetch http://debian.yeasoft.net/btsync/dists/n/a/main/binary-armhf/Packages  404  Not FoundW: Failed to fetch http://debian.yeasoft.net/btsync/dists/n/a/contrib/binary-armhf/Packages  404  Not FoundW: Failed to fetch http://debian.yeasoft.net/btsync/dists/n/a/non-free/binary-armhf/Packages  404  Not FoundE: Some index files failed to download. They have been ignored, or old ones used instead.

However, btsync still installs just fine. What's up with this?

Link to comment
Share on other sites

In Raspbian, I get this error when running sudo apt-get update:

...

However, btsync still installs just fine. What's up with this?

 

 

I suppose that under raspbian lsb_release -cs returns something broken like "n/a" that caused a broken package source.

Please do the following:

 

sudo rm /etc/apt/sources.list.d/btsync.listsudo echo deb http://debian.yeasoft.net/btsync wheezy main contrib non-free >> /etc/apt/sources.list.d/btsync.listsudo echo deb-src http://debian.yeasoft.net/btsync wheezy main contrib non-free >> /etc/apt/sources.list.d/btsync.listsudo apt-get update

This should work based on the assumption that wheezy packages will work under raspbian...

Link to comment
Share on other sites

Kubuntu 13.04-x64 packages do not work, for the last few (2-3) revisions on 2 seperate machines.  One of these machines has a backported mainline kernel, the other is stock.

 

On the backported machine, btsync installs and seems to run, but NEVER gets any connection (shares have both LAN and WAN participants).  Logs are unhelpful, showing only repeated "HTTP: IP 192.168.2.142: GET /gui/?token=xxxxxx" messages.

 

On the stock machine, the following error persists upon install attempt:

Setting up btsync (1.1.70-4~raring) ... * Starting P2P file synchronisation daemon(s)... * Autostarting btsync instance 'debconf-default' invoke-rc.d: initscript btsync, action "start" failed. dpkg: error processing btsync (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: btsync

These errors have been the case with all versions since the upgrade from 1.1.70-1, regardless of status (upgrade, purge and reinstall, dpkg -i --force-overwrite, etc.).  Have even gone so far as to updatedb && locate btsync and .btsync, rm all references and attempt again.

 

On same LAN, I have a few 32-bit Kubuntu and Debian Wheezy based boxes as well, every one of which has been through all the same upgrades without any issues (and all Kubuntu have same / similar software as the 64-bit does), so it's definitely looking like bad 64-bit builds to me...

 

It'd sure be nice to permit these 2 machines back into my sharing, particularly the backported box, as it's got all my big storage...

Link to comment
Share on other sites

On RaspBmc August Version i logged in as root and added :

sudo rm /etc/apt/sources.list.d/btsync.list

sudo echo deb http
://debian.yeasoft.net/btsync wheezy main contrib non-free >> /etc/apt/sources.list.d/btsync.list
sudo echo deb-src http://debian.yeasoft.net/btsync wheezy main contrib non-free >> /etc/apt/sources.list.d/btsync.list

sudo apt-get update

 

then sudo apt-get install btsync ... everything starts correct ....

 


Everything in configuration window works fine ... but after that following error appears :
 

Selecting previously unselected package btsync.
(Reading database ... 24741 files and directories currently installed.)
Unpacking btsync (from .../btsync_1.1.70-4~wheezy_armhf.deb) ...
Setting up btsync (1.1.70-4~wheezy) ...
[....] Autostarting btsync instance 'debconf-default':invoke-rc.d: initscript btsync, action "start" failed.
dpkg: error processing btsync (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 btsync
E: Sub-process /usr/bin/dpkg returned an error code (1)
Link to comment
Share on other sites

...

[....] Autostarting btsync instance 'debconf-default':invoke-rc.d: initscript btsync, action "start" failed.

OK - it seems that on your raspberry the daemon init scripts returns an error. Unfortunately the installation routine fails, if it is not possible to execute /etc/init.d/btsync successfully. I will make sure, that this cannot happen in the next version but anyway we have to find out, why the daemon startup script fails.

Since this happens for several different reasons and it's very annoying, it will be fixed by returning always 0 in btsync start and btsync stop in order to not affect installation/update/uninstallation

See Issue #3

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

Thanks for making such a great product, our use case is to put up to 1000 shared folders in each configuration file (per port) to allow customers to develop their shopping sites removely.

 

I'll try to keep my error list and features request precise.

 

A race condition exists when one single file is being used for multiple shared folders - where, when one of our shared folders is created and a shared folder is deleted  by two separate processes, one of the updates can go missing.

 

BTSync needs: 1.) To check a shared folder exists when loading a configuration file and if not, skip that shared folder with warning and load the rest of the file. Currently it bugs out.

 2.) Fix - Empty shared folder tag bugs out.

    "shared_folders": [
    ]

 3.) When there's duplicate directories or duplicate keys within (or across all) configuration files - skip the shared folder and warn instead of bugging out. (I have programmed to avoid these happening, but it's quite confusing when ur developing and there's no error messages etc).

 4.) To continue loading configuration files, when one configuration file fails. As currently it stops and dies.

 5.) To allow the same port number to be used in multiple configuration files, instead of bugging out - this would help get rid of the above race condition and allow us to put one shared folder per config file.

 6.) A configuration tester command would be nice to validate syntax prior to making changes live "btsync -t (for test)  -f (for file) /var/tmp/test.conf"

 7.) Better error messages, such as "Configuration syntax error" "Duplicate Directory" "Duplicate Key" and an indication where the error occurred.

 8.) BTSync service reload - I have yet to test what happens when you have a lot of shared folders (in terms of restart time). Can we have a function that reloads the configuration and doesn't have to restart (rescan? reopen connections?) all the shared folders, just start the new/changed ones?

 9.) Some way to check a particular shared folder is running? So --check "shared folder name"  with a response like "OK" or "FAILED" so we can parse the response and display relevant message to user.

 

Cheers,

Joe
 

Link to comment
Share on other sites

Hi,

 

I'm using the package on my Ubuntu 13.04 and it looks OK. However, the sync folder I have with another (windows) computer at work never finishes. The Windows machine reports that sync is completed, but Ubuntu's web interface shows "882kb" UP in the WebUI and indicator icon. I don't know why I'm seeing this when everything seems to be completely synced from the logs in Windows machine.

 

Also the "indicator icon" on my taskbar never stops turning. It goes on an on. I enabled debug logging and I can see the some repeated logs with same messages like ping, sync state finished, found peer, etc. 

 

Would this be related to the package or should I report it in the main forum?

Link to comment
Share on other sites

Hi,

 

I'm using the package on my Ubuntu 13.04 and it looks OK. However, the sync folder I have with another (windows) computer at work never finishes. The Windows machine reports that sync is completed, but Ubuntu's web interface shows "882kb" UP in the WebUI and indicator icon. I don't know why I'm seeing this when everything seems to be completely synced from the logs in Windows machine.

 

Also the "indicator icon" on my taskbar never stops turning. It goes on an on. I enabled debug logging and I can see the some repeated logs with same messages like ping, sync state finished, found peer, etc. 

 

Would this be related to the package or should I report it in the main forum?

 

I think that this is a general btsync related problem (not related to packaging) and that you should post it to the main forum. BTW: I notices sometimes the same behaviour...

Link to comment
Share on other sites

Hello,

 

Thanks for making such a great product, our use case is to put up to 1000 shared folders in each configuration file (per port) to allow customers to develop their shopping sites removely.

 

I'll try to keep my error list and features request precise.

...

 

Cheers,

Joe

Hi! Please post your list to the main forum and not in this topic, since it mainly relates to the btsync executable itself. In this topic we only discuss about the debian packaging for servers (that is not officially part of the product).

Link to comment
Share on other sites

Released new packages 1.1.70-5 with a lot of bugfixes and additions. The most noticeable change will surely be the removed dependency from specific library versions that required a dedicated version for each distribution release making it unnecessarily hard to deploy on several platforms.

Starting from now, btsync is available on Debian squeeze, wheezy, jessie and sid for the platforms i386, amd64, armel and armhf

Since launchpad permits only to build i386 and amd64 packages, I'm seriously thinking about offering the packages for Ubuntu also from my personal repository. The clear advantage would be that armhf and armel builds would also be available for Ubuntu. Please let me know what you think about it.

All Debian builds are now online. As usual, Ubuntu builds will be probably available in a few hours.

 

Changelog:

 

btsync (1.1.70-5) unstable; urgency=low  - Updated btsyncindicator to version 0.9 in btsync-user  - Added "BitTorrent Sync" desktop icon in btsync-user (Issue #6)  - Fixed: 'Response' object has no attribute 'text' bug (Issue #2)  - Fixed: removed lintian warnings (Issue #1)  - Fixed: service startup/shutdown does not affect any more    installation/update/uninstallation (Issue #3)  - Fixed: the packages now install EXACTLY the same executable btsync    binary as distributed by BitTorrent Inc. - Previously the binary    was stripped by debhelper (dh_strip) (Issue #4)  - Fixed: both btsync and btsync-user will not specify and strict    library version dependency making it possible to install the same    package on different Debian/Ubuntu/XXXbian versions without the    need to create a specific package (Issue #5) -- Leo Moll <leo.moll@yeasoft.com>  Sat, 30 Sep 2013 15:31:16 +0200
Link to comment
Share on other sites

I get an error here and the fix posted did not work:

sudo echo deb http://debian.yeasoft.net/btsync wheezy main contrib non-free >> /etc/apt/sources.list.d/btsync.list-sh: /etc/apt/sources.list.d/btsync.list: Permission denied

The fix posted here (not to use lsb_release if you do not have it on your system) is not related to the error message "Permission denied". You should find out, why you have no permission to write in /etc/apt/sources.list.d/

Probably sudo is configured not to give you real root access...

Link to comment
Share on other sites

Hi

 

I installed btsync from your repository on my rpi. 

 

I wanted to run btsync between 0.15-5.15 as during that time I do not have bandwidth cap. As normal I tried to set up cron.

 

First I tried:

  15  0  *   *   *     root /etc/init.d/btsync start

It did not work... I also tried to create a script to start sync and run it using cron

  3  8  *   *   *     root /bin/bash /root/btsync_start.sh

 

root@Osiris(08:14:21)~$ cat btsync_start.sh
#!/bin/bash -
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/opt/usr/bin:/opt/usr/sbin:/usr/local/bin:/usr/local/sbin"
service btsync start
 
 
It is not working.From cron log I get information that it was executed.
Oct  6 08:03:01 Osiris /USR/SBIN/CRON[4147]: (root) CMD (root /bin/bash /root/btsync_start.sh)
 
/etc/init.d/btsync status is not showing anything afterwards.
 
 
When I run /etc/init.d/btsync start/stop by hand it is working.
 
 
Any clues?
Link to comment
Share on other sites

... 

When I run /etc/init.d/btsync start/stop by hand it is working.

Any clues?

Weird. But I suppose that there must be something different in the environment that prevents the service to start/stop when invoked by cron. Normally cron generates a "deadletter" file in the home directory of the user under which a command is performed, if the command outputs anything. Take a look for such a file and check its contents. Perhaps here you can find some hint that may help you.

Link to comment
Share on other sites

Released new packages 1.1.82-1 with some bugfixes and many additions. Beside of the upstream update to 1.1.82, this release adds the powerpc architecture both for btsync and btsync-user packages.

Furthermore there has been some substantial improvement to the desktop version (btsync-user). The included btsyncindicator now contains additional integration features (like pausing and resuming btsync) and some annoying bugs have been fixed. Additionally there is a new command line utility (named btsync) including manpage that permits to manage btsync. The full documentation of all available commands can be found in the manpage:

man btsync
Since Launchpad (the hosting and building platform for the Ubuntu PPAs) does not offer arm and powerpc builds to common mortals like me, I decided to offer an alternative repository for all Ubuntu users.

If you are using Ubuntu and need packages for armel, armhf or powerpc you can add the repository with the following commands:

sudo gpg --keyserver pgp.mit.edu --recv-keys 6BF18B15sudo gpg --armor --export 6BF18B15 | sudo apt-key add -sudo echo deb http://ubuntu.yeasoft.net/btsync $(lsb_release -cs) main >> /etc/apt/sources.list.d/btsync.listsudo echo deb-src http://ubuntu.yeasoft.net/btsync $(lsb_release -cs) main >> /etc/apt/sources.list.d/btsync.listsudo apt-get updatesudo apt-get install btsync
This repository is complete (it contains also the i386, amd64 and source builds). If you prefer, you can use this repository instead of the Launchpad Ubuntu PPA. The advantage for you, is that you get the packages faster (because when Launchpad is busy it takes several hours before the packages are published). The advantage for me, is that I get some download statistics...

All Debian builds are now online. As usual, Ubuntu builds will be probably available in a few hours (unless you switch to the alternative repositories).

Changelog:

btsync (1.1.82-1) unstable; urgency=low  * New upstream release 1.1.82 of btsync  * New upstream release 0.10 of btsyncindicator  - Fixed: missing dependency to python-appindicator in btsync-user    (Issue #7)  - Added possibility to suspend/pause the btsync-agent in    btsync-user (Issue #8)  - Added a unique managing command in btsync-user (Issue #9)  - Added man page for the managing command (/usr/bin/btsync)  - Released powerpc packages -- Leo Moll <leo.moll@yeasoft.com>  Sat, 12 Oct 2013 01:46:51 +0200
Link to comment
Share on other sites

Released new packages 1.1.82-5 with a few bugfixes. All Debian builds are now online. As usual, Ubuntu builds will be probably available in a few hours.

Changelog:

 

btsync (1.1.82-2) unstable; urgency=low  - Fixed: Package fails to build on native arm builder (Issue #15)  - Fixed: missing config file prevented btsyncindicator to    start on fresh installations of btsync-user (Issue #14)  - Fixed: btsync --help does not show all available commands    in package btsync-user (Issue #13)  - Fixed: manpage btsync.7 was not installed in btsync-user (Issue #11) -- Leo Moll <leo.moll@yeasoft.com>  Sun, 13 Oct 2013 17:32:26 +0200
Link to comment
Share on other sites

if there was a way to make this for CentOS, that would be awesome.

 

Yes - that would be really awesome. I asked some time ago, if someone here is willing to make it (see http://forum.bittorrent.com/topic/20672-who-wants-to-create-rpm-packages/) but up to now nobody was able to really release something. I would be really glad to collaborate in such a project. But since I have absolutely no server running with RHEL/CentOS or any other distribution of this kind, I am not really able to be the leader of such a project.

 

Basically the following things have to be done:

  • Verify if the method of deployment implemented by my btsync server packages is also applicable to RHEL-like distributions. In case the deployment has to be adapted to fulfil the required standards. This requires a real good knowledge about the policies and also the typical ways to deploy this kind of server packages.
  • Setup a packaging project that creates the resulting packages
  • Provide a repository for distributing the packages

I offered all my support in doing this, but as I said, we need a project leader/architect that has the required expertise. This is not as easy as it may appear. This costs time and resources since you have not only to test (and this implies setting up different test scenarios) but also to provide some support.

Link to comment
Share on other sites

Hi knireis,

 

I can't get btsync to run on my sheevaplug running debian. 

On my server it works fine, i have same configuration file (except name and listening ip)

some time ago you wrote:

Thank you, it installs now fine on my sheevaplug as well!

did it work and stopped working with the latest release, or has it only installed but never worked?

Link to comment
Share on other sites

initially it would not install (it is an arm processor), the first for which the install was succesful was 1.1.70. But i never managed to get it to work.

OK. Than we must try to see, if the btsync core gives some meaningful error messages. Try the following as user root on the command line:

 

/usr/lib/btsync/btsync-daemon --nodaemon --config /etc/btsync/debconf-default.conf

If you do not use the default config file, please replace /etc/btsync/debconf-default.conf with the full path to the config file you have defined. But if you are using a different config file AND you have defined that the instance has to run under different user credentials, it is fundamental that you perform the test as the user under which you want the daemon to run.

Look if the btsync engine gives you any meaningful error messages and post them here.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.