mickers Absent Member.
Absent Member.
3371 views

ZCM SQl errors in message-loader.log?

Hi all,
I'm running ZCM 11.2.2(MU1 now) on Win2008R2/MSQL2008R2, and I'm seeing the following errors in my loader-messages.log on one of my servers. The line that looks important is:
The INSERT statement conflicted with the FOREIGN KEY constraint "fk_zMessage_relatedUID". The conflict occurred in database "zenworks_MBC_ZONE", table "dbo.zZENObject", column 'ZUID'.

Does this mean anything to anyone? I've run the ZDC against my system and there were no errors that popped.


[DEBUG] [7/12/12 11:28:59 AM] [] [Loader.MessageProcessorModule] [108] [] [Logger is not able to log the message:
<Message><MessageId>AddContentHandler.MSG_ADD_CONTENT_FAILURE</MessageId><Severity>8</Severity><Time>1354843734585</Time><Source>df0f7dfd8dba37ae4de6903f52ddb047</Source><ComponentName>ImportContent</ComponentName><MessageType>0</MessageType><ProbableCauseId>AddContentHandler.CAUSE_CONTENT_OBJECT_NOT_FOUND</ProbableCauseId><AdditionalInfo>ff793ca5194a4142a62ea33c8db7bb79</AdditionalInfo><MessageParams><Params>Adobe CS5 WebPremium.aamee</Params></MessageParams><RelatedGuids><Guid>51aa6127353f9f955d2aa824ffb0621f</Guid></RelatedGuids></Message>
because of InternalDatamodel Exception. Exception: com.novell.zenworks.datamodel.exceptions.InternalDataModelException: org.hibernate.exception.ConstraintViolationException: could not insert: [[com.novell.zenworks.datamodel.objects.messaging.Message]]] [] []
[DEBUG] [7/12/12 11:28:59 AM] [] [Loader.MessageProcessorModule] [108] [] [com.novell.zenworks.datamodel.exceptions.InternalDataModelException: org.hibernate.exception.ConstraintViolationException: could not insert: [[com.novell.zenworks.datamodel.objects.messaging.Message]]
at com.novell.zenworks.datamodel.database.AbstractDatabaseTypeHelper.newStandardDataModelException(AbstractDatabaseTypeHelper.java:456)
at com.novell.zenworks.datamodel.database.AbstractDatabaseTypeHelper.throwStandardDataModelException(AbstractDatabaseTypeHelper.java:441)
at com.novell.zenworks.datamodel.session.hibernate.AbstractHibernateSessionImpl.handleException(AbstractHibernateSessionImpl.java:177)
at com.novell.zenworks.datamodel.services.messaging.MessagingImpl.logMessages(MessagingImpl.java:154)
at com.novell.zenworks.datamodel.services.messaging.MessagingImpl.logMessage(MessagingImpl.java:82)
at com.novell.zenworks.loader.modules.messageprocessor.DBOperations.saveMessage(DBOperations.java:68)
at com.novell.zenworks.loader.modules.messageprocessor.MessageFilterProcessor.saveMessages(MessageFilterProcessor.java:443)
at com.novell.zenworks.loader.modules.messageprocessor.MessageFilterProcessor.saveMessages(MessageFilterProcessor.java:426)
at com.novell.zenworks.loader.modules.messageprocessor.MessageFilterProcessor.run(MessageFilterProcessor.java:168)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.hibernate.exception.ConstraintViolationException: could not insert: [[com.novell.zenworks.datamodel.objects.messaging.Message]]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2140)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2503)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:51)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeInserts(ActionQueue.java:130)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:241)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:180)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:98)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:506)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:498)
at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:134)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:213)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:157)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:290)
at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:185)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:160)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:437)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:326)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:180)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:534)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:522)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:518)
at com.novell.zenworks.datamodel.services.messaging.MessagingImpl.logMessages(MessagingImpl.java:138)
... 6 more
Caused by: java.sql.SQLException: The INSERT statement conflicted with the FOREIGN KEY constraint "fk_zMessage_relatedUID". The conflict occurred in database "zenworks_MBC_ZONE", table "dbo.zZENObject", column 'ZUID'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:504)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2120)
... 42 more
] [] []

Thanks.
Labels (2)
0 Likes
18 Replies
Anonymous_User Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

mickers,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

Has your problem been resolved? If not, you might try one of the following options:

- Visit http://support.novell.com and search the knowledgebase and/or check all
the other self support options and support programs available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.novell.com)

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.novell.com/faq.php

If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.

Good luck!

Your Novell Product Support Forums Team
http://forums.novell.com/

0 Likes
mcmatt78 Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

I'm in the same boat with you. Did you ever figure out what the problem was?

Thanks
0 Likes
mickers Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

Sadly, no, I never solved it.
0 Likes
beaujona Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

Anyone figure this out?

I'm trying to re-open a ticket with Novell and I'll try and remember to post the results. I'll reference this thread as well. Do you have any mentions of failed or attempted uploads?

When you create bundles, with uploaded files..do you see the calculated size of the bundle at the correct size, or 0 bytes? When I have this issue, I have to novell-zenworks-configure -x Start and restart the services.

Our second primary server has none of these issues/messages.

Later

mickers;2261177 wrote:
Sadly, no, I never solved it.
0 Likes
mickers Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

Here's something about the bundle I'm trying, not sure if it's related.
I'm trying to deploy Java7-21 to Win7_SP1_x64. Since I need to deploy both 32 and 64 bit versions, I've built a bundle that has the following files installed, which get copied to local drive for installation.

${WINDIR}\temp\Java7\32\
Data1.cab
jre1.7.0_21.msi

${WINDIR}\temp\Java7\64\
Data1.cab
jre1.7.0_21.msi

Note the identically named files, although one is 32 bit, one is 64 bits.

I see one Primary server is 'packaging' (stuck for days), other Primary server is 'Unavailable'. I've restarted services a few times.
0 Likes
beaujona Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

Very similar to the issue I am having.

If I recall, you can't have two files with the same name as the .XML file will reference one location...but I can't confirm this. If I understood the consultant I worked with, he stated that when you 'copy' a bundle into another one, it doesn't actually create a new set of files, it uses the same ones. This might relate to the fact that you may only have one .MSI that the XML file is referencing, but I'm no ZCM expert.

On a side-note, your java install, is it a custom installer without the stupid opt-out ask.com toolbar installation?

We will probably be moving to ZPM for all our software patching once I can get these errors removed from my log files, and once the primary server is working 100%.

Do you have two primary servers? If so, as a last recourse, which is what I may end up doing, is rebuild the problematic server, set the second primary to take the full load temporarily, and once everything is in sync, reconfigure the locations to have the proper primary associations.



mickers;2261427 wrote:
Here's something about the bundle I'm trying, not sure if it's related.
I'm trying to deploy Java7-21 to Win7_SP1_x64. Since I need to deploy both 32 and 64 bit versions, I've built a bundle that has the following files installed, which get copied to local drive for installation.

${WINDIR}\temp\Java7\32\
Data1.cab
jre1.7.0_21.msi

${WINDIR}\temp\Java7\64\
Data1.cab
jre1.7.0_21.msi

Note the identically named files, although one is 32 bit, one is 64 bits.

I see one Primary server is 'packaging' (stuck for days), other Primary server is 'Unavailable'. I've restarted services a few times.
0 Likes
mickers Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

If that's the case, I'll try doing separate bundles (32 and 64 bit) Java installs. The offending server is our main grunt box, no rebuild happenning any time soon. I am hoping to run up a SLES ZCM11 primary though, to compare speed. Our DB is MSQL runngin on a separate physical server, so we have some flexibility there. 2 Pri are W2008R2.
Will see how I go.

I haven't deployed ZCM Patch stuff yet, just aren't confident enough yet. need to do some more learnin' first.
0 Likes
beaujona Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

I recommend SLES over win2k8 anytime, but that's only because I can run a nice stable system, without the need to constantly reboot

Our SQL db is on win2k8, however

Also, if you have ever had a miscommunication between your primary(ies) and the db, I find that the system keeps working, some things are still allowed, but it doesn't like it and down the road, it seems to break things. Very susceptible, but at times it's almost impossible to notice it has been disconnected, until you start getting weird issues with assignment details, bundle deployments, etc



mickers;2261680 wrote:
If that's the case, I'll try doing separate bundles (32 and 64 bit) Java installs. The offending server is our main grunt box, no rebuild happenning any time soon. I am hoping to run up a SLES ZCM11 primary though, to compare speed. Our DB is MSQL runngin on a separate physical server, so we have some flexibility there. 2 Pri are W2008R2.
Will see how I go.

I haven't deployed ZCM Patch stuff yet, just aren't confident enough yet. need to do some more learnin' first.
0 Likes
beaujona Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

Hey mickers,

Did you end up retrying? Did you have any success?

On my end, I'm waiting on Novell to get back to me for an answer with the key constraint error in SQL...I'll post what I find once I have it resolved, but it might be caused by a bundle that the system believes still exists but does not exist in the system anymore.

Please stand by...
0 Likes
mickers Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

Haven't been at work, been to an ATT event, and having a week off.
Might have a chance to follow up when I get back and the dust settles.
0 Likes
mickers Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

Any further replies back from Novell on the error message
(FOREIGN KEY constraint "fk_zMessage_relatedUID")?
0 Likes
beaujona Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

mickers;2268507 wrote:
Any further replies back from Novell on the error message
(FOREIGN KEY constraint "fk_zMessage_relatedUID")?


Hey guys,

I actually opened an SR on Friday and had it resolved within hours; it's actually quite simple of a solution if it's similar to mine.

They (Novell) have an internal TID not released to the public, so I'll try and explain it and have you resolve it.

1) If you look closely in your log file, just before the errors, you should see a reference to a bundle and somewhere you will see its GUID. You'll typically see something like, "An error occurred while importing content: 8264af245090d0a36c0f22510cd57dd8 (this was my GUID, yours will be different)

2) Once you have that GUID, goto your primary server that is giving you the error, and browse to the content-repo directory and find the subfolder /content and then /ImportData (i.e. on linux; /var/opt/novell/zenworks/content-repo/content/importData)

3) You should see a file named <GUI>.import (8264af245090d0a36c0f22510cd57dd8.import for me)

4) Double-check your temporary directory and make sure that there is no folder with the same GUID that contains information (i.e. on linux it's /var/tmp)

5) If you don't see any files/folders for this GUID, you should be safe to just delete (back it up first if you want) the <GUID>.import file

I did this, and the errors have stopped and once again I have a clean log file and things are much smoother now.

I did, beforehand, set my logging to be verbose, so you may need to set that option to get some of the information like the GUId; not sure. Here is how my log file looked with regards to the error message:

[DEBUG] [6/13/13 11:49:54 AM] [] [Content Datamodel] [5472] [] [select distinct c.ZUID from zContent c where (c.Replicate=:repSpec and exists (select 1 from zContentServers cps where cps.id = c.ZUID and cps.Servers = :serverUID) or c.Replicate=:repExcept and not exists (select cps1.Servers from zContentServers cps1 where cps1.id = c.ZUID and cps1.Servers = :serverUID) or c.Replicate=:repAll or c.Replicate=:repPrimary) and c.AliasedContentUID is null and (c.MetaVersion>0 or c.AliasedContentUID IS NOT NULL) and not exists (select 1 from zContentSyncState cs where cs.ServerUID=:serverUID and (cs.SyncState='AVAILABLE' or cs.SyncState='PACKAGING') and (cs.ContentUID=c.ZUID or cs.ContentUID=c.AliasedContentUID))] [] []
[DEBUG] [6/13/13 11:49:54 AM] [] [Content Datamodel] [5472] [] [serverUID = e30d6a16141c1135c2e2d56af18bba6f , isSQLQuery = true] [] []
[DEBUG] [6/13/13 11:50:26 AM] [] [Loader.Content Import] [5472] [] [(Event) Restarting the processing of 8264af245090d0a36c0f22510cd57dd8.] [] []
[ERROR] [6/13/13 11:50:26 AM] [] [ImportContent] [5475] [AddContentHandler.MSG_ADD_CONTENT_FAILURE] [Error while importing content Clicker5.msi into the system.] [8264af245090d0a36c0f22510cd57dd8] [a62558985c834acca910d802ae6402ef]
[DEBUG] [6/13/13 11:50:26 AM] [] [ImportContent] [5475] [] [[[AC]] Error retrieving content object:8264af245090d0a36c0f22510cd57dd8] [] []
[DEBUG] [6/13/13 11:50:26 AM] [] [ImportContent] [5475] [] [com.novell.zenworks.datamodel.exceptions.ObjectNotFoundException: 8264af245090d0a36c0f22510cd57dd8

Obviously the culprit was a an application named Clicker 5 in MSI format.

From what I understand, is that the file the .import file is attempting to copy over and create a bundle with, no longer exists in the temp directory, but will keep on trying every 10 minutes...and in my case, for several months (almost a year lol)

Here is a small transcript (abridged) of my discussion with the Novell tech, I hope it helps:

An error occurred while importing content: 8264af245090d0a36c0f22510cd57dd8

When content is uploading, it is temporarily copied to this directory on Linux:
/var/tmp/<GUID>/

A <GUID>.import file is then created under:
/var/opt/novell/zenworks/content-repo/content/importData/

The importData directory is monitored by the loader service for .import files. When it finds one, it tries to import the content located under /var/tmp/ . If the required content isn't found, it errors out, but doesn't delete the .import file. It just keeps trying and erroring. The bad .import file can be moved or deleted to stop the errors.

Here is the information from this troubleshooting in their own internal TID:

1. Find out the GUID of the bundle we want to reference and that of the managed device it is assigned to. We'll call it BundleGuid and DeviceGuid

2. To find out the Content ids for this bundle open the server database and run the following query:
select ContentUID from zLinkedObject where ContainingObjectUID = 0x<BundleGuid> e.g.0x7a68e43ceca39fb76e7d4e21bc53a1cb)

3. Take the list of ContentUID just obtained to that managed device
4. Run the tool that is attached (SQLite Database Browser.exe) on the managed device. Open C:\Program Files\Novell\ZENworks\cache\zmd\ZenCache\metaData\fileInfo.db using this tool.
5. Go to 'Execute SQL' tab and run this query:
select LocalPath from Entry where Key = 'ContentMgr::Content::<ContentUID>' (replace <ContentUID> with each UID that we got in step 2)
e.g. ContentMgr::Content::826eb149943fdc720bbeb710543c8e30

6. We now have the folders where the content related to the BundleGUID are stored.

I hope some of this will help someone else, including yourselves.

Let me know if you succeed, but please keep in mind that I am not trying to solve your problem, only showing you what I did to solve mine. Any and all steps I provide are at your discretion, and in any doubt, contact Novell yourself to ensure that you're not deleting/moving an important file. The last thing I want is to make something worse. 🙂

PEACE
mickers Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

Thanks, I found 3 import temp files that were looping, over 12 months old. All gone now.
0 Likes
beaujona Absent Member.
Absent Member.

Re: ZCM SQl errors in message-loader.log?

mickers;2268711 wrote:
Thanks, I found 3 import temp files that were looping, over 12 months old. All gone now.


That's great.

I noticed a difference in the log files instantly, especially considering I normally set mine to debug.

I also found a solution (i hope) with Novell regarding another situation where sat servers were not properly replicating bundles, if you're interested, I could also potentially offer the information I gathered through my open SR with Novell.

Glad to have helped!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.