Fatal error: exception Bdb.DBError

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fatal error: exception Bdb.DBError

gabrix-4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

That's the way i launch sksd with /var/lib/sks owned by debian-sks
same for /var/run/sks . /var/log/sks is owned by debian-sks.adm

> root@www:~# sudo -u debian-sks sks db&
> [1] 28300
> root@www:~# sudo -u debian-sks sks recon&
> [2] 28301
> root@www:~# Fatal error: exception Bdb.DBError("unable to join the
> environment")

Gab

- --
sec   1024D/BC4F9423 2008-12-05
      Key fingerprint = 36C6 E257 2801 46E7 69A7  8721 F502 1342 BC4F 9423
uid                  Gabriele XXX (Mail Account Autistici)
<[hidden email]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkm8Wv0ACgkQ9QITQrxPlCNeMACeNdc33SV4uKL5Ynelk3YJLaFT
elQAoLkWxdR4fx/Jm+M5e9063sQ1RZKX
=NHdS
-----END PGP SIGNATURE-----



_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel
Reply | Threaded
Open this post in threaded view
|

Re: Fatal error: exception Bdb.DBError

Phil Pennock-17
On 2009-03-15 at 02:33 +0100, Gab wrote:
> That's the way i launch sksd with /var/lib/sks owned by debian-sks
> same for /var/run/sks . /var/log/sks is owned by debian-sks.adm
>
> > root@www:~# sudo -u debian-sks sks db&
> > [1] 28300
> > root@www:~# sudo -u debian-sks sks recon&
> > [2] 28301
> > root@www:~# Fatal error: exception Bdb.DBError("unable to join the
> > environment")

Right, but before you said:
> If i launch sksdb& abd sksrecon& singulary all goes well:

So, the problem is the owner of the files.  You haven't shown a listing
of the DB dir.  Somewhere, there will be files still owned by root, from
when you ran it directly.

There should be two directories, "KDB" and "PTree" -- I don't know where
Debian puts them.  The contents of those directories are the BDB files;
eg, on my machine:
# l -l KDB
total 1433456
-rw-------  1 sks  sks      24576 Mar  5 07:07 __db.001
-rw-------  1 sks  sks    5611520 Mar 14 01:48 __db.002
-rw-------  1 sks  sks   26222592 Mar  7 11:53 __db.003
-rw-------  1 sks  sks      98304 Mar 14 01:48 __db.004
-rw-------  1 sks  sks      16384 Mar  5 07:07 __db.005
-rw-------  1 sks  sks  411537408 Mar 15 06:18 key
-rw-------  1 sks  sks  130686976 Mar 15 07:21 keyid
-rw-------  1 sks  sks   10485760 Mar 15 07:21 log.0000000165
-rw-------  1 sks  sks       8192 Oct 26 04:18 meta
-rw-------  1 sks  sks  122413056 Mar 15 03:00 subkeyid
-rw-------  1 sks  sks  101511168 Mar 15 03:00 time
-rw-------  1 sks  sks     282624 Mar 12 03:00 tqueue
-rw-------  1 sks  sks  668536832 Mar 15 07:21 word
# l -l PTree
total 98504
-rw-------  1 sks  sks     24576 Mar  5 07:07 __db.001
-rw-------  1 sks  sks   1490944 Mar 14 01:48 __db.002
-rw-------  1 sks  sks   6561792 Mar  7 11:53 __db.003
-rw-------  1 sks  sks     98304 Mar 14 01:48 __db.004
-rw-------  1 sks  sks     16384 Mar  5 07:07 __db.005
-rw-------  1 sks  sks  10485760 Mar 15 07:21 log.0000000089
-rw-------  1 sks  sks  91032576 Mar 15 07:20 ptree

*Those* are the files which matter.

If you stop SKS, run db_recover in each of those directories, chown them
(-R recursively) to Debian-sks and start sks, it should work.  If you
need help, "locate db_recover.html" (and if it's not installed, find the
relevant docs package or just hope that the current docs aren't too
different from whatever was installed:
  <URL:http://www.oracle.com/technology/documentation/berkeley-db/db/utility/db_recover.html>
).

I'm assuming that you don't have anything *really* odd set in your
environment; if $DB_HOME is being set then that would explain it.  If
this is the case, pretty much any BDB application you run will be
breaking (and the fix is "don't do that").

-Phil

_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel

attachment0 (169 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fatal error: exception Bdb.DBError

gabrix-4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Phil Pennock wrote:

> On 2009-03-15 at 02:33 +0100, Gab wrote:
>> That's the way i launch sksd with /var/lib/sks owned by debian-sks
>> same for /var/run/sks . /var/log/sks is owned by debian-sks.adm
>>
>>> root@www:~# sudo -u debian-sks sks db&
>>> [1] 28300
>>> root@www:~# sudo -u debian-sks sks recon&
>>> [2] 28301
>>> root@www:~# Fatal error: exception Bdb.DBError("unable to join the
>>> environment")
>
> Right, but before you said:
>> If i launch sksdb& abd sksrecon& singulary all goes well:
>
> So, the problem is the owner of the files.  You haven't shown a listing
> of the DB dir.  Somewhere, there will be files still owned by root, from
> when you ran it directly.
>
> There should be two directories, "KDB" and "PTree" -- I don't know where
> Debian puts them.  The contents of those directories are the BDB files;
> eg, on my machine:
> # l -l KDB
> total 1433456
> -rw-------  1 sks  sks      24576 Mar  5 07:07 __db.001
> -rw-------  1 sks  sks    5611520 Mar 14 01:48 __db.002
> -rw-------  1 sks  sks   26222592 Mar  7 11:53 __db.003
> -rw-------  1 sks  sks      98304 Mar 14 01:48 __db.004
> -rw-------  1 sks  sks      16384 Mar  5 07:07 __db.005
> -rw-------  1 sks  sks  411537408 Mar 15 06:18 key
> -rw-------  1 sks  sks  130686976 Mar 15 07:21 keyid
> -rw-------  1 sks  sks   10485760 Mar 15 07:21 log.0000000165
> -rw-------  1 sks  sks       8192 Oct 26 04:18 meta
> -rw-------  1 sks  sks  122413056 Mar 15 03:00 subkeyid
> -rw-------  1 sks  sks  101511168 Mar 15 03:00 time
> -rw-------  1 sks  sks     282624 Mar 12 03:00 tqueue
> -rw-------  1 sks  sks  668536832 Mar 15 07:21 word
> # l -l PTree
> total 98504
> -rw-------  1 sks  sks     24576 Mar  5 07:07 __db.001
> -rw-------  1 sks  sks   1490944 Mar 14 01:48 __db.002
> -rw-------  1 sks  sks   6561792 Mar  7 11:53 __db.003
> -rw-------  1 sks  sks     98304 Mar 14 01:48 __db.004
> -rw-------  1 sks  sks     16384 Mar  5 07:07 __db.005
> -rw-------  1 sks  sks  10485760 Mar 15 07:21 log.0000000089
> -rw-------  1 sks  sks  91032576 Mar 15 07:20 ptree
>
> *Those* are the files which matter.
>
> If you stop SKS, run db_recover in each of those directories, chown them
> (-R recursively) to Debian-sks and start sks, it should work.  If you
> need help, "locate db_recover.html" (and if it's not installed, find the
> relevant docs package or just hope that the current docs aren't too
> different from whatever was installed:
>   <URL:http://www.oracle.com/technology/documentation/berkeley-db/db/utility/db_recover.html>
> ).
>
> I'm assuming that you don't have anything *really* odd set in your
> environment; if $DB_HOME is being set then that would explain it.  If
> this is the case, pretty much any BDB application you run will be
> breaking (and the fix is "don't do that").
>
> -Phil
>
Great help even if db_recover in debian lenny is db4.6_recover .
I show you in detail:

> root@www:/var/lib# ls -ld sks/
> drwx------ 6 debian-sks debian-sks 4096 2009-03-15 12:20 sks/
> root@www:/var/lib# ls -la sks/
> total 28
> drwx------  6 debian-sks debian-sks 4096 2009-03-15 12:20 .
> drwxr-xr-x 58 root       root       4096 2009-03-11 23:13 ..
> -rw-------  1 debian-sks debian-sks   48 2009-03-15 12:20 .bash_history
> drwx------  2 debian-sks debian-sks 4096 2009-03-15 14:42 DB
> drwxr-xr-x  2 debian-sks debian-sks 4096 2009-03-12 05:27 dump
> drwx------  2 debian-sks debian-sks 4096 2009-03-15 14:42 PTree
> drwxr-xr-x  2 debian-sks debian-sks 4096 2009-03-09 02:21 www
> root@www:/var/lib# ls -la sks/DB/
> total 1005756
> drwx------ 2 debian-sks debian-sks      4096 2009-03-15 14:42 .
> drwx------ 6 debian-sks debian-sks      4096 2009-03-15 12:20 ..
> -rw------- 1 debian-sks debian-sks 120715264 2009-03-13 13:44 key
> -rw------- 1 debian-sks debian-sks 130490368 2009-03-13 13:44 keyid
> -rw------- 1 debian-sks debian-sks  10485760 2009-03-12 19:34 log.0000000001
> -rw------- 1 debian-sks debian-sks  10485760 2009-03-12 19:38 log.0000000002
> -rw------- 1 debian-sks debian-sks  10485760 2009-03-12 21:35 log.0000000003
> -rw------- 1 debian-sks debian-sks  10485760 2009-03-15 14:42 log.0000000004
> -rw------- 1 debian-sks debian-sks      8192 2009-03-12 07:16 meta
> -rw------- 1 debian-sks debian-sks 121769984 2009-03-13 13:44 subkeyid
> -rw------- 1 debian-sks debian-sks  98598912 2009-03-13 13:44 time
> -rw------- 1 debian-sks debian-sks      8192 2009-03-12 05:39 tqueue
> -rw------- 1 debian-sks debian-sks 515289088 2009-03-13 13:44 word
> root@www:/var/lib# ls -la sks/PTree/
> total 108820
> drwx------ 2 debian-sks debian-sks     4096 2009-03-15 14:42 .
> drwx------ 6 debian-sks debian-sks     4096 2009-03-15 12:20 ..
> -rw------- 1 debian-sks debian-sks 10485760 2009-03-12 19:39 log.0000000001
> -rw------- 1 debian-sks debian-sks 10485760 2009-03-15 14:42 log.0000000002
> -rw------- 1 debian-sks debian-sks 90322944 2009-03-15 14:42 ptree
> root@www:/var/lib# cd sks/DB/
> root@www:/var/lib/sks/DB# db4.6_recover
> root@www:/var/lib/sks/DB# cd /var/lib/sks/PTree/
> root@www:/var/lib/sks/PTree# db4.6_recover
> root@www:/var/lib/sks/PTree# ls -la
> total 108820
> drwx------ 2 debian-sks debian-sks     4096 2009-03-15 14:42 .
> drwx------ 6 debian-sks debian-sks     4096 2009-03-15 12:20 ..
> -rw------- 1 debian-sks debian-sks 10485760 2009-03-12 19:39 log.0000000001
> -rw------- 1 debian-sks debian-sks 10485760 2009-03-15 14:45 log.0000000002
> -rw------- 1 debian-sks debian-sks 90322944 2009-03-15 14:42 ptree
> root@www:/var/lib/sks/PTree# /etc/init.d/sks start
> Starting sks daemons: sksdb.. sksrecon.. done.
> root@www:/var/lib/sks/PTree# netstat -nplt | grep sks
> tcp        0      0 0.0.0.0:11370           0.0.0.0:*               LISTEN      6320/sks        
> tcp        0      0 0.0.0.0:11371           0.0.0.0:*               LISTEN      6317/sks        
> root@www:/var/lib/sks/PTree# /etc/init.d/sks restart
> Stopping sks daemons: sksrecon.. sksdb.. done.
> Starting sks daemons: sksdb.. sksrecon.. done.
> root@www:/var/lib/sks/PTree# netstat -nplt | grep sks
> tcp        0      0 0.0.0.0:11370           0.0.0.0:*               LISTEN      6342/sks        
> tcp        0      0 0.0.0.0:11371           0.0.0.0:*               LISTEN      6339/sks

Thanks , great help !

Gab



- --
sec   1024D/BC4F9423 2008-12-05
      Key fingerprint = 36C6 E257 2801 46E7 69A7  8721 F502 1342 BC4F 9423
uid                  Gabriele XXX (Mail Account Autistici)
<[hidden email]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkm9Dw8ACgkQ9QITQrxPlCPO+gCfSr5GJC+atKeYePUVCIT3xZgS
Ew8AnjyM78ZDBoH5KsuHKlCYDHGJokQu
=cMtR
-----END PGP SIGNATURE-----



_______________________________________________
Sks-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/sks-devel