[Box Backup] Error messages at execution
Wed, 28 Jan 2004 08:29:39 +0000
On 28 Jan 2004, at 05:30, Pascal Lalonde wrote:
> First of all, I didn't succeed in running bbstored on an OpenBSD 3.3
> box. I keep getting an 'Exception: RaidFile (2/8)' when trying to
> an account.
Does the directory you specified to raidfile-config have write
permissions for the user you're running bbstored under?
> So I decided to try on a 3.4 box, although I'm not root on this one. So
> I modified all the paths in the .h files from /etc/box to
> /home/plalonde/etc/box. I compiled everything, and the installation
> all fine. But when I execute bbstored, I get: 'bbstored: exception
This probably means that it can't find the configuration file.
> My setups are all with RAID disabled, since I don't have many hard
> to do my tests.
> The thing is, the exception messages are not quite "revealing" ;-)
> I tried to gdb bbstored, but I couldn't get it to match the executable
> with the source files. So I'm quite stuck.
You need to look for RaidFileException.h (for RaidFile exceptions, and
so on) which will tell you what the codes mean.
The release versions don't include the necessary symbols for gdb to
> And I generated my certificates by hand, like this:
> openssl req -newkey rsa:2048 -nodes -keyout domain.com-key.pem -keyform
> PEM -out domain.com-csr.pem -outform PEM
Did bbstored-config not work?
> and I signed it with my already-existing test CA key:
> openssl ca -in domain.com-csr.pem
> and copied the resulting certificate as clientCA.pem
Shouldn't that be domain.com-cert.pem ? clientCA.pem is the certificate
used to validate incoming client connections.
> How do you usually debug boxbackup?
I use the unit tests in debug mode, generally. Although in this case,
just running in debug mode would be helpful -- you can use gdb, and
exceptions give much more information.
> And, do you know what these
> exceptions mean?
1/2 -- can't open file
2/8 -- raid file system encountered an os error
> Here is my raidfile.conf:
> I know I don't have what could be called "standard setups"...
Firstly... let's try using the standard code but pointing it at
Start again from the distribution archive (without your modifications)
and build a new version.
Use the installation scripts as described in the documentation, but
whereever they say "/etc/box", put "/home/plalonde/etc/box"
Use the bbstored-certs script to generate a certification authority.
Sign the CSR generated with bbstored-config. (Make sure you follow
instructions for both of them).
Edit the bbstored.conf file to remove the "User = plalonde" line, and
change the "PidFile = /var/run/bbstored.pid" to be a file somewhere you
have permission to write. (I suspect this is the problem which is
stopping this working.) "domain.com" needs to be the actual hostname of
the machine, or "localhost" for testing locally.
Start it up with
When you use bbstoredaccounts, do something like
bbstoredaccount -c /home/plalonde/etc/box/bbstored.conf info 1
Both of these variations specify an alternative configuration file -- I
need this facility to be able to run them in the tests.
If this doesn't help, then build and use the debug versions. To build a
debug bbstored, do
(make defaults to debug version in the module directories)
Then use the bbstored exe from debug/bin/bbstored to test things. You
should get more helpful error messages.