Thursday, March 12, 2015

vCenter Appliance – Call “EventHistoryCollector.SetLatestPageSize” for object “SessionID” on vCenter Server failed.

When using the vSphere Client to connect to the VMware vCenter Server Appliance was appearing every now and again.

Call “EventHistoryCollector.SetLatestPageSize” for object “SessionID” on vCenter Server “ServerName” failed. (unfortunately didnt take a screenshot, so here’s one I found and modified).
2014-10-20_09-18-39

This issue is pretty common, and is to do with the amount of events in the database not being purged, and is covered by VMware in this KB article for windows environments.
However not so commonly covered for the vCenter Appliance which uses a progress database.

After a bit of digging around, I found the following crude solution on the VMware communities board.

So open up a console to your VCSA, login in. Run the following commands
/opt/vmware/vpostgres/1.0/bin/psql -d VCDB vc 
TRUNCATE TABLE vpx_event CASCADE;
then to exit “/q”

Here are the steps:
  1. First of all - stop VPXD
    •  service vmware-vxpd stop
  2. connect to DB:
    /opt/vmware/vpostgres/1.0/bin/psql -d VCDB vc 
     
    You will be prompted for the "vc" password which is not the same as the 
    root password.
     
    Password is in "/etc/vmware-vpx/embedded_db.cfg" file
     
     
  3. issue this commands:
    2014-10-20_08-59-04
    • TRUNCATE TABLE vpx_event CASCADE;
    • TRUNCATE TABLE vpx_event_arg CASCADE;
    • TRUNCATE TABLE vpx_task CASCADE;
  4. quit DB command line
    • issue the command "/q "
  5. start the VPXD
    •  service vmware-vxpd start or restart vCSA appliance
  6. Check the size of VCBD.  Now the size is only 165MB
      • VCDB=> SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database;
      •   datname  |  size
      1. -----------+---------
         template1 | 5289 kB
         template0 | 5281 kB
         postgres  | 5385 kB
         VCDB      | 165 MB
        (4 rows)


         



    References:
    https://communities.vmware.com/thread/80738

    http://www.educationalcentre.co.uk/vmware-5-1-vcenter-appliance-call-eventhistorycollector-setlatestpagesize-for-object-sessionid-on-vcenter-server-failed/#more-418

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2054085

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2056968

    9 comments:

    1. Very nice, thank you. Our DB went from 94% to 5% after running this.

      ReplyDelete
    2. Can anyone confirm if this works with vcenter 5.5?

      ReplyDelete
    3. This comment has been removed by the author.

      ReplyDelete
    4. it should work on 5.5. check out the links in the post where i found the workaround for this issue. but best you test it in your test environment if you can.

      ReplyDelete
    5. When an appliance breaks down, you need it fixed properly and as quickly as possible. Testimonials Appliance Repair

      ReplyDelete
    6. Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks Washer Repairs Los Angeles CA

      ReplyDelete