scratchit Posted June 10, 2016 Report Share Posted June 10, 2016 Having problems starting btsync on Ubuntu using user systemd. I need "user" instead of "system" due to permission issues and btsync needs to run as the user syncing the files - saves a lot of headaches. I installed the btsync PPA which creates the systemd files on Ubuntu (actually xubuntu), but after "systemctl --user enable btsync" the btsync process never starts automatically on boot. I've found a fix for this, at least on Ubuntu, and you need to change the "WantedBy" in /usr/lib/systemd/user/btsync.service as follows: From: [Install] WantedBy=multi-user.target To [Install] WantedBy=default.target Then reload: systemctl --user disable btsync systemctl --user daemon-reload systemctl --user enable btsync I don't know if this a bug in btsync or Ubuntu, but this solution works. Quote Link to comment Share on other sites More sharing options...
RomanZ Posted June 13, 2016 Report Share Posted June 13, 2016 @scratchit JFYI - PPA was an unofficial package. Currently, we have official package which also supports systemd. Quote Link to comment Share on other sites More sharing options...
AntoniosHadji Posted September 29, 2016 Report Share Posted September 29, 2016 The official package complains of 'unable to connect to upstart' on Ubuntu 16.04 Quote Link to comment Share on other sites More sharing options...
Helen Posted September 30, 2016 Report Share Posted September 30, 2016 @AntoniosHadji, Any details on how and when it reproduces? Quote Link to comment Share on other sites More sharing options...
AntoniosHadji Posted October 1, 2016 Report Share Posted October 1, 2016 @Helen this is an error message that displays when the package is installed or removed. My understanding is that Ubuntu 16.04 uses systemd where previous versions used upstart. Quote Link to comment Share on other sites More sharing options...
Helen Posted October 4, 2016 Report Share Posted October 4, 2016 well, package installed and launched without a problem on my ubuntu 16.06, x64. And it seems that at least 15.04 was already shipped with systemd? So how exactly you install the package? Are there any details on how and when it reproduces, a command and its output? Try to purge resilio-sync and install from scratch. Quote Link to comment Share on other sites More sharing options...
AntoniosHadji Posted October 4, 2016 Report Share Posted October 4, 2016 @Helen, currently I'm running rslsync manually from the ~/bin folder. If I install the resilio-sync using apt, how do I make sure the config stays the same? I am currently redirecting the web gui to a different port and I have it syncing one folder with my android phone. Quote Link to comment Share on other sites More sharing options...
RomanZ Posted October 5, 2016 Report Share Posted October 5, 2016 @AntoniosHadji When starting, Resilio Sync from package takes config from /etc/resilio-sync/config.json. Ensure that there is a config that you want and that user rslsync has access to it. Quote Link to comment Share on other sites More sharing options...
AntoniosHadji Posted October 5, 2016 Report Share Posted October 5, 2016 When I install resilio-sync using apt-get, I see these messages: Processing triggers for man-db (2.7.5-1) ... Setting up resilio-sync (2.4.1-1) ... initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused insserv: warning: script 'binfmt-support' missing LSB tags and overrides insserv: Default-Start undefined, assuming empty start runlevel(s) for script `binfmt-support' insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `binfmt-support' initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused insserv: warning: script 'screen-cleanup' missing LSB tags and overrides insserv: Default-Start undefined, assuming empty start runlevel(s) for script `screen-cleanup' insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `screen-cleanup' Processing triggers for systemd (229-4ubuntu10) ... Is this anything to be concerned about? When I start resilio-sync it fails to start. ● resilio-sync.service - Resilio Sync service Loaded: loaded (/lib/systemd/system/resilio-sync.service; enabled; vendor preset: enabled) Active: inactive (dead) (Result: exit-code) since Wed 2016-10-05 13:06:42 EDT; 21s ago Docs: http://help.getsync.com/ Process: 1521 ExecStart=/usr/bin/rslsync --config /etc/resilio-sync/config.json (code=exited, status=1/FAILURE) Process: 1517 ExecStartPre=/bin/chown -R rslsync:rslsync /var/run/resilio-sync (code=exited, status=0/SUCCESS) Process: 1511 ExecStartPre=/bin/mkdir -p /var/run/resilio-sync (code=exited, status=0/SUCCESS) Oct 05 13:06:42 antonios-linux systemd[1]: Failed to start Resilio Sync service. Oct 05 13:06:42 antonios-linux systemd[1]: resilio-sync.service: Unit entered failed state. Oct 05 13:06:42 antonios-linux systemd[1]: resilio-sync.service: Failed with result 'exit-code'. Oct 05 13:06:42 antonios-linux systemd[1]: resilio-sync.service: Service hold-off time over, scheduling restart. Oct 05 13:06:42 antonios-linux systemd[1]: Stopped Resilio Sync service. Oct 05 13:06:42 antonios-linux systemd[1]: resilio-sync.service: Start request repeated too quickly. Oct 05 13:06:42 antonios-linux systemd[1]: Failed to start Resilio Sync service. ~ I have edited the config file to show as follows: { "storage_path" : "/home/antonios/Music/sync/", "pid_file" : "/var/run/resilio-sync/sync.pid", "agree_to_EULA": "yes", "webui" : { "listen" : "127.0.0.1:7962" } } Quote Link to comment Share on other sites More sharing options...
AntoniosHadji Posted October 5, 2016 Report Share Posted October 5, 2016 I have it working now, but I feel there must have been a better way to fix the original problem. I changed the group on the parent folder to rslsync, I added user rslsync to group rslsync I had to delete the synced files on my android device (otherwise a duplicate copy was created) I relinked the android device to the sync folder Here is my current config { "storage_path" : "/var/lib/resilio-sync/", "pid_file" : "/var/run/resilio-sync/sync.pid", "agree_to_EULA": "yes", "directory_root" : "/home/antonios/Music/sync", "directory_root_policy" : "all", "webui" : { "listen" : "127.0.0.1:7962" } } What I have set up is a folder called 'sync' in the Music directory under my home directory on Ubuntu 16.04. I have the resilio app on my android device. I want to be able to drop audio files into the 'sync' folder and have them automatically sync to my android device. This is all working now. But I basically had to start over from scratch to get it working. It would have been nice if the android app could have known that the 'sync' folder that already existed was the folder that I wanted to sync into. Also the permissions issues on the Ubuntu machine seemed unclear why they were not handled automatically. Quote Link to comment Share on other sites More sharing options...
RomanZ Posted October 6, 2016 Report Share Posted October 6, 2016 @AntoniosHadji The inability to connect to upstart indicate some issues with your Ubuntu. Likely, Sync failed to start later because post-script was not executed and did not changed the ownership os Sync's files. Quote Link to comment Share on other sites More sharing options...
knireis Posted October 7, 2016 Report Share Posted October 7, 2016 I managed to install the official version on a linux mint 18 desktop (using the current user) without problems. But how do i install resilio-sync on a headless server and make it run as a user (while using systemd?) Quote Link to comment Share on other sites More sharing options...
RomanZ Posted October 7, 2016 Report Share Posted October 7, 2016 @knireis Pretty much in same way. SSH to your server, and use package manager to get it installed. If you got a systemd on your Linux, see the section "Enable sync service as current user:" in the article - Sync can run as current user. Quote Link to comment Share on other sites More sharing options...
knireis Posted October 7, 2016 Report Share Posted October 7, 2016 thanks so far, would i need to give this command: systemctl --user enable resilio-sync as root or as the user which has to run resilio sync Quote Link to comment Share on other sites More sharing options...
knireis Posted October 7, 2016 Report Share Posted October 7, 2016 Tried it again on a clean ubuntu 16.04 to enable it as user gives a connect to bus error, enabling it as root works . Thanks Quote Link to comment Share on other sites More sharing options...
knireis Posted October 7, 2016 Report Share Posted October 7, 2016 New problem: sync only works when there is a putty connection active to the server, closing the putty connection stops sync. Establishing a putty connection restarts sync. Anything i can do to have it active all the time without the need to login into the server? Quote Link to comment Share on other sites More sharing options...
Helen Posted October 10, 2016 Report Share Posted October 10, 2016 On 10/7/2016 at 5:41 PM, knireis said: systemctl --user enable resilio-sync without sudo. On 10/7/2016 at 8:16 PM, knireis said: sync only works when there is a putty connection active to the server, you need to extend the session, try "sudo loginctl enable-linger username" Quote Link to comment Share on other sites More sharing options...
RedKenny Posted October 10, 2016 Report Share Posted October 10, 2016 (edited) . Edited October 10, 2016 by RedKenny forgot to quote Quote Link to comment Share on other sites More sharing options...
RedKenny Posted October 10, 2016 Report Share Posted October 10, 2016 11 hours ago, Helen said: without sudo. you need to extend the session, try "sudo loginctl enable-linger username" Took me a while to figure it out and finally read the answer. Might be useful to put it op on the install page. 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.