vSphere Replication Appliance won’t reconnect to vCenter

For a multitude of reasons your VR appliance is not connected to vCenter, such as:

  1. You updated the SSL certificate
  2. You disconnected the ESXi host that had the vSphere Replication appliance
  3. You rolled back vCenter from a backup or snapshot

Login to the VMware vSphere Replication appliance.

Identify the password of your keystore. To do this, type this command:

/opt/vmware/hms/bin/hms-configtool -cmd list | grep keystore

Note the keystore password.

Now execute this command:

java -jar va-util.jar -cmd certauth -host vCenter_Server_IP-address -port 80 -user vCenter_Server_USERNAME -pass vCenter_Server_PASSWORD -extkey com.vmware.vcHms -keystore /opt/vmware/hms/security/hms-keystore.jks -keystorealias jetty -keystorepass KEYSTOREPASSWORD

FSCK LVM on CentOS Won’t Boot

Your VM won’t boot. FSCK needed on an LVM. You don’t have root and are screwed.

Boot the rescue disk.

Scan all disks for partiitions: 

Scan all disks for volume groups and build /etc/lvmtab and /etc/lvmtab.d/* which are the database for all other lvm commands:

Change attributes of a logical volume

Scan all disks for logical volumes

Then I was able to run fsck as follows

fsck -f /dev/VolGroup00/LogVol00

zfs: cannot import : I/O error Destroy and re-create the pool from a backup source

Your FreeNAS, or FreeBSD, ZFS zpool lost power and can’t be accessed.

Boot the machine and enter the boot loader menu and set these:

set vfs.zfs.debug=1
set vfs.zfs.recover=1
set debug.bootverbose=1

boot -s <enter> to start the machine in single user mode.

Once booted:

zpool import -fFX -o readonly=on -R /mnt tank (or whatever the name of your zpool is).

This should work in most all cases and allow you to rsync/scp/copy your data off of the zpool.

Don’t deviate from the above. I know you are super smart and believe you don’t need to set the flags, don’t need single user mode, or don’t need to mount in read only. You do. Don’t waste time and risk screwing up the pool permanently.

Update vCenter VAMI 5480 SSL Certificate

Note: The below is for vCenter 6.0. VMware has made it easier in 6.7. You just need to restart VAMI using:

/sbin/service vami-lighttp restart

You have updated the SSL certificate on your Platform Service Controller (PSC) and you probably went through a further nightmare of update the SSL certificates on a bunch of other services.

After all of the above was completed, you realized that none of this tediosity updated the VAMI SSL certificate on port 5480.

Login to the vCenter shell and run this command:

/usr/lib/applmgmt/support/scripts/postinstallscripts/lighttpd-vecs-integration.sh

It will update the SSL certificate used on the VAMI to the SSL certificate used on the PSC, vCenter webclient, etc:

Process Sendmail clientmqueue

You have emails stuck in clientmqueue that are stuck because of a prior sendmail issue.

To process all e-mails in the clientmqueue:

 

sendmail -Ac -q -v

Manually flush clientmqueue:
sendmail -Ac -q -v

vCSA Postgres Database Repair – PANIC: checksum mismatch

You are confronted with various database errors in the /var/log/vmware/vpx/vpxd.log and you also have various errors in /storage/db/vpostgres/pg_log

Similar in theme to:

error ‘Default’ opID=HB-host-8637@82541-3778684f] [VdbStatement] SQLError was thrown: “ODBC error: (00000) – ” is returned when executing SQL statement

error ‘Default’ opID=HB-host-8637@82541-3778684f] An unrecoverable problem has occurred, stopping the VMware VirtualCenter service. Error: Error[VdbODBCError] (-1) “ODBC error: (00000) – ” is returned when executing SQL statement

PANIC: checksum mismatch: disk has 0x4addc132, should be 0x7cb3b932
filename base/16385/24461, BlockNum 37, block specifier 1663/16385/24461/0/37

Cause:

The root cause is you likely lost power, but the larger problem is obviously that the VMware vCSA is built using one of the most un-user friendly databases in this galaxy (Postgres).  With that said, let’s get this hunk of garbage beautiful piece of modern infrastructure management back online.

Solutions:

Repair vPostgres Indexes:

If you have Index errors in the log file (anything mentioning issues with *idx), you will need to regenerate the particular index in the Postgres database.    To accomplish this:

  1. Get your postgres password:  cat /etc/vmware-vpx/embedded_db.cfg | grep PASSWORD
  2. You will need to add a shell to the postgres user:  type:  ‘vipw’, locate the postgres user, change the shell from /bin/false to /bin/bash, save the file (:wq!)       It will look this when you are done:  postgres:x:1000:100::/var/vmware/vpostgres/9.0:/bin/bash
  3. su postgres
  4. /opt/vmware/vpostgres/9.0/bin/psql VCDB
  5. REINDEX DATABASE;
  6. Optional and recommended:  VACUUM FULL; (this will recover disk space and will recreate all of your tables)

Repair vPostgres Data:

If you have errors in your logs that complain about invalid checksums, you will need to force Postgres to fix these.   There is no MySQL type command to automatically repair all databases (glorious!).  You will need repair each issue manually.   There will likely only be one that is preventing vCenter from fully starting.

Your error message will look like this:

PANIC: checksum mismatch: disk has 0x4addc132, should be 0x7cb3b932
filename base/16385/24461, BlockNum 37, block specifier 1663/16385/24461/0/37

filename base/16385/54431780, BlockNum 102, block specifier 1663/16385/54431780/0/102

To fix these errors (there might be more than one):

  1. service vmware-vpxd stop ; service vmware-vpostgres stop
  2. Get your postgres password:  cat /etc/vmware-vpx/embedded_db.cfg | grep PASSWORD
  3. You will need to add a shell to the postgres user:  type:  ‘vipw’, locate the postgres user, change the shell from /bin/false to /bin/bash, save the file (:wq!)
  4. su postgres
  5. /opt/vmware/vpostgres/9.0/bin/postgres -D /storage/db/vpostgres -c fix_block_checksum=”1663/16385/54431780/0/102″   [Note: this last section is just a copy and paste of the “block specifier from the log file”.]

 

FreeBSD – Upgrade Perl Version

To upgrade the version of Perl installed on a FreeBSD server:

vi /etc/make.conf

Add this line (adjust for Perl version):

DEFAULT_VERSIONS+=perl5=5.22

Execute on command line (adjust for Perl version):

pkg set -o lang/perl5.16:lang/perl5.22

Execute on command line (adjust for Perl version):

portupgrade -o lang/perl5.22 -f perl-5.16.\*

Execute on command line:

portupgrade -rf perl*

Interspire Email Marketer Can’t Login

You all of the sudden cannot login to Interspire Email Marketer.

You are entering the correct password and the login screen refreshes when you enter the correct login details but will not allow access to the admin panel.

Your problem is the session cannot be saved.

Check your php.ini file to ensure the location for sessions is writable/exists.

Also check /var/lib/php/sessions (CentOS)

Once your sessions can be written to disk, you will be able to login.

XymonQV – Xymon Android App

Upon purchasing a new phone, I discovered that XymonQV was no longer in the Google Play store and the link on GitHub was 404.

I was able to export the installed app from an old phone.

If you need the XymonQV Android App, you download it here:   XymonQV Android App

This is a copy of the app that was installed from the Google Play store and has not been modified in any way.

 

 

SSHD mm_request_send: write: Broken pipe

You are attempting to login to a Linux machine (probably CentOS) and your SSH sessions are instantly disconnected.

/var/log/secure shows various Signal 15 crashes and this error:

mm_request_send:  write:  Broken pipe

Your box has been hacked.    Format and Reinstall.

Be sure to run “yum update” at frequent intervals to keep your servers/VMs up-to-date!!