thinkgrid
Contributor
Contributor

Failed collections

Hi

I've had the Usage Meter collecting fine for 2 months but something changed and doesn't collect anymore, 443 is open on the vCenter server and Usage Meter can ping it fine

I got the Fail e-mail and this is the error that was attached

"java.lang.RuntimeException: Exception while executing statement : ERROR: duplicate key value violates unique constraint "idx5802080f"

errorCode: 0, sqlState: 23505

insert into "Host" ("id", "licenseId", "uuid", "moref", "dnsName", "vcServerId", "memSize") values (nextval('"s_Host_id"'),?,?,?,?,?,?)

jdbcParams:[1,44454c4c-3300-1036-8039-c4c04f39354a,host-23154,w03esx0004.fl.thinkgrid.net,1,25152264]"

I know that host w03esx0004.fl.thinkgrid.net had the motherboard on it changed about the time the fails starting coming through

Anyone know how to fix please

Regards

Petrit

Labels (1)
0 Kudos
6 Replies
IamTHEvilONE
Immortal
Immortal

thinkgrid,

Can you file a support request and private message me the SR number?

The key constraint is on the attempted insertion into the Usage Meter Database.

I would prefer if we could look at this directly, as it requires DB work to resolve.

Best Regards,

Jon Hemming

0 Kudos
peterdabr
Hot Shot
Hot Shot

Hi Petrit,

I had similar issues on 3 different occassions (UM v2.3) and each time the issue resulted from having esx host non-gracefully disconnected from vCenter and then rejoined to the cluster.

Upon re-'Connect'-ing of failed host to vCenter, the host is often added using different ID (a bug in UM?), but since the same host name already exist in Postgress DB, it errors out as the primary key on the table has a unique constraint and cannot have two hosts with the same name.

The solution to this is to gracefully remove and re-add the host to vCenter. You can also forecefully disconnect host from the cluster (to avoid putting it in maintenance mode and migrating vms off of it), once in 'Disonnected' state 'Remove' it and finally add back to the cluster (this method worked for me each time).

Also, little more info: there were times when the error message only contained the MoRef value for the host but not its name. If that happens to you, the easiest way to find which host is referenced in the error message is by running this from PowerCLI:

get-vmhost | ? {$_.id -ilike "*host-23154"}

Hope above help.

Cheers,

PD

IamTHEvilONE
Immortal
Immortal

You also lose all historical data from that ESX host, and a remove + re-add can adversely affect other products that may interact with the ESX host.

For example, if you don't do it properly, vCloud Director will complain quite a bit about this ... vCenter Operations would complain as well by creating duplicate ESX hosts since there is a new MoRef.

I would prefer seeing the exact scenario go through support to make a full recommendation.

Best Regards,

Jon Hemming

thinkgrid
Contributor
Contributor

Hi

Thanks to those who replied, I did infact open a SR case and they helped be resolved the issue by going into postgress DB and doing some funky stuff. It's working now

The issue is a bug in 2.3 and apparently will be fixed in 2.3.2.

Regards

Petrit

0 Kudos
thinkgrid
Contributor
Contributor

Raised SR and they gave me a workaround

0 Kudos
IamTHEvilONE
Immortal
Immortal

Good to know that it's fixed.

0 Kudos