rollhax

Btsync On Linux Not Saving Settings, Other Issues

Recommended Posts

What's happening: I'm able to get to the webgui and login with my preset username/password. It then asks me to create a new user, which I do. When I get in and click "Add Folder" there are no folders (it's empty). Also, if I restart the btsync process, it asks me again to create a new user, like it never actually saved the first user I created.

 

This happens when I start btsync via systemd OR manually:

# systemctl start btsync.service$ btsync --config /etc/btsync.conf --nodeamon

I'm running arch linux running btsync version 1.4.75.

 

Also, I was able to get this working fine on a different PC, and to my knowledge I've followed the same steps (even gone so far as to copy the same btsync.conf file with some minor edits). I've verified the btsync user has read/write access to my storage_path, but the problem persists.

 

This feels like a permissions issue. Here is my btsync.conf file:

{  "device_name": "djarch",  "listening_port" : 0, // 0 - randomize port/* storage_path dir contains auxilliary app files if no storage_path field: .sync dir created in the directory   where binary is located. otherwise user-defined directory will be used */ "storage_path" : "/var/lib/btsync",/* set location of pid file */// "pid_file" : "/var/run/btsync/btsync.pid",/* use UPnP for port mapping */  "use_upnp" : false,/* limits in kB/s. 0 - no limit */  "download_limit" : 0,  "upload_limit" : 0,/* proxy configuration */// "proxy_type" : "socks4", // Valid types: "socks4", "socks5", "http_connect". Any other value means no proxy// "proxy_addr" : "192.168.1.2", // IP address of proxy server.// "proxy_port" : 1080,// "proxy_auth" : false, // Use authentication for proxy. Note: only username/password for socks5 (RFC 1929) is supported, and it is not really secure// "proxy_username" : "user",// "proxy_password" : "password",  "webui" :  {    "listen" : "0.0.0.0:8888" // remove field to disable WebUI/* preset credentials. Use password or password_hash */  ,"login" : "btsync"//  ,"password" : "password"  ,"password_hash" : "obfuscated" // password hash in crypt(3) format//  ,allow_empty_password" : false // Defaults to true/* ssl configuration *///  ,"force_https" : true // disable http//  ,"ssl_certificate" : "/path/to/certificate.pem"//  ,"ssl_private_key" : "/path/to/private.key"/* directory_root path defines where the WebUI Folder browser starts (linux only). Default value is / *///  ,"directory_root" : "/media/misc/backups"/* dir_whitelist defines which directories can be shown to user or have folders added (linux only)   relative paths are relative to directory_root setting *///  ,"dir_whitelist" : [ "/home/user/MySharedFolders/personal", "work" ]  }/* !!! if you set shared folders in config file WebUI will be DISABLED !!!   shared directories specified in config file  override the folders previously added from WebUI. *//*,  "shared_folders" :  [    {      "secret" : "MY_SECRET_1", // required field - use --generate-secret in command line to create new secret      "dir" : "/home/user/bittorrent/sync_test", // * required field      "use_relay_server" : true, //  use relay server when direct connection fails      "use_tracker" : true,      "use_dht" : false,      "search_lan" : true,      "use_sync_trash" : true, // enable SyncArchive to store files deleted on remote devices      "overwrite_changes" : false, // restore modified files to original version, ONLY for Read-Only folders      "known_hosts" : // specify hosts to attempt connection without additional search      [        "192.168.1.2:44444"      ]    }  ]*//* Advanced preferences can be added to config file. Info is available at http://sync-help.bittorrent.com */}

FWIW, logs with debug enabled (by creating debug.txt with contents 'FFFF' in the storage_path):

[btsync@djarch ~]$ btsync --config /etc/btsync.conf --nodaemonBy using this application, you agree to our Privacy Policy, Terms of Use and End User License Agreement.http://www.bittorrent.com/legal/privacyhttp://www.bittorrent.com/legal/terms-of-usehttp://www.bittorrent.com/legal/eula[20140904 11:46:55.643] total physical memory 536870912 max disk cache 2097152[20140904 11:46:55.644] test sha1: AE5BD8EFEA5322C4D9986D06680A781392F9A642[20140904 11:46:55.644] test sha2: 630DCD2966C4336691125448BBB25B4FF412A49C732DB2C8ABC1B8581BD710DD[20140904 11:46:55.644] test aes: 0A940BB5416EF045F1C39458C653EA5A07FEEF74E1D5036E900EEE118E949293[20140904 11:46:55.644] Loading config file version 1.4.75[20140904 11:46:55.644] My PeerID: 106170D41389D2E1CC96D8E36F7BDE0B27890FB3[20140904 11:46:55.644] loaded history: 0 events[20140904 11:46:55.644] setup socket 9 for local peer discovery for 127.0.0.1:0: success[20140904 11:46:55.644] setup socket 10 for local peer discovery for xx.xx.xx.xx:0: success[20140904 11:46:55.644] setup socket 11 for local peer discovery for xx.xx.xx.xx:0: success
Edited by rollhax

Share this post


Link to post
Share on other sites

What's happening: I'm able to get to the webgui and login with my preset username/password. It then asks me to create a new user, which I do. When I get in and click "Add Folder" there are no folders (it's empty). Also, if I restart the btsync process, it asks me again to create a new user, like it never actually saved the first user I created.

If you run Sync with a config file, it overrides settings in the web ui (i.e. settings won't be saved)

Share this post


Link to post
Share on other sites

If you run Sync with a config file, it overrides settings in the web ui (i.e. settings won't be saved)

 

Forgive my presumption, but did you read the rest of my post? I set this up just recently on a different box, also running arch linux, and it's set to start btsync with a config file. The settings survive a process restart on that box everytime, and it never ask(s|ed) me to create a new user.

 

Also of note, I can't even get btsync to start on this new box unless I give it a config file. No error messages, nothing. 

Also, even if I refresh the webgui, after creating a user (also after logging in with my presets), the "register user" window comes up again.

Edited by rollhax

Share this post


Link to post
Share on other sites

I'm having a simmular problem, I am unable to sellect a folder(nothing is shown) in the WebUI for a fresh 1.4 install on arch. I tried a manual config as well as the auto config script from the AUR.

Share this post


Link to post
Share on other sites

I pulled up chrome dev tools, and under console noted a bunch of http 500 errors:

GET http://localhost:8888/gui/?token=chOIzXChoGPPoQeGIjg095tzzL7pQQozaODnchuyXgdalwvUVA_HdmUQCVQAAAAA&action=settings&t=1409880169862 500 (ERROR) jquery-1.11.1.js:9631GET http://localhost:8888/gui/?token=chOIzXChoGPPoQeGIjg095tzzL7pQQozaODnchuyXgdalwvUVA_HdmUQCVQAAAAA&action=pause&t=1409880169865 500 (ERROR) jquery-1.11.1.js:9631GET http://localhost:8888/gui/?token=chOIzXChoGPPoQeGIjg095tzzL7pQQozaODnchuyXgdalwvUVA_HdmUQCVQAAAAA&action=getsyncfolders&discovery=1&t=1409880169917 500 (ERROR) jquery-1.11.1.js:9631GET http://localhost:8888/gui/?token=chOIzXChoGPPoQeGIjg095tzzL7pQQozaODnchuyXgdalwvUVA_HdmUQCVQAAAAA&action=useridentity&t=1409880169918 500 (ERROR) jquery-1.11.1.js:9631Resource interpreted as Font but transferred with MIME type text/html: "http://localhost:8888/gui/fonts/opensans-light.woff". jquery-1.11.1.js:5732GET http://localhost:8888/gui/?token=chOIzXChoGPPoQeGIjg095tzzL7pQQozaODnchuyXgdalwvUVA_HdmUQCVQAAAAA&action=version&t=1409880169939 500 (ERROR) jquery-1.11.1.js:9631GET http://localhost:8888/gui/?token=chOIzXChoGPPoQeGIjg095tzzL7pQQozaODnchuyXgdalwvUVA_HdmUQCVQAAAAA&action=debugmode&t=1409880169940 500 (ERROR) jquery-1.11.1.js:9631GET http://localhost:8888/gui/?token=chOIzXChoGPPoQeGIjg095tzzL7pQQozaODnchuyXgdalwvUVA_HdmUQCVQAAAAA&action=getfoldersettings&t=1409880169990 500 (ERROR) jquery-1.11.1.js:9631GET http://localhost:8888/gui/?token=chOIzXChoGPPoQeGIjg095tzzL7pQQozaODnchuyXgdalwvUVA_HdmUQCVQAAAAA&action=getsyncfolders&discovery=1&t=1409880169991 500 (ERROR) jquery-1.11.1.js:9631GET http://localhost:8888/gui/?token=chOIzXChoGPPoQeGIjg095tzzL7pQQozaODnchuyXgdalwvUVA_HdmUQCVQAAAAA&action=getpendingrequests&t=1409880169992 500 (ERROR) 

Just got this error, which I'm guessing is the root of my problem:

error: "Need to agree with the license"status: 500

How do I go about agree'ing with said license?

Share this post


Link to post
Share on other sites

I know this problem. It happens if you have a btsync 1.4 installation with configuration file that specifies a username and password and than access the web UI. When you connect for the first time with the Web UI, it mandatorily wants you to accept the EULA. Unfortunately the EULA confirmation dialog is also used to create the initial login.

 

OK - you try to reenter the data, confirm the EULA and the web UI appears to start. But something is broken. You see a "Loading..." in the middle. If you stop btsync and restart it, the Web UI requests a username and a password again.

 

The only "official" solution, is to create a fully new btsync environment (that means: delete the internal database in the storage_path) with a configuration file with no credentials. If you connect with the Web UI, you will get the "EULA and create initial user"-dialog, you fill it, check the EULA thing, and btsync will really start. You will see not "Loading..." but "No folders" in the middle and everything works fine.

 

Maybe there is also an unofficial solution that maybe someone has reverse engineered (it deals with an undocumented parameter in the config file)...  :ph34r:

Share this post


Link to post
Share on other sites

@tuxpoldo

 

Thanks for your response. I was just coming back here to update with my solution, which was basically the same as yours.

 

I did try a config file with no username/password, but unfortunately that had the same results.

 

What I ended up doing was writing my own service config file for systemd, starting btsync without a config file, getting it mostly set up (i.e., past the license accept point), and then updating my service config file to use btsync.config.

 

It was a rather annoying, round-about solution, but I eventually got it working and it seems good so far.

 

Thanks again!

Share this post


Link to post
Share on other sites

@rollhax can you elaborate a bit more on your workaround which seems to NOT include deleting the entire DB?? I too just upgraded to 1.4.75-5 on linux (syno nas) .. i keep getting the "new user" box. My config DOES have user/pass within. No matter what I enter, I am stuck with LOADING in center and no shares, however, I can see that syncing IS occurring. I just don't have a webgui view. 

 

Thanks

Share this post


Link to post
Share on other sites

Same problem here, when I accept the EULA, it opens the interface but nothing works. Javascript console displaying errors:

 

 

{ "error": "Need to agree with the license", "status": 500 }

 

 

If I refresh, same problem - keeps asking for create new account.

 


The only "official" solution, is to create a fully new btsync environment (that means: delete the internal database in the storage_path) with a configuration file with no credentials. If you connect with the Web UI, you will get the "EULA and create initial user"-dialog, you fill it, check the EULA thing, and btsync will really start. You will see not "Loading..." but "No folders" in the middle and everything works fine.

 

This worked, but can the bug be fixed?

 

Thanks, and btsync ftw!

Edited by a3013321

Share this post


Link to post
Share on other sites

This "official" solution is all well and good .. HOWEVER, how do I get a view of the currently deployed internal database so that I can grab all the secrets and sync folders from it? It's a bit difficult to rebuild the sync when it's deployed to a bunch of disparate users.

 

Right now, I'm relegated to running blind and having no web-gui access .. which also means I can't make any changes or additions, but at least it's running .. I'm secretly hoping for a non-disruptive solution or workaround.

 

I can't fathom deleting my internal DB and then re-distributing (and in many cases manually for the user re-creating) all the current distributed shares with new secrets. 

 

Thanks,

 

jpf

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.