Karl J South wrote:
On Dec 4, 2007 12:10 AM, Rich Megginson <rmeggins(a)redhat.com>
wrote:
> Karl J South wrote:
>
>> On Dec 3, 2007 4:14 PM, Rich Megginson <rmeggins(a)redhat.com> wrote:
>>
>>
>>> Karl J South wrote:
>>>
>>>
>>>> On Dec 2, 2007 6:03 PM, Rich Megginson <rmeggins(a)redhat.com>
wrote:
>>>>
>>>>
>>>>
>>>>> Karl J South wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm trying to migrate from fc6/fds 1.0.4 to fc8/fds 1.1.0,
the
>>>>>> platform is the same, without any success. I have my old server
nfs
>>>>>> mounted on /opt/fedora-ds and when I run migrate-ds-admin.pl
>>>>>> General.ConfigDirectoryAdminPwd=xxxxx i get the following error:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> Did you shut down your old servers first?
>>>>>
>>>>>
>>>>>
>>>> Yes, the old server is shut down. Besides that the only change on the
>>>> old server is that the ip is changed.
>>>>
>>>>
>>>>
>>> What is the source and destination OS? Version? 32bit or 64bit?
>>>
>>>
>> source server:
>> Linux pink 2.6.22.7-57.fc6 #1 SMP Fri Sep 21 20:23:24 EDT 2007 i686
>> athlon i386 GNU/Linux
>>
>> destination server:
>> Linux pink 2.6.23.1-49.fc8 #1 SMP Thu Nov 8 21:41:26 EST 2007 i686
>> athlon i386 GNU/Linux
>>
>>
> Ah, ok. So f6 uses berkeley db 4.3, and f8 uses 4.6. There appears to
> be some difference in the databases. Someone else on the list had a
> similar problem. Try shutting down your new servers and using the db
> command line utilties. These are in the db4-utils package:
> db_upgrade -
>
http://www.oracle.com/technology/documentation/berkeley-db/db/utility/db_...
> The other tools are listed here -
>
http://www.oracle.com/technology/documentation/berkeley-db/db/utility/ind...
>
> The db home directory will be /var/lib/dirsrv/slapd-yourinstance/db -
> the database filename is
> /var/lib/dirsrv/slapd-yourinstance/db/userRoot/id2entry.db4
>
> You may have to do a db_checkpoint first, then remove any log.* files
> that still exist, then you may be able to start your server, or attempt
> to upgrade again.
>
>
I've gone thru the documentation and especially
http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am/upgr...
and
http://www.oracle.com/technology/documentation/berkeley-db/db/ref/upgrade...
without getting any success.
Since there is a backup process involved I made a tar archive and
transfered the backup to the new server and here are the steps I
take:
[root@pink db]# pwd
/opt/fedora-ds/slapd-ldap/db
[root@pink db]# ls -la
total 21196
drwxr-xr-x 4 fds fds 4096 2007-12-06 13:13 .
drwxr-xr-x 11 fds root 4096 2007-12-06 13:13 ..
-rw------- 1 fds fds 16384 2007-08-26 18:20 __db.001
-rw------- 1 fds fds 10493952 2007-08-26 18:20 __db.002
-rw------- 1 fds fds 1081344 2007-08-26 18:20 __db.003
-rw------- 1 fds fds 4579328 2007-08-26 18:20 __db.004
-rw------- 1 fds fds 49152 2007-08-26 18:20 __db.005
-rw------- 1 fds fds 18 2007-12-01 19:49 DBVERSION
-rw------- 1 fds fds 37 2007-12-06 13:13 guardian
-rw------- 1 fds fds 5363928 2007-12-06 13:13 log.0000000089
drwx------ 2 fds fds 4096 2006-12-04 00:01 NetscapeRoot
drwx------ 2 fds fds 4096 2006-12-04 00:04 userRoot
[root@pink db]# /usr/local/BerkeleyDB.4.6/bin/db_checkpoint -1
[root@pink db]# ls -la
total 21220
drwxr-xr-x 4 fds fds 4096 2007-12-11 23:08 .
drwxr-xr-x 11 fds root 4096 2007-12-06 13:13 ..
-rw------- 1 fds fds 16384 2007-08-26 18:20 __db.001
-rw------- 1 fds fds 10493952 2007-08-26 18:20 __db.002
-rw------- 1 fds fds 1081344 2007-08-26 18:20 __db.003
-rw------- 1 fds fds 4579328 2007-08-26 18:20 __db.004
-rw------- 1 fds fds 49152 2007-08-26 18:20 __db.005
-rw------- 1 fds fds 18 2007-12-01 19:49 DBVERSION
-rw------- 1 fds fds 37 2007-12-06 13:13 guardian
-rw------- 1 fds fds 5363928 2007-12-06 13:13 log.0000000089
-rw-r----- 1 root root 10485760 2007-12-11 23:08 log.0000000090
drwx------ 2 fds fds 4096 2006-12-04 00:01 NetscapeRoot
drwx------ 2 fds fds 4096 2006-12-04 00:04 userRoot
[root@pink db]# /usr/local/BerkeleyDB.4.6/bin/db_upgrade -v */*.db4
db_upgrade: NetscapeRoot/aci.db4 upgraded successfully
db_upgrade: NetscapeRoot/ancestorid.db4 upgraded successfully
db_upgrade: NetscapeRoot/cn.db4 upgraded successfully
db_upgrade: NetscapeRoot/entrydn.db4 upgraded successfully
db_upgrade: NetscapeRoot/givenName.db4 upgraded successfully
db_upgrade: NetscapeRoot/id2entry.db4 upgraded successfully
db_upgrade: NetscapeRoot/nsUniqueId.db4 upgraded successfully
db_upgrade: NetscapeRoot/numsubordinates.db4 upgraded successfully
db_upgrade: NetscapeRoot/objectclass.db4 upgraded successfully
db_upgrade: NetscapeRoot/parentid.db4 upgraded successfully
db_upgrade: NetscapeRoot/sn.db4 upgraded successfully
db_upgrade: NetscapeRoot/uid.db4 upgraded successfully
db_upgrade: NetscapeRoot/uniquemember.db4 upgraded successfully
db_upgrade: userRoot/aci.db4 upgraded successfully
db_upgrade: userRoot/ancestorid.db4 upgraded successfully
db_upgrade: userRoot/cn.db4 upgraded successfully
db_upgrade: userRoot/entrydn.db4 upgraded successfully
db_upgrade: userRoot/givenName.db4 upgraded successfully
db_upgrade: userRoot/id2entry.db4 upgraded successfully
db_upgrade: userRoot/mail.db4 upgraded successfully
db_upgrade: userRoot/nsUniqueId.db4 upgraded successfully
db_upgrade: userRoot/numsubordinates.db4 upgraded successfully
db_upgrade: userRoot/objectclass.db4 upgraded successfully
db_upgrade: userRoot/parentid.db4 upgraded successfully
db_upgrade: userRoot/sn.db4 upgraded successfully
db_upgrade: userRoot/uid.db4 upgraded successfully
[root@pink db]# rm log.00000000*
rm: remove regular file `log.0000000089'? y
rm: remove regular file `log.0000000090'? y
[root@pink db]# migrate-ds-admin.pl General.ConfigDirectoryAdminPwd=xxxxxxxx
Beginning migration of Directory and Administration servers from
/opt/fedora-ds . . .
Beginning migration of directory server instances in /opt/fedora-ds . . .
Your new DS instance 'slapd-ldap' was successfully created.
Server failed to start !!! Please check errors log for problems
Possible timeout starting server: timeout=1197411624 now=1197411625
Could not start the directory server using command
'/usr/lib/dirsrv/slapd-ldap/start-slapd'. The last line from the
error log was '[11/Dec/2007:23:10:27 +0100] - Error: database plugin
ldbm database is not started
'. Error: Unknown error 256
Exiting . . .
Log file is '/tmp/migrateR7s0XP.log'
The error log reveals nothing new...
The db_upgrade program says the databases are upgraded, but when
looking at the time stamps on the dbfiles they seem to be untouched:
[root@pink NetscapeRoot]# ls -la *db4
-rw------- 1 fds fds 16384 2007-12-01 19:50 aci.db4
-rw------- 1 fds fds 16384 2007-12-01 19:50 ancestorid.db4
-rw------- 1 fds fds 49152 2007-02-20 22:32 cn.db4
-rw------- 1 fds fds 32768 2007-12-01 19:50 entrydn.db4
-rw------- 1 fds fds 16384 2006-12-04 00:02 givenName.db4
-rw------- 1 fds fds 122880 2007-12-01 19:50 id2entry.db4
-rw------- 1 fds fds 16384 2007-02-20 22:32 nsUniqueId.db4
-rw------- 1 fds fds 16384 2007-02-20 22:32 numsubordinates.db4
-rw------- 1 fds fds 16384 2007-12-01 19:50 objectclass.db4
-rw------- 1 fds fds 16384 2007-11-24 19:52 parentid.db4
-rw------- 1 fds fds 16384 2006-12-04 00:02 sn.db4
-rw------- 1 fds fds 16384 2007-11-24 19:52 uid.db4
-rw------- 1 fds fds 16384 2006-12-04 00:01 uniquemember.db4
Any ideas what's wrong?
Yes. There is a db_archive step missing. I'm still researching this,
but it looks to be a very involved process . . .
I think at this point you should probably just convert your old
databases to ldif e.g.
cd /opt/fedora-ds/slapd-instance/db
../db2ldif -n userRoot -a userRoot.ldif
../db2ldif -n NetscapeRoot -a NetscapeRoot.ldif
migration will see the database.ldif files and migrate them rather than
attempting to migrate the binary database files.
>>> Have you set any database settings in your source configuration?
>>>
>>>
>> The only nonstandard setting was to enable kerberos support. Can't
>> remember exactly how i did it though...
>>
>>
>>
>>>>>> Beginning migration of Directory and Administration servers from
>>>>>> /opt/fedora-ds . . .
>>>>>> Beginning migration of directory server instances in
/opt/fedora-ds . . .
>>>>>> Your new DS instance 'slapd-ldap' was successfully
created.
>>>>>> Server failed to start !!! Please check errors log for problems
>>>>>> Could not start the directory server using command
>>>>>> '/usr/lib/dirsrv/slapd-ldap/start-slapd'. The last line
from the
>>>>>> error log was '[01/Dec/2007:18:06:24 +0100] - Error: database
plugin
>>>>>> ldbm database is not started
>>>>>> '. Error: Unknown error 256
>>>>>> Exiting . . .
>>>>>> Log file is '/tmp/migrateOs5cM2.log'
>>>>>>
>>>>>> The log file contains:
>>>>>> [07/12/01:18:06:10] - [Migration] Info Beginning migration of
>>>>>> Directory and Administration servers from /opt/fedora-ds . . .
>>>>>> [07/12/01:18:06:10] - [Migration] Info Beginning migration of
>>>>>> directory server instances in /opt/fedora-ds . . .
>>>>>> [07/12/01:18:06:12] - [Migration] Info Your new DS instance
>>>>>> 'slapd-ldap' was successfully created.
>>>>>> [07/12/01:18:06:22] - [Migration] Info Copying
>>>>>> /opt/fedora-ds/alias/slapd-ldap-cert8.db to
>>>>>> /etc/dirsrv/slapd-ldap/cert8.db
>>>>>> [07/12/01:18:06:22] - [Migration] Info Copying
>>>>>> /opt/fedora-ds/alias/slapd-ldap-key3.db to
>>>>>> /etc/dirsrv/slapd-ldap/key3.db
>>>>>> [07/12/01:18:06:22] - [Migration] Info Copying
>>>>>> /opt/fedora-ds/alias/secmod.db to
/etc/dirsrv/slapd-ldap/secmod.db
>>>>>> [07/12/01:18:06:22] - [Migration] Info No
>>>>>> /opt/fedora-ds/alias/slapd-ldap-pin.txt to migrate
>>>>>> [07/12/01:18:06:22] - [Migration] Info Copying
>>>>>> /opt/fedora-ds/shared/config/certmap.conf to
>>>>>> /etc/dirsrv/slapd-ldap/certmap.conf
>>>>>> [07/12/01:18:16:22] - [Migration] Info Could not start the
directory
>>>>>> server using command
'/usr/lib/dirsrv/slapd-ldap/start-slapd'. The
>>>>>> last line from the error log was '[01/Dec/2007:18:06:24
+0100] -
>>>>>> Error: database plugin ldbm database is not started
>>>>>> '. Error: Unknown error 256
>>>>>> [07/12/01:18:16:23] - [Migration] Fatal Exiting . . .
>>>>>> Log file is '/tmp/migrateOs5cM2.log'
>>>>>>
>>>>>> The log file /var/log/dirsrv/slapd-ldap/errors contains the
following:
>>>>>> Fedora-Directory/1.1.0b2 B2007.311.1544
>>>>>> ldap.homenet.js:389 (/etc/dirsrv/slapd-ldap)
>>>>>>
>>>>>> [01/Dec/2007:18:06:11 +0100] - dblayer_instance_start: pagesize:
4096,
>>>>>> pages: 193714, procpages: 7159
>>>>>> [01/Dec/2007:18:06:11 +0100] - cache autosizing: import cache:
204800k
>>>>>> [01/Dec/2007:18:06:11 +0100] - li_import_cache_autosize: 50,
>>>>>> import_pages: 51200, pagesize: 4096
>>>>>> [01/Dec/2007:18:06:11 +0100] - WARNING: Import is running with
>>>>>> nsslapd-db-private-import-mem on; No other process is allowed to
>>>>>> access the database
>>>>>> [01/Dec/2007:18:06:11 +0100] - dblayer_instance_start: pagesize:
4096,
>>>>>> pages: 193714, procpages: 7159
>>>>>> [01/Dec/2007:18:06:11 +0100] - cache autosizing: import cache:
204800k
>>>>>> [01/Dec/2007:18:06:11 +0100] - li_import_cache_autosize: 50,
>>>>>> import_pages: 51200, pagesize: 4096
>>>>>> [01/Dec/2007:18:06:11 +0100] - import userRoot: Beginning import
job...
>>>>>> [01/Dec/2007:18:06:11 +0100] - import userRoot: Index buffering
>>>>>> enabled with bucket size 100
>>>>>> [01/Dec/2007:18:06:11 +0100] - import userRoot: Processing file
>>>>>> "/tmp/ldifni9Q3N.ldif"
>>>>>> [01/Dec/2007:18:06:11 +0100] - import userRoot: Finished scanning
file
>>>>>> "/tmp/ldifni9Q3N.ldif" (1 entries)
>>>>>> [01/Dec/2007:18:06:12 +0100] - import userRoot: Workers finished;
cleaning up...
>>>>>> [01/Dec/2007:18:06:12 +0100] - import userRoot: Workers cleaned
up.
>>>>>> [01/Dec/2007:18:06:12 +0100] - import userRoot: Cleaning up
producer thread...
>>>>>> [01/Dec/2007:18:06:12 +0100] - import userRoot: Indexing
complete.
>>>>>> Post-processing...
>>>>>> [01/Dec/2007:18:06:12 +0100] - Nothing to do to build ancestorid
index
>>>>>> [01/Dec/2007:18:06:12 +0100] - import userRoot: Flushing
caches...
>>>>>> [01/Dec/2007:18:06:12 +0100] - import userRoot: Closing files...
>>>>>> [01/Dec/2007:18:06:12 +0100] - All database threads now stopped
>>>>>> [01/Dec/2007:18:06:12 +0100] - import userRoot: Import complete.
>>>>>> Processed 1 entries in 1 seconds. (1.00 entries/sec)
>>>>>> [01/Dec/2007:18:06:22 +0100] - Fedora-Directory/1.1.0b2
B2007.311.1544
>>>>>> starting up
>>>>>> [01/Dec/2007:18:06:23 +0100] - Clean up db environment and start
from archive.
>>>>>> [01/Dec/2007:18:06:23 +0100] - Deleting log file:
>>>>>> (/var/lib/dirsrv/slapd-ldap/db/log.0000000088)
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb: file userRoot/id2entry.db4
has
>>>>>> LSN 23/8836945, past end of log at 1/84
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb: Commonly caused by moving
a
>>>>>> database from one database environment
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb: to another without clearing
the
>>>>>> database LSNs, or by removing all of
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb: the log files from a
database environment
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb:
>>>>>> /var/lib/dirsrv/slapd-ldap/db/userRoot/id2entry.db4: unexpected
file
>>>>>> type or format
>>>>>> [01/Dec/2007:18:06:24 +0100] -
dbp->open("userRoot/id2entry.db4")
>>>>>> failed: Invalid argument (22)
>>>>>> [01/Dec/2007:18:06:24 +0100] - dblayer_instance_start fail:
Invalid
>>>>>> argument (22)
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb: file
NetscapeRoot/id2entry.db4
>>>>>> has LSN 1/1013697, past end of log at 1/140
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb: Commonly caused by moving
a
>>>>>> database from one database environment
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb: to another without clearing
the
>>>>>> database LSNs, or by removing all of
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb: the log files from a
database environment
>>>>>> [01/Dec/2007:18:06:24 +0100] - libdb:
>>>>>> /var/lib/dirsrv/slapd-ldap/db/NetscapeRoot/id2entry.db4:
unexpected
>>>>>> file type or format
>>>>>> [01/Dec/2007:18:06:24 +0100] -
dbp->open("NetscapeRoot/id2entry.db4")
>>>>>> failed: Invalid argument (22)
>>>>>> [01/Dec/2007:18:06:24 +0100] - dblayer_instance_start fail:
Invalid
>>>>>> argument (22)
>>>>>> [01/Dec/2007:18:06:24 +0100] - start: Failed to start databases,
>>>>>> err=22 Invalid argument
>>>>>> [01/Dec/2007:18:06:24 +0100] - Failed to allocate 10485760 byte
>>>>>> dbcache. Please reduce nsslapd-cache-autosize and Restart the
server.
>>>>>> [01/Dec/2007:18:06:24 +0100] - Failed to start database plugin
ldbm database
>>>>>> [01/Dec/2007:18:06:24 +0100] - WARNING: ldbm instance userRoot
already exists
>>>>>> [01/Dec/2007:18:06:24 +0100] - WARNING: ldbm instance
NetscapeRoot
>>>>>> already exists
>>>>>> [01/Dec/2007:18:06:24 +0100] binder-based resource limits -
>>>>>> nsLookThroughLimit: parameter error (slapi_reslimit_register()
already
>>>>>> registered)
>>>>>> [01/Dec/2007:18:06:24 +0100] - start: Resource limit registration
failed
>>>>>> [01/Dec/2007:18:06:24 +0100] - Failed to start database plugin
ldbm database
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: Failed to resolve plugin
dependencies
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: object plugin Roles Plugin
is not started
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: accesscontrol plugin ACL
Plugin
>>>>>> is not started
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: preoperation plugin ACL
>>>>>> preoperation is not started
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: object plugin Legacy
Replication
>>>>>> Plugin is not started
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: object plugin Multimaster
>>>>>> Replication Plugin is not started
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: object plugin Class of
Service
>>>>>> is not started
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: object plugin Views is not
started
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: preoperation plugin 7-bit
check
>>>>>> is not started
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: preoperation plugin HTTP
Client
>>>>>> is not started
>>>>>> [01/Dec/2007:18:06:24 +0100] - Error: database plugin ldbm
database is
>>>>>> not started
>>>>>>
>>>>>> Anyone knows how to solve this?
>>>>>>
>>>>>> Thanks in advance,
>>>>>>
>>>>>> /KJS
>>>>>>
>>>>>> --
>>>>>>
--
Fedora-directory-users mailing list
Fedora-directory-users(a)redhat.com
https://www.redhat.com/mailman/listinfo/fedora-directory-users