Highlighted
mickers Absent Member.
Absent Member.
1566 views

"Device name already existed.." .. duplicate devices?

Hi all,
I have pre-imported a few hundred new devices into ZCM 11.2.2, using the serial number for reconciliation.
The new devices are built from a sysprepped image, named, and then install the ZAA. For most of the devices they see the existing device in ZCM, match the serial, and register using the existing object. For one or two, though, I'm seeing :

"Device name already existed, changed to nb130153-ee1dcb0bcec6c447b08e437143a09c22 while attempting to register host: NB130153"
The serial number in both the pre-imported and the second ZCM devices are identical, so is there any reason why they shouldn't reconcile?

My Configuration\Devices\Registration settings use ${HOSTNAME} for naming, Automatic device renaming, use just the Serial number for reconciliation, and no differentiation.

Thanks.
Labels (2)
0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

Re: "Device name already existed.." .. duplicate devices?

Make sure that Debug Logging is enabled on your server and examine the
Loader-Messages.Log

It should give the device import details.

On 12/5/2012 10:46 PM, mickers wrote:
>
> Hi all,
> I have pre-imported a few hundred new devices into ZCM 11.2.2, using
> the serial number for reconciliation.
> The new devices are built from a sysprepped image, named, and then
> install the ZAA. For most of the devices they see the existing device
> in ZCM, match the serial, and register using the existing object. For
> one or two, though, I'm seeing :
>
> "Device name already existed, changed to
> nb130153-ee1dcb0bcec6c447b08e437143a09c22 while attempting to register
> host: NB130153"
> The serial number in both the pre-imported and the second ZCM devices
> are identical, so is there any reason why they shouldn't reconcile?
>
> My Configuration\Devices\Registration settings use ${HOSTNAME} for
> naming, Automatic device renaming, use just the Serial number for
> reconciliation, and no differentiation.
>
> Thanks.
>
>



--
Craig Wilson - MCNE, MCSE, CCNA
Novell Knowledge Partner

Novell does not officially monitor these forums.

Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared by either Novell or any rational human.
0 Likes
mickers Absent Member.
Absent Member.

Re: "Device name already existed.." .. duplicate devices?

Thanks, Craig,
The only thing I can see is this..I rebooted to get a 'clean' look at the logs, and this still appeared.

[DEBUG] [7/12/12 8:08:17 AM] [] [Loader.MessageProcessorModule] [120] [] [Logger is not able to log the message:
<Message><MessageId>AddContentHandler.MSG_ADD_CONTENT_FAILURE</MessageId><Severity>8</Severity><Time>1354831696233</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 8:08:17 AM] [] [Loader.MessageProcessorModule] [120] [] [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

It looks like an SQL thing, but I have run the ZDC against the database and everything looked fine?

Can you make any sense of this?
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: "Device name already existed.." .. duplicate devices?

Likely not related there.
The Loader Log will have an entry for when each device initially
registers to the zone and should include some details about what it sees
and thinks about the device at that time.

On 12/6/2012 5:36 PM, mickers wrote:
>
> Thanks, Craig,
> The only thing I can see is this..I rebooted to get a 'clean' look at
> the logs, and this still appeared.
>
> [DEBUG] [7/12/12 8:08:17 AM] [] [Loader.MessageProcessorModule] [120]
> [] [Logger is not able to log the message:
> <Message><MessageId>AddContentHandler.MSG_ADD_CONTENT_FAILURE</MessageId><Severity>8</Severity><Time>1354831696233</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 8:08:17 AM] [] [Loader.MessageProcessorModule] [120]
> [] [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
>
> It looks like an SQL thing, but I have run the ZDC against the database
> and everything looked fine?
>
> Can you make any sense of this?
>
>



--
Craig Wilson - MCNE, MCSE, CCNA
Novell Knowledge Partner

Novell does not officially monitor these forums.

Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared by either Novell or any rational human.
0 Likes
mickers Absent Member.
Absent Member.

Re: "Device name already existed.." .. duplicate devices?

Thanks Craig.
I haven't been able to find any reference to the device/s in question. I've just patched my servers to 11.2.2MU1, so will keep an eye out for repeat behaviour, and try and track it.
Cheers,
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.