wizlon

Members
  • Content Count

    6
  • Joined

  • Last visited

About wizlon

  • Rank
    New User
  1. Hi: thanks for going through such an extensive example. It's clear that things work as they should on your end. My brand new hi-spec laptop arrived, and I am sorry to report I still can't get the service to auto-start properly. I am quite sure I have the config setup properly in /etc/btsync/user.conf:- //!/usr/sbin/btsync-daemon --config // DAEMON_UID=andrew // DAEMON_UMASK=0007 { "device_name": "WiZHome Sync", "listening_port" : 0, "storage_path" : "/home/andrew/.btsync", "check_for_updates" : false, "use_upnp" : false, "download_limit" : 0, "upload_limit" : 0, "pid_file" : "/home/andrew/.btsync/btsync.pid", "webui" : { "listen" : "0.0.0.0:8888" }, "shared_folders" : [ { "secret" : "{removed for this post}", // * required field "dir" : "/home/WiZShare/", // * required field "use_relay_server" : true, "use_tracker" : true, "use_dht" : false, "search_lan" : true, "use_sync_trash" : true ,"known_hosts" : [ "192.168.1.2:44444" ] } ] } When I boot up and logon, just as with my old laptop, BTSync does not seem to fire up and is certainly not syncing folders; nor does not show as being "online". There is no btsync-daemon running per: ps axu | grep btsync-daemon If I start the service with 'sudo service btsync start', it fires up straight away, with no problems. It then starts to sync and all is well. I have to start it manually. This is a new install on a new machine. I am still wondering if it's got something to do with permissions of the pid file. Either way, it's pretty clear to me now that it's not hardware related in my case. It's perplexing. I am sure I can set it up to run as I did on my old laptop (not as a service on autostart, but at least to run as an instance when one of the two users on my machine logs in). I'd really like to get this to run when I start my machine up even without anyone logging on. Regards and thanks for your postings. Sorry for being a "repeat offender" - tis not deliberate. wizlon
  2. Great work. I have been experimenting here too, and I found that I could easily get btsync to run as downloaded from the BitTorrentSync web site, but both of the init scripts (server and desktop) caused me problems. After a lot of terminal work and hair-pulling, I too found permission issues with the PID file (but unlike you, I wasn't smart enough to fix the scripts). I overcame the PID issue by manually specifying the PID file in a btsync configuration file, and using the same btsync configuration file for launching btsync for users1 and 2 automatically when they login on my system (a novel approach, but it works!). And I had to set permission for users1 and 2 for the PID file too. Only one instance of btsync will run (i.e. whoever logs in first), but either one of them will sync the shared folder I set up (which also contains shared encfs folders). It works like a charm now, and I can sync a shared encrypted folder between two users and my android devices, which is exactly what I am trying to do. I spent ages on this, so I am glad I got a solution - and I am also glad that I may have helped others explore and identify a potential bug too. Your solution is better as it fixes the problem (I go around it - I am not so good with Linux, I am just an ex Windows misfit). I'll probably play with the scripts next week now that you have shown me the way (or we may even get an update Thanks for posting your findings!
  3. Well I am certainly feeling a little better knowing it's perhaps an unusual bug and not me just screwing up the settings. The good news for me is right now, I am "practicing" using this software (and indeed Ubuntu) in an old laptop (has just 1GB ram, 32-bit processor) whilst my new super-spec'd Systems76 laptop is being built. Hopefully all these problems will go away once I get a modern machine to run Ubuntu on. To answer your question: I wish to sync a folder that my wife and I use on our Windows Desktop computer to my Ubuntu-based computer (right now my old laptop, very soon to be my new one). We need to have the folder accessible to either of us when we are logged on. Right now, this one folder is on my Windows desktop and we share it as a single user (not very convenient). * Update: I played a little more today. If I reboot and logon as user2 ('gillian'), the services are not running, and if I execute sudo ./btsync restart (twice) it does successfully load service for user2 but fails to run service for user1 ('andrew'). Is it possible my permissions are all screwed up? You've been very helpful sir, I am grateful for your time. andrew
  4. Thanks so much for the detailed reply. Here's a line-by-line result of my attempts (I added some comments using // at beginning of lines). There is a very interesting observation (see below): 1. Cold reboot (not changing anything - i.e. same config files I posted earlier). - no connection at "localhost:9999/gui" (or ...9998/gui) So I opened a terminal, and here's what I did/found: andrew@BobCat:/etc/btsync$ cd /etc/btsync andrew@BobCat:/etc/btsync$ ls -l total 16 -rwxrwx--- 1 andrew andrew 397 Aug 3 07:19 andrew.conf -rwxrwx--- 1 gillian gillian 401 Aug 3 07:19 gillian.conf //so my config files are in place - check. andrew@BobCat:/etc/btsync$ ps axu | grep btsync-daemon andrew 2776 0.0 0.0 4428 808 pts/0 S+ 09:12 0:00 grep --color=auto btsync-daemon // so no process for "gillian", but there is one for andrew - or is there... andrew@BobCat:/etc/btsync$ netstat -tlpe | grep btsync-daemon (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) // I don't understand this output at all. From the 'ps axu...' line above, I do seem to have a process running, but from netstat it says nothing? I also re-ran this command with root for good measure and it returns with absolutely nothing: andrew@BobCat:/etc/btsync$ sudo netstat -tlpe | grep btsync-daemon andrew@BobCat:/etc/btsync$ // So, I now try restarting btsync and this is where it gets INTERESTING: andrew@BobCat:/etc/btsync$ sudo service btsync restart * Stopping P2P file synchronisation daemon(s)... * Stopping btsync instance 'andrew' [fail] // So, it failed to stop 'andrew'. Is it perhaps because it's not really running? I ask because:- // I double-checked - still nothing present on localhost:9999/gui or :9998/gui (as expected) // So, I tried Restarting again and POW - it all works:- andrew@BobCat:/etc/btsync$ sudo service btsync restart * Stopping P2P file synchronisation daemon(s)... * No btsync instance is running. * Starting P2P file synchronisation daemon(s)... * Autostarting btsync instance 'andrew' [ OK ] * Autostarting btsync instance 'gillian' [ OK ] //And I have a gui present at both localhost:9999/gui and :9998/gui Before I made any more changes per your last posting, I thought I'd post this to see if it made any sense to you? I am more than happy to proceed with your initial suggestions. I was able to sync from folders created in both gui's - i.e. it seems to work, but only because I issues TWO restart commands I will now (cold) reboot without making changes...done. No gui's, and the folders do not sync - it's all stopped again. It's as if I need to run a command to start the btsync - am I doing something that stupid? Thanks for all your help! andrew PS - if I issue two restart commands again after a cold reboot, it starts to work. So this seems to be reproducible.
  5. Sorry for the delay (travel - my job). I have removed the shared folders and I have the two configuration files as shown below. I logon as user 'andrew', fire up my browser and BTSync shows nothing at either http://localhost:9999/gui/ or http://localhost:9998/gui/. If I open a terminal, cd to /etc/btsync then execute: /usr/lib/btsync/btsync-daemon --nodaemon --config /etc/btsync/andrew.conf BTSync fires up and I have a gui at http://localhost:9999/gui/ Now, if I exit (Ctrl-C in the term), the gui disapears - makes sense. Now if I enter /usr/lib/btsync/btsync-daemon --nodaemon --config /etc/btsync/gillian.conf I get an error message "Can't open pid file /home/gillian/.gwbtsync/sync.pid. Permission denied". The folder /home/gillian/.gwbtsync does exist. I can restart the /andrew.conf as before. I can't explain any of this. I have a new install of Ubuntu 13.04 (I reinstalled it fresh just to see if there was anything amiss with even that.) If you can help me figure out why this is behaving this way, I would really appreciate it. All I want to do is be able to sync two folders - one for user andrew, one for gillian. Config files at /etc/btsync/ are: andrew.conf //!/usr/sbin/btsync-daemon --config // // © 2013 YeaSoft Int'l - Leo Moll // AUTOSTART=all // DAEMON_UID=andrew // DAEMON_UMASK=0007 { "device_name": "A-WiZ btsync Server", "listening_port" : 0, "storage_path" : "/home/andrew/.awsync", "check_for_updates" : false, "use_upnp" : false, "download_limit" : 0, "upload_limit" : 0, "webui" : { "listen" : "0.0.0.0:9999" } } and /gillian.conf: //!/usr/sbin/btsync-daemon --config // // © 2013 YeaSoft Int'l - Leo Moll // AUTOSTART=all // DAEMON_UID=gillian // DAEMON_UMASK=0007 { "device_name": "G-WiZ btsync Server", "listening_port" : 0, "storage_path" : "/home/gillian/.gwbtsync", "check_for_updates" : false, "use_upnp" : false, "download_limit" : 0, "upload_limit" : 0, "webui" : { "listen" : "0.0.0.0:9998" } } All the directories DO exist. User 'gillian' has full access to the /home/gillian/.gwbtsync folder. User andrew has full access to folder /home/andrew/.awsync Regards, andrew
  6. Hi: I am trying to setup the BitTorrent Sync server and have found this thread very useful, but not quite enough for me to ge things to fully work. I have two users on this machine: user1 and user2. I believe I am supposed to create two user config files /etc/btsync/user1.config and /etc/btsync/user2.config - done. I have failed to get the sync to work properly with one of the users. Here's the config file (they are pretty much the same) I am using, which I created from one of the samples: // DAEMON_UID=andrew // DAEMON_UMASK=0007 // { "device_name": "DevServer", "listening_port" : 0, "storage_path" : "/home/andrew/.mysync", "check_for_updates" : false, "use_upnp" : false, "download_limit" : 0, "upload_limit" : 0, "webui" : { "listen" : "0.0.0.0:9999" }, "shared_folders" : [ { "secret" : "<deleted>", "dir" : "/home/andrew/test", "use_relay_server" : true, "use_dht" : false, "search_lan" : true, "use_sync_trash" : true } ] } Update3: When I fire up my computer without loging on any user, one of the BTSync configurations is executed (and it is syncing - I confirmed that by adding a file from a remote device, swithinc said device off then logging in - the sync'd file did come through). The second users config does not fire up until and unless I log that user on, and only then because I execute a startup script that basically runs /usr/lib/btsync/btsync-daemon --nodaemon --config /etc/btsync/user1.conf. I set this up just to see if I could get it to work - and I can, so the config seems to work, but BT Sync seems unable to read and run with two files (which is clearly wrong). I'd like both configurations to behave the same way - why does one fire up automatically (great) but the other only do so as/when/if I login *and* execute a script? I am clearly doing something dumb, but I can't see what. Update4: It's the strangest thing. If I take both configs onlibe, reset the secret codes inside and restart the service, I can get both to fire up. When I restart the computer, only one (the same one) restarts. If I login, and fire up a terminal, I can start the second service at the command line, but as soon as I restart, I go back to one service. It actually doesn't make any sense to me. :-( Any help appreciated. Regards,