Search the VMware Knowledge Base (KB)
View by Article ID

"42000:xxxx.x is not a valid value for Int32" error appears under Business Management tab in vRA (2150179)

  • 0 Ratings

Symptoms

  • On the Business Management tab in vRA at the far upper right-hand corner of the UI, click the Status button to display the System Status. On the resulting pop-up window, you see this error in the vRealize Automation data collection section.



  • In the vRealize Business for Cloud log, located at /var/log/vrb/data-collector/itfm-cloud-vra7-dc.log file, you see errors similar to:

    2017-05-02 19:30:09.356 INFO [VraSyncJob (aciprovisioningportal.am.tsacorp.com)] c.v.i.c.d.c.j.SyncJob - *** Job Started ***
    2017-05-02 19:30:09.356 INFO [VraSyncJob (aciprovisioningportal.am.tsacorp.com)] c.v.v.v.s.VraOperations - Querying vRA objects with page size: 300
    2017-05-02 19:30:13.300 INFO [VraSyncJob (aciprovisioningportal.am.tsacorp.com)] c.v.v.v.j.VraSyncJob - Syncing retired blueprint - ID: 'Win_2012_Test', name 'Win_2012_Test'.
    2017-05-02 19:30:13.300 INFO [VraSyncJob (aciprovisioningportal.am.tsacorp.com)] c.v.v.v.j.VraSyncJob - Syncing retired blueprint - ID: 'TESTRHEL_7_x64', name 'RHEL_7_x64-Test'.
    2017-05-02 19:30:13.300 INFO [VraSyncJob (aciprovisioningportal.am.tsacorp.com)] c.v.v.v.j.VraSyncJob - Syncing retired blueprint - ID: 'POST_WIN2012_INTslave', name 'POST_WIN2012_INTslave'.
    2017-05-02 19:30:18.086 ERROR [VraSyncJob (aciprovisioningportal.am.tsacorp.com)] c.v.v.v.j.VraSyncJob - Error occurred while getting info from VRA
    dynamicops.api.client.ApiClientException
    at dynamicops.api.client.ClientResponseHandler.handleResponse(BaseHttpClient.java:306) ~[iaas-api-client-7.1.0.4169181.jar:?]
    at org.apache.http.client.fluent.Response.handleResponse(Response.java:85) ~[fluent-hc-4.2.3.jar:4.2.3]
    at dynamicops.api.client.BaseHttpClient.getWithQuery(BaseHttpClient.java:206) ~[iaas-api-client-7.1.0.4169181.jar:?]
    at dynamicops.api.client.ApiClientQueryable.execute(IODataQueryable.java:127) ~[iaas-api-client-7.1.0.4169181.jar:?]
    at com.vmware.vrb.vradc.service.VraOperations.queryVms(VraOperations.java:296) ~[classes/:?]
    at com.vmware.vrb.vradc.job.VraSyncJob.getVirtualMachines(VraSyncJob.java:310) ~[classes/:?]
    at com.vmware.vrb.vradc.job.VraSyncJob.runInternal(VraSyncJob.java:184) [classes/:?]
    at com.vmware.itfm.cloud.datacollector.commons.job.SyncJob.run(SyncJob.java:74) [itfm-dc-commons-7.0.1.0.jar:?]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.2.1.RELEASE.jar:4.2.1.RELEASE]

  • In the vRA IaaS vSphereAgent logs, you see entries similar to:

    2017-03-27T13:08:22.676Z COV2VRADEM01 vcac: [component="iaas:VRMAgent.exe" priority="Error" thread="2556"] [sub-thread-Id="5" context="ASrEqkwZ" token="V3wUnzp2"] <?xml version="1.0" encoding="utf-16"?>
    <boolean>false</boolean>
    Error processing [DisposeVM], error details:
    System.ApplicationException: Property VirtualMachine.CPU.Count had invalid value '1.0' ---> System.FormatException: Input string was not in a correct format.
    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
    at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt)
    at DynamicOps.Vrm.Agent.MachineFactory`3.GetNumberOfProcessors()
    --- End of inner exception stack trace ---

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.



Purpose

This article provides steps to resolve the 42000:xxxx.x is not a valid value for Int32 error that appears under Business Management tab in vRA . This error prevents vRealize Business for Cloud from a successful vRealize Automation data collection.


Cause

The issue occurs due to the presence of a floating point number (ex. 120.0) in the VirtualMachineProperties table for properties with PropertyName = "VirtualMachine.Disk<x>.Size" (where <x> is some integer 0,1,2,3...) .

Resolution

To resolve the issue:

Note: Ensure to take a backup of the database before proceeding.
 
  1. Verify existence of a floating point number in the PropertyValue field by running the following query against the vRealize Automation IaaS MS SQL Server DB.  

    select vm.VirtualMachineName, vm.VirtualMachineID, vmp.PropertyName, vmp.PropertyValue
    from VirtualMachine vm
    join VirtualMachineProperties vmp
    on vm.VirtualMachineID = vmp.EntityID
    where vmp.PropertyValue like '%.%'
    and ISNUMERIC(vmp.PropertyValue) = 1
    ORDER BY vm.VirtualMachineName, PropertyName;

    You see output similar to:

    VMTEST042 364D96B1-C15C-423D-A77F-FE8AECBEC616 VirtualMachine.CPU.Count 1.0
    VMTEST042 364D96B1-C15C-423D-A77F-FE8AECBEC616 VirtualMachine.Disk1.Size 40.0
    VMTEST042 364D96B1-C15C-423D-A77F-FE8AECBEC616 VirtualMachine.Memory.Size 4096.0
    VMTEST043 4B2FB770-DD7C-4C96-87F8-E2E6D6705283 VirtualMachine.CPU.Count 4.0
    VMTEST043 4B2FB770-DD7C-4C96-87F8-E2E6D6705283 VirtualMachine.Disk1.Size 120.0
    VMTEST043 4B2FB770-DD7C-4C96-87F8-E2E6D6705283 VirtualMachine.Memory.Size 16384.0
    VMTEST044 8CAA71D1-5639-41E0-84BC-F8F4085274B6 VirtualMachine.CPU.Count 2.0
    VMTEST044 8CAA71D1-5639-41E0-84BC-F8F4085274B6 VirtualMachine.Disk1.Size 80.0
    VMTEST044 8CAA71D1-5639-41E0-84BC-F8F4085274B6 VirtualMachine.Memory.Size 8192.0

    In the preceding output, you see the floating point values in the last column. The floating point numbers for VirtualMachine.Disk1.Size and VirtualMachine.CPU.Count cause the errors as shown above in the Symptoms section. The floating point in VirtualMachine.Memory.Size has not been seen to cause issues, but may cause the same type of failure. The script below will fix all three properties if they exist. 

  2. Run the script against the same vRealize Automation IaaS MS SQL Server DB.  Please read and follow the remarks within.

    /*********************************************************************************************************
    ****BEFORE RUNNING****PLEASE TAKE A DB BACKUP****JUST IN CASE****
    ****BEFORE RUNNING****PLEASE TAKE A DB BACKUP****JUST IN CASE****
    This UPDATE query will update any records in the [dbo].[VirtualMachineProperties] table with bad formatted
    disk sizes. Note that the script uses a TRANSACTION and that by default the TRANSACTION is rolled back.
    So by default this script will make no changes when ran. This will allow the customer to see what
    changes will be made when the COMMIT is uncommented. The records affected by the script that will be
    UPDATED are displayed before and after the update, so that the changes can be inspected before they
    are made. Once everything looks good **AND A DB BACKUP HAS BEEN DONE**, then the customer can
    un-comment the "COMMIT TRAN" and comment out the "ROLLBACK" to make the changes permanent.

    ****BEFORE RUNNING****PLEASE TAKE A DB BACKUP****JUST IN CASE****
    ****BEFORE RUNNING****PLEASE TAKE A DB BACKUP****JUST IN CASE****
    **********************************************************************************************************/
    DECLARE @temp TABLE (id int)

    BEGIN TRAN
     --Show the records that are causing the problem
     SELECT *
     FROM [dbo].[VirtualMachineProperties]
     where (PropertyName like 'VirtualMachine.Disk%.Size' or PropertyName = 'VirtualMachine.CPU.Count' or PropertyName = 'VirtualMachine.Memory.Size')
       and PropertyValue like '%.%'
       and ISNUMERIC(PropertyValue) = 1
     order by id

     --Grab the Ids of the records that are causing the problem
     INSERT INTO @temp (id)
     SELECT id
     FROM [dbo].[VirtualMachineProperties]
     where (PropertyName like 'VirtualMachine.Disk%.Size' or PropertyName = 'VirtualMachine.CPU.Count' or PropertyName = 'VirtualMachine.Memory.Size')
       and PropertyValue like '%.%'
       and ISNUMERIC(PropertyValue) = 1

     --Update the records that are causing the problem
     UPDATE [dbo].[VirtualMachineProperties]
     SET PropertyValue = SUBSTRING(PropertyValue,1,CHARINDEX('.',PropertyValue)-1)
     where (PropertyName like 'VirtualMachine.Disk%.Size' or PropertyName = 'VirtualMachine.CPU.Count' or PropertyName = 'VirtualMachine.Memory.Size')
       and PropertyValue like '%.%'
       and ISNUMERIC(PropertyValue) = 1

     --Show the records that were causing the problem, but now have corrected values
     SELECT vmp.*
     FROM [dbo].[VirtualMachineProperties] vmp
     join @temp t
       on t.id = vmp.Id
     order by vmp.id

    /*********************************************************************************
    ****BEFORE UNCOMMENTING THE COMMIT ****PLEASE TAKE A DB BACKUP****JUST IN CASE****
    ****BEFORE UNCOMMENTING THE COMMIT ****PLEASE TAKE A DB BACKUP****JUST IN CASE****
    *********************************************************************************/
    --COMMIT TRAN --PLEASE TAKE A DB BACKUP FIRST, before allowing changes to be committed.
    ROLLBACK TRAN --By Default Rollback the changes.


 

Keywords

42000:xxxx.x is not a valid value for Int32 Check the API Property VirtualMachine.CPU.Count had invalid value

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 0 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 0 Ratings
Actions
KB: