XAPI Service unable to start , error : xapi dies but pid file exists.
book
Article ID: CTX214523
calendar_today
Updated On:
Description
XAPI Service unable to start. It shows that the it already has a pid and is dead.
Looking at the logs xensource.log, you will find INTERNAL_ERROR as below:
- xapi top-level caught exception: INTERNAL_ERROR: [ Xmlm.Make(String)(Buffer).Error(_, -372779099) ]
Caught exception at toplevel: 'Xmlm.Make(String)(Buffer).Error(_, -372779099)' - This gives us an indication that XAPI is failing to start because it is unable to read the state.db correctly.
- Checking the integrity of the DB with “xmllint --format /var/xapi/state.db” returns,
xmllint --format /var/xapi/state.db
/var/xapi/state.db:1: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0x94 0x94 0x22 0x20 9537" __mtime="513860953" HVM__boot_params="(('order' 'dc'))" HVM__boot_policy= - We can now tell that the DB has incorrect formatting or illegal characters.
Resolution
- Take a backup of the state.db under /var/xapi/ and remove the current state.db file as below:
cp /var/xapi/state.db /var/xapi/state.db-old
rm /var/xapi/state.db
- Then do a XAPI toolstack restart as below:
#xe-toolstack-restart
- This should bring the state.db file back in /var/xapi. If not then the XAPI DB is corrupted, find what happened to the XAPI database.
- After adding the XenServer to the XenCenter, introduce the local storage :
# pvscan : Copy the UUID
# xe sr-introduce uuid=<UUID> type=lvm name-label=”Local storage” content-type=user
# ls -l /dev/disk/by-id/
# xe pbd-create sr-uuid=<UUID of the storage>
device-config:device=/dev/disk/by-id/scsi-<SCSI ID> host-uuid=<UUID OF THE HOST>
# xe pbd-plug uuid=<UUID obtained from above step>
- Create DVD drive and Removable storage as well.
- Create default templates : /opt/xensource/libexec/create_templates.
Issue/Introduction
XAPI Service unable to start. It shows that the it already has a pid and is dead.
Was this article helpful?
thumb_up
Yes
thumb_down
No