Home > NetApp > SMO Failed to lazily initialize

SMO Failed to lazily initialize

Oracle Datenbank NetApp Logo

NetApp SnapManager für Oracle: Failed to lazily initialize a collection

NetApp SMO 3.1 - SnapManager für Oracle: SMO-13032: Cannot perform operation

Beim Erstellen eines SMO Backups trat "plötzlich" das Problem auf, dass dieses mit folgendem Errorstack abgebrochen wurde:

SMO-13036: Starting operation Backup Create on host mydbserver
SMO-13046: Operation GUID 8a6e820d3a5d2c48013a5d2c4e260001 starting on Profile MYDB
SMO-02007: Auto-generated label "F_H_20121014044833CEST" for backup.
SMO-07431: Saving starting state of the database: MYDB1(OPEN).
SMO-07431: Saving starting state of the database: MYDB2(OPEN), MYDB1(OPEN).
SMO-13032: Cannot perform operation: Backup Create. Root cause: Failed to lazily initialize a collection
SMO-07433: Returning the database to its initial state: MYDB2(OPEN), MYDB1(OPEN).
SMO-13039: Successfully aborted operation: Backup Create
SMO-13048: Backup Create Operation Status: FAILED
SMO-13049: Elapsed Time: 0:00:12.296

Die entscheidende Zeile:


SMO-13032: Cannot perform operation: Backup Create. Root cause: Failed to lazily initialize a collection

Erste Analyse

Der Fehler trat bei auch bei vielen andern Aktionen wie dem Versuch ein Backup zu löschen oder einen Clone zu erzeugen auf. Die Idee das PROFILE der Datenbank MYDB einfach zu entfernen und neu anzulegen war nicht umsetzbar, da man im SMO erst dann ein PROFILE beseitigen darf, wenn es dazu keine Backups mehr gibt.

Die Nachforschung warum das Problem "plötzlich" aufgetreten ist, hat zu tage gebracht, dass die Repository Datenbank mittels EXP/IMP auf ein anderes System übertragen wurde - anscheinend wurde dabei nicht darauf rücksicht genommen, wann die Backups laufen... Bei anderen Datenbanken im gleichen Repository trat das Problem nicht auf.

/var/log/smo/server.log

2012-10-14 04:48:44,138 [btpool0-7625 - /smo_v9/services/SMO] [DEBUG]: operationActivityMap of size 1 add operable Log List[Nce3985ca7633d238dc9f54f101dbe296]
2012-10-14 04:48:44,138 [btpool0-7625 - /smo_v9/services/SMO] [DEBUG]: operationMap of size 2 adding logListNext ID Nce3985ca7633d238dc9f54f101dbe296
2012-10-14 04:48:44,140 [btpool0-7625 - /smo_v9/services/SMO] [DEBUG]: SnapManager server finished operation: logListNext, result: Nce3985ca7633d238dc9f54f101dbe296|0|null
2012-10-14 04:48:44,935 [Thread-9796] [DEBUG]: AsynchOperation.execute threw Throwable
com.netapp.dlm.process.operation.OperationException: Failed to lazily initialize a collection
at com.netapp.dlm.process.common.OpCycleOperation.execute(OpCycleOperation.java:195)
at com.netapp.dlm.server.RemoteOperationImpl.execute(RemoteOperationImpl.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
at $Proxy77.execute(Unknown Source)
at com.netapp.dlm.server.AsynchOperationDispatcher$WorkerThread.run(AsynchOperationDispatcher.java:72)
Caused by: net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:201)
at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:71)
at net.sf.hibernate.collection.Set.contains(Set.java:122)
at com.netapp.dlm.repository.profile.HostCredential.addDatabase(HostCredential.java:102)
at com.netapp.dlm.repository.database.DatabaseInstanceContainer.setHostCredential(DatabaseInstanceContainer.java:248)
at com.netapp.dlm.repository.common.RepositoryFactory$DatabaseFactory.newDatabaseInstanceContainerInstance(RepositoryFactory.java:501)
at com.netapp.dlm.services.vdi.OracleDatabaseObjectFactory.createDatabaseContainer(OracleDatabaseObjectFactory.java:143)
at com.netapp.dlm.services.vdi.DatabaseSession.createDatabaseContainer(DatabaseSession.java:234)
at com.netapp.dlm.process.operation.BackupOperation.doExecute(BackupOperation.java:308)
at com.netapp.dlm.process.common.OpCycleOperation.execute(OpCycleOperation.java:146)
at com.netapp.dlm.server.RemoteOperationImpl.execute(RemoteOperationImpl.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.hibernate.UnresolvableObjectException: No row with the given identifier exists: 8a6e820d3a3a6d4f013a3a6d55ad0001, of class: com.netapp.dlm.repository.processing.OperationCycle
at net.sf.hibernate.UnresolvableObjectException.throwIfNull(UnresolvableObjectException.java:38)
at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1964)
at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:69)
at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:208)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2219)
at net.sf.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:319)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:309)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:1020)
at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:995)
at net.sf.hibernate.loader.OneToManyLoader.initialize(OneToManyLoader.java:93)
at net.sf.hibernate.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:288)
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3315)
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:195)
... 21 more2012-10-14 04:48:44,935 [Thread-9796] [DEBUG]: operationResultMap of size 32 submitting result for ID 8a6e820d3a5d2c48013a5d2c4e260001
2012-10-14 04:48:44,935 [Thread-9796] [DEBUG]: operationResultActivityMap of size 32 add result for ID 8a6e820d3a5d2c48013a5d2c4e260001
2012-10-14 04:48:44,936 [Thread-9796] [DEBUG]: operationMap removing ID 8a6e820d3a5d2c48013a5d2c4e260001
2012-10-14 04:48:44,936 [Thread-9796] [DEBUG]: operationActivityMap remove operable Proxy[RemoteOperation,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[10.238.2.141:35704](remote),objID:[61bbaeac:13a5d2c3246:-8000, 2]]]]]
2012-10-14 04:48:46,362 [Execution Monitor Thread [./bin/launch-java com.netapp.common.remote.RemoteObjectFactoryImpl 10.238.2.141 27215 e57e4137ecefc1ed768dd776ba64b7be]] [DEBUG]: EXE-00001: Shell result [0:00:18.175] (Exit Value: 0):
[ INFO] REMOTE-00003: RemoteObjectFactory started successfully - bound to 10.238.2.141:27215/e57e4137ecefc1ed768dd776ba64b7be.
[ INFO] SMO-13051: Process PID=7320
[ INFO] SMO-13036: Starting operation Backup Create on host mydbserver
[ INFO] SMO-13046: Operation GUID 8a6e820d3a5d2c48013a5d2c4e260001 starting on Profile MYDB
[ INFO] SMO-02007: Auto-generated label "F_H_20121014044833CEST" for backup.
[ INFO] SMO-07431: Saving starting state of the database: MYDB1(OPEN).
[ INFO] SMO-07431: Saving starting state of the database: MYDB2(OPEN), MYDB1(OPEN).
[ERROR] SMO-13032: Cannot perform operation: Backup Create. Root cause: Failed to lazily initialize a collection
[ INFO] SMO-07433: Returning the database to its initial state: MYDB2(OPEN), MYDB1(OPEN).
[ INFO] SMO-13039: Successfully aborted operation: Backup Create
[ERROR] SMO-13048: Backup Create Operation Status: FAILED
[ INFO] SMO-13049: Elapsed Time: 0:00:12.296
REMOTE-00004: RemoteObjectFactory shutdown gracefully.

Die Lösung

Die schnellste Lösung war letztlich:

  • Einen neuen SMO Repository Benutzer in der Oracle Repository Datenbank anlegen
  • Im SMOGUI das Repository anlegen.
  • Die Datenbanken mit neuen PROFILE Namen neu registieren
  • Im SMOGUI das alte Repository löschen (ohne DESTROY)
  • Den alten SMO Repository Benutzer in der Datenbank löschen
  • Nach einem Tag die SNAPSHOTS, die mit dem alten SMO Repository angelegt wurden, löschen