[Box Backup] exception Server BadSocketHandle (3/4) on Windows

E.W. Peter Jalajas boxbackup at fluffy.co.uk
Tue Dec 20 04:45:20 GMT 2005


Thanks again, Chris.  

Yes, bbackupd.exe ran fine from the command line, thanks.

But better yet, as I mentioned in my other message to the list today, I
took your recommendation and downloaded:

http://prdownloads.sourceforge.net/boxbackup/boxbackup-0.09.tgz?download

and followed these:

http://www.fluffy.co.uk/boxbackup/install.html
http://www.fluffy.co.uk/boxbackup/client.html

client-related instructions precisely. (I didn't repeat the
bbackupd-config step because I had all those pieces in place from prior
attempts.)

See that other message of mine under thread "regex missing on my
cygwin?" for some configure/make issues and their resolution.

So, back to the service...  I tested the install and it's running fine.
 

$ /usr/local/bin/bbackupd.exe /etc/box/bbackupd.conf

launches the daemon (I can see it in Task Manager, and in Control
Panel, Admin Tools, Event Viewer), and returns to the cygwin command
prompt as it should (my failed trunk install yesterday did not return
to the prompt).  I did some bbackupd.conf tweaking as mentioned in the
other post.  So, it all seems to be working per design.  So, I tried to
install the service:

First I removed the previously installed service attempt and killed the
daemon:

$ cd ~/boxbackup-0.09/contrib/cygwin/
$ perl remove-cygwin-service.sh
$ ps -ef | grep -i backup
$ kill -9 <id>

Confirmed service is not installed under the Services window.

$ perl install-cygwin-service.pl
Parameters retrieved from /etc/box/bbackupd.conf. Values:
        DataDirectory = /var/bbackupd/
        CommandSocket = C:\cygwin\var\run\bbackupd.sock
        PidFile = /var/run/bbackupd.pid
Can't chmod /var/bbackupd//*: No such file or directory
chmod...

Ugh. Unfortunately, 

$ net help services 

doesn't show boxbackup when I know it is installed (even if it isn't
running), so use Control Panel, Admin Tools, Services, refresh, and
shows no boxbackup service is installed, and:

$ ps -ef | grep -i backup

shows no daemon running.

So, pulling from that perl script, I did:

$ chmod 0777 /var/bbackupd/ ; chmod 0666 /var/bbackupd/* ; chmod 0666
/var/run/bbackupd.pid

and confirming:

$ ls -al /var/bbackupd/ /var/bbackupd/* /var/run/bbackupd.pid
-rw-rw-rw-  1 Owner None 0 Dec 19 22:32 /var/bbackupd/last_sync_finish
-rw-rw-rw-  1 Owner None 0 Dec 19 22:32 /var/bbackupd/last_sync_start
-rw-rw-rw-  1 Owner None 4 Dec 19 22:31 /var/run/bbackupd.pid

/var/bbackupd/:
total 0
drwxrwxrwx+ 2 Owner None  0 Dec 19 00:52 .
drwxrwxrwx+ 8 Owner Users 0 Dec 19 10:37 ..
-rw-rw-rw-  1 Owner None  0 Dec 19 22:32 last_sync_finish
-rw-rw-rw-  1 Owner None  0 Dec 19 22:32 last_sync_start

And now installing the service by hand:

$ cygrunsrv.exe -I boxbackup -p /usr/local/bin/bbackupd.exe -a
"/etc/box/bbackupd.conf SINGLEPROCESS" -o -f "Online Backup System by
Ben Summers"

generated no output to the screen.  Refreshing the Services window
shows boxbackup service installed but not started. Right clicking
boxbackup and clicking Start, started the service! 

$ net start | grep -i backup
   boxbackup

shows boxbackup service running (yeah!), and

$ ps -ef | grep -i backup
  SYSTEM    3772    2508   ?  23:00:41 /usr/local/bin/bbackupd

shows the service running and a PID (3772), but in Task Manager, I see
bbackupd.exe running, and turning on View, Select Columns, PID shows
the PID as a different number (3084)...

Using an ssh terminal on my boxbackup store server, and running:

User at BBServer:~$ tail -f /var/log/box

and then on the client side:

$ kill -s SIGHUP 3772

caused an Incoming connection and successful login on the server.  
bbackupd.exe is still running as PID 3084 in the Task Manager,  and 

$ ps -ef | grep -i backup
  SYSTEM    3772    2508   ?  23:00:41 /usr/local/bin/bbackupd

still showed the service running fine with no change in PID.

$ kill -s SIGHUP 3084

had the same successful results.  

Sorry, but I go through all this SIGHUP stuff in hopes that SIGHUPs to
either of these PIDS can let bbackupd.conf changes be activated without
resetting the 48 hour clock per
/home/Owner/boxbackup-0.09/lib/backupclient/BackupStoreConstants.h:    
#define BACKUP_DELETE_UNUSED_ROOT_ENTRIES_AFTER         172800

I hope someone finds my spewed sputum useful.

Thanks again to Ben for an awesome product, the immenseness of which
I'll probably never be able to fully comprehend.

Pete

--- Chris Wilson <chris at qwirx.com> wrote:

> On Mon, 19 Dec 2005, E.W. Peter Jalajas wrote:
> 
> > On the WinXP client:
>
~/trunk/distribution/boxbackup/contrib/cygwin/install-cygwin-service.pl
... 
>I strongly recommend you
> to use the release version, 0.09. 
> Can you run the client from the command line? (not as a service)
> 
> Cheers, Chris.
>



More information about the Boxbackup mailing list