maaking

Member
May 28, 2004
15
0
151


i tried switching to Pure-ftpd. from: Service Configuration >FTP Configuration> (switch to Pure-ftpd)

but it didn't, i think there is an error (error: cannot open Packages database )in /var/lib/rpm

any suggestions?



===Here is the Dump===========================================


Ftp Setup Script Version 6.0
Fetching version information from http://updates.cpanel.net/ftpinstall/version (STABLE)....Done
This is the pure-ftpd 1.0.20 installer release number 10.tls for platform redhat 9
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
Using RPM Backend: RPM version 4.2
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
db4-devel: installed version 4.0.14-20 is up to date, no action needed.
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
pam-devel: installed version 0.75-62.10.legacy is up to date, no action needed.
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
openssl096: installed version 0.9.6-25.9 is up to date, no action needed.
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
openssl096b: installed version 0.9.6b-15 is up to date, no action needed.
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
openssl: installed version 0.9.7a-20.4.legacy is up to date, no action needed.
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
openssl-devel: installed version 0.9.7a-20.4.legacy is up to date, no action needed.
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
gcc: installed version 3.2.2-5 is up to date, no action needed.
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
glibc-devel: installed version 2.3.2-27.9.7 is up to date, no action needed.
rpmdb: unable to join the environment

error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
zlib-devel: installed version 1.1.4-8 is up to date, no action needed.
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
rpm-build: installed version 4.2-0.69 is up to date, no action needed.
Resetting pure-ftpd to cPanel Defaults and Installing the Latest Version
--10:07:28-- http://diff.cpanel.net/ftpinstall/pure-ftpd/redhat/9/pure-ftpd-1.0.20-10.tls.i386.rpm
=> `pure-ftpd-1.0.20-10.tls.i386.rpm'
Resolving diff.cpanel.net... done.
Connecting to diff.cpanel.net[198.66.78.11]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 208,882 [application/x-rpm]

0K .......... .......... .......... .......... .......... 24% 1.28 MB/s
50K .......... .......... .......... .......... .......... 49% 3.76 MB/s
100K .......... .......... .......... .......... .......... 73% 2.03 MB/s
150K .......... .......... .......... .......... .......... 98% 2.71 MB/s
200K ... 100% 3.89 MB/s

10:07:28 (2.12 MB/s) - `pure-ftpd-1.0.20-10.tls.i386.rpm' saved [208882/208882]

rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages database in /var/lib/rpm
Attempting to restart ftpserver
Waiting for ftpserver to restart....
.
.
.
.
.
.
.
.
.
.
finished.


ftpserver status nobody 18323 0.0 0.4 4352 2168 ? S 10:08 0:00 proftpd: (accepting connections)



ftpserver started ok
Install Complete


Ftp Server Install Complete
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Looks like you have a corrupt rpm database. You could try:

rm -fv /var/lib/rpm/__db*
rpm --rebuilddb -v -v


That last command may take some time to run through. when it is finished, give the pure-ftpd installation another go:

/scripts/ftpup --force
 

maaking

Member
May 28, 2004
15
0
151
thank you chirby,

i did it but i think there is an error also:

here is the ssh screen:

1-
[email protected] [~]# rm -fv /var/lib/rpm/__db*

removed `/var/lib/rpm/__db.001'

2-
[email protected][~]# rpm --rebuilddb -v -v

D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.27201
D: creating directory /var/lib/rpmrebuilddb.27201
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages create:cdb:mpool
rpmdb: write: 0xbfffd4c0, 8192: Invalid argument
error: db4 error(22) from dbenv->open: Invalid argument
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
error: cannot open Packages index
D: removing directory /var/lib/rpmrebuilddb.27201
 

nickb

Well-Known Member
Feb 25, 2005
346
0
166
India
Do you have LES installed if yes then ...

Code:
cd /var/lib/rpm/
chattr -i *
rebuild the rpm database and then try to switch ftp.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
You may also have other processes locking the database. To check you should run:

lsof | grep /var/lib/rpm

And kill off any processes that have a lock and then redo the rebuild. You could, of course, have a completely corrupt rpm database and then things get very difficult indeed.
 

Alexandre

Member
PartnerNOC
Jan 21, 2004
19
0
151
U.S.A.
I think I can help you:)

You can fix the problem in this way

export LD_ASSUME_KERNEL=2.2.5
rpm --rebuilddb
rpm --initdb
/scripts/ftpup pure-ftpd --force
:) :) :) :) :)
 

maaking

Member
May 28, 2004
15
0
151
thank you guys for help.

here again what i've done in the ssh:

suggested by: Alexandre
1-
[email protected] [/]# rpm --rebuilddb
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index

2-
[email protected] [/]# rpm --initdb
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
-------------------------------------------------
suggested by: nickb
[email protected] [/var/lib/rpm]# chattr -i *

result nothing.

-------------------------------------------------------
suggested by: chirpy

when i run this, nothing appears.
1-
[email protected] [/]# lsof | grep /var/lib/rpm

2-
[email protected] [/]# cd /var/lib/rpm/
[email protected] [/var/lib/rpm]# ls
./ Basenames __db.001 Filemd5s Installtid Name Providename Pubkeys Requireversion Sigmd5
../ Conflictname Dirnames Group mail/ Packages Provideversion Requirename Sha1header Triggername

[email protected] [/var/lib/rpm]# rm -fv /var/lib/rpm/__db*
removed `/var/lib/rpm/__db.001'
[email protected] [/var/lib/rpm]# rpm --rebuilddb -v -v
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.23885
D: creating directory /var/lib/rpmrebuilddb.23885
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages create:cdb:mpool
rpmdb: write: 0xbfffd4b0, 8192: Invalid argument
error: db4 error(22) from dbenv->open: Invalid argument
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
error: cannot open Packages index
D: removing directory /var/lib/rpmrebuilddb.23885
[email protected] [/var/lib/rpm]#


for somehow i cannot update appache to install GD and PHPsuEXEC or switching to Pure-ftpd.

:confused: :confused: :confused:

here is what i have in the rpm dir.
[email protected] [/var/lib/rpm]# ls
./ Basenames __db.001 Filemd5s Installtid Name Providename Pubkeys Requireversion Sigmd5
../ Conflictname Dirnames Group mail/ Packages Provideversion Requirename Sha1header Triggername
[email protected] [/var/lib/rpm]#


thank you
 
Last edited:

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Are you using a custom kernel rather than the OS supplied one?

I would suggest rerunning this from Alexandre's last post now that the database is no longer locked (which is why it failed initially):

export LD_ASSUME_KERNEL=2.2.5
rpm --rebuilddb -v -v


If it still fails with the same error then it appears to be a corrupt rpm database. Unless you have an identical server where you could take a copy of the rpm database to use (though not a great idea) you may well be looking at an OS restore.
 

maaking

Member
May 28, 2004
15
0
151
i upgraded the kernel to 2.6.11.

so, i should do this:
export LD_ASSUME_KERNEL=2.6.11
rpm --rebuilddb -v -v



thanks again.
 

maaking

Member
May 28, 2004
15
0
151
this is the reult of the command given by Alexandre.

[email protected][/var/lib/rpm]# export LD_ASSUME_KERNEL=2.6.11
[email protected][/var/lib/rpm]# rpm --rebuilddb -v -v
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.17583
D: creating directory /var/lib/rpmrebuilddb.17583
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages joinenv
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
error: cannot open Packages index
D: removing directory /var/lib/rpmrebuilddb.17583
[email protected][/var/lib/rpm]#
 

webz05

Member
Sep 16, 2005
7
0
151
i was having the same issue, now when i do the ftp install it keeps installing pro-ftpd witch i dont want to use
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Check in WHM > FTP Configuration > if it's set to pure-ftpd, set it to proftpd and save it, then try switchng it back over to pure-ftpd. If it's still set to proftpd there, just change it to pure-ftpd again. If it still fails to switch to pure-ftpd log a ticket with your cpanel license provider to get it sorted out.