Hi I have a support request open for this issue but I am not getting anywhere quickly so I thought I would ask the question here. I am getting the following error message in the vcloud data collector error log. "Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_CB_VSM_NETWORK_VC_ID". The conflict occurred in database "VCChargebackVCC02", table "dbo.CB_VSM_SERVER", column 'VC_ID'. "
The system is set up as follows
vCenter chargeback 2.0.2
x64 Windows 2003 server R2
SQL 2008 R2
The database was set up from the wizard. I am using SQL authentication and the user is a dbo.
When exactly does this error occur?
It sounds like there are two vShield Managers to a vCenter OR one vShield Manager that is associated to 2 vShield Managers. CB_VSM_SERVER table is just to have an association of which vShield Manager is paired to a vCenter. This should be a 1:1 ratio.
If you have uploaded logs to the support request, private message me the ID number and I'll take a look at it.
Best Regards,
Jon Hemming
I actually have the same problem using Chargeback 2.5 after a clean install with a new DB. Chargeback vCloud-DC_Errors.log file contains several occurances of:
"
2012-09-21T09:28:20.378+0300 ERROR [eventProcessorTimer] [util.JDBCExceptionReporter] 0533: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_CB_VSM_NETWORK_VC_ID". The conflict occurred in database "cbm", table "dbo.CB_VSM_SERVER", column 'VC_ID'.
"
CB status shows all green and data collectors run normally. vCloud is still version 1.5 ja vCenter servers are 5.0 (to be upgraded later on). I tried to upgrade CB from 2.0 to 2.5 but that failed so i created a new VM and a new DB with a new DB user. Organizations show up in the CB hiearchy like they should, the medias and templates are also good as are the vapp:s. What is missing are the virtual machines from each vAPP. The Insert statement mentions VSM Network VC ID, but the networks in the organization shows up and IP's as well, havn't checked if they are all there though.
There are also errors in vCenterDC_Errors.log:
Any thoughts?
Hi all,
We have mainly encountered this issue when VCD installations are more than a year old.
CBM syncs VCD inventory history using VCD events and in VCD, events are retained for a maximum period of 365 days by default.
CBM needs to be installed before one year of VCD (For VCD 1.5.1 or lower) installation for correct functioning, or at least KB http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=200753... needs to be followed, to change the default retention period of events in VCD to 3 years.
Unfortunately, if the issue is already hit with VCD 1.5.1 or lower, not much corrective action can be taken. The best solution is to upgrade VCD to 5.1 and install fresh CBM 2.5, which will sync the current VCD 5.1 inventory from VCD and hence, will not rely on more than 365 days old events. Chargign will be correct from the point of installation of CBM.
Hope that helps.
Thanks,
Piyush
Thank you for the reply, but i'm quite sure this isn't the issume that i'm facing. Checked the vCloud installation and it dates back to november 2011, so less than a year ago. Also checked the vCloud database and the ChargebackEventsKeepDays is 365, which is more than what has passed since the installation. It could well be that the CB 2.5 starts working (or requires another re-install) with vCloud 5.1. But obviously, it would be nice to get this one working as well
Hi,
If your VCD installation is from Nov 2011, then definitely your case is different. Please log a service request for the same and we can follow-up there.
Thanks,
Piyush
This issue got fixed with us when we upgrade our vCloud to 5.1. There seems to be an issue regarding the changes done to the networks in 5.1, atleast thats how it seems when you look at the sql error and what has changed regarding networks and how they are grouped/managed in 5.1. Doesnt looklike 2.5 CB is compatible with vCloud 1.5.