Closed Trasmontinho closed 2 years ago
HI @Trasmontinho, what type of task is it? Can you check the logs on the server for the task ID?
Hi @SCadilhac,
Could you be a bit more explicit ?
Since I've restarted the containers, I'm not able to find any information regarding the task. l've looked up the different log files. I haven't had the audit logs yet. Should I do it ?
Regards,
Sam
So you've restarted the container and the task is still showing up as running? Can you capture the logs at startup time?
Yep.
I'm going to activate the audit log. Restart the docker compose and keep you posted
Regards
You can see below the error shown at the restart of the server.
By the way note that this same device has been discovered by another task and is present in netshot
2022-07-04 13:47:49,586 WARN [NetshotRunnerScheduler_Worker-1] TaskJob: Running the task 41408 of type onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask
2022-07-04 13:47:50,634 WARN [NetshotRunnerScheduler_Worker-1] DiscoverDeviceTypeTask: Error while polling the device via SNMP.
java.io.IOException: No SNMP response.
at onl.netfishers.netshot.device.access.Snmp.getAsString(Snmp.java:204)
at onl.netfishers.netshot.device.access.Snmp.getAsString(Snmp.java:223)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.snmpDiscover(DiscoverDeviceTypeTask.java:172)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.snmpv2cDiscover(DiscoverDeviceTypeTask.java:226)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:293)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2022-07-04 13:47:51,637 WARN [NetshotRunnerScheduler_Worker-1] DiscoverDeviceTypeTask: Error while polling the device via SNMP.
java.io.IOException: No SNMP response.
at onl.netfishers.netshot.device.access.Snmp.getAsString(Snmp.java:204)
at onl.netfishers.netshot.device.access.Snmp.getAsString(Snmp.java:223)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.snmpDiscover(DiscoverDeviceTypeTask.java:172)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.snmpv2cDiscover(DiscoverDeviceTypeTask.java:226)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:293)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2022-07-04 13:47:52,031 WARN [NetshotRunnerScheduler_Worker-1] SqlExceptionHelper: SQL Error: 0, SQLState: 23505
2022-07-04 13:47:52,031 ERROR [NetshotRunnerScheduler_Worker-1] SqlExceptionHelper: ERROR: duplicate key value violates unique constraint "device_ipv4_address_key"
Detail: Key (ipv4_address)=(169279765) already exists.
2022-07-04 13:47:52,036 ERROR [NetshotRunnerScheduler_Worker-1] DiscoverDeviceTypeTask: Task 41408. Couldn't save the new device.
org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:109)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:37)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:200)
at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:58)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3279)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3885)
at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:84)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:645)
at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:282)
at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:263)
at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317)
at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:330)
at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:287)
at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:193)
at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:123)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:194)
at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:179)
at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:75)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:672)
at org.hibernate.internal.SessionImpl.save(SessionImpl.java:665)
at org.hibernate.internal.SessionImpl.save(SessionImpl.java:660)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:318)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "device_ipv4_address_key"
Detail: Key (ipv4_address)=(169279765) already exists.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:166)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:134)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:1502)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
... 26 common frames omitted
2022-07-04 13:47:56,682 ERROR [NetshotRunnerScheduler_Worker-1] JobRunShell: Job DiscoverDeviceType_10.23.1.21.Task_41408 threw an unhandled Exception:
java.lang.IllegalStateException: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: onl.netfishers.netshot.device.Device
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:151)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1411)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:489)
at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3290)
at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2425)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281)
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
at onl.netfishers.netshot.device.DynamicDeviceGroup.refreshAllGroups(DynamicDeviceGroup.java:205)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:344)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: onl.netfishers.netshot.device.Device
at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:347)
at org.hibernate.type.EntityType.getIdentifier(EntityType.java:508)
at org.hibernate.type.EntityType.nullSafeSet(EntityType.java:281)
at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement(AbstractCollectionPersister.java:925)
at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1585)
at org.hibernate.action.internal.CollectionUpdateAction.execute(CollectionUpdateAction.java:89)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1407)
... 13 common frames omitted
2022-07-04 13:47:56,683 ERROR [NetshotRunnerScheduler_Worker-1] ErrorLogger: Job (DiscoverDeviceType_10.23.1.21.Task_41408 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception.
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: java.lang.IllegalStateException: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: onl.netfishers.netshot.device.Device
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:151)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1411)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:489)
at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3290)
at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2425)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281)
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
at onl.netfishers.netshot.device.DynamicDeviceGroup.refreshAllGroups(DynamicDeviceGroup.java:205)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:344)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 common frames omitted
Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: onl.netfishers.netshot.device.Device
at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:347)
at org.hibernate.type.EntityType.getIdentifier(EntityType.java:508)
at org.hibernate.type.EntityType.nullSafeSet(EntityType.java:281)
at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement(AbstractCollectionPersister.java:925)
at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1585)
at org.hibernate.action.internal.CollectionUpdateAction.execute(CollectionUpdateAction.java:89)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1407)
... 13 common frames omitted
Regards,
Sam
eb142b8 should hopefully fix that.
Thanks @SCadilhac.
I've downloaded the last master I don't think it at solved the problem here.
Below you'll find the lasts log of Netshot :
2022-07-05 09:02:59,723 WARN [NetshotRunnerScheduler_Worker-3] TaskJob: Running the task 41408 of type onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask
2022-07-05 09:03:00,976 WARN [NetshotRunnerScheduler_Worker-3] DiscoverDeviceTypeTask: Error while polling the device via SNMP.
java.io.IOException: No SNMP response.
at onl.netfishers.netshot.device.access.Snmp.getAsString(Snmp.java:204)
at onl.netfishers.netshot.device.access.Snmp.getAsString(Snmp.java:223)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.snmpDiscover(DiscoverDeviceTypeTask.java:172)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.snmpv2cDiscover(DiscoverDeviceTypeTask.java:226)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:293)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2022-07-05 09:03:33,025 WARN [NetshotRunnerScheduler_Worker-3] SqlExceptionHelper: SQL Error: 0, SQLState: 23505
2022-07-05 09:03:33,025 ERROR [NetshotRunnerScheduler_Worker-3] SqlExceptionHelper: ERROR: duplicate key value violates unique constraint "device_ipv4_address_key"
Detail: Key (ipv4_address)=(169279765) already exists.
2022-07-05 09:03:33,030 ERROR [NetshotRunnerScheduler_Worker-3] DiscoverDeviceTypeTask: Task 41408. Couldn't save the new device.
org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:109)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:37)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:200)
at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:58)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3279)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3885)
at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:84)
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:645)
at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:282)
at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:263)
at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317)
at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:330)
at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:287)
at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:193)
at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:123)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:194)
at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:179)
at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:75)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:672)
at org.hibernate.internal.SessionImpl.save(SessionImpl.java:665)
at org.hibernate.internal.SessionImpl.save(SessionImpl.java:660)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:318)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "device_ipv4_address_key"
Detail: Key (ipv4_address)=(169279765) already exists.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:166)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:134)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:1502)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
... 26 common frames omitted
2022-07-05 09:03:02,240 WARN [NetshotRunnerScheduler_Worker-3] DiscoverDeviceTypeTask: Error while polling the device via SNMP.
java.io.IOException: No SNMP response.
at onl.netfishers.netshot.device.access.Snmp.getAsString(Snmp.java:204)
at onl.netfishers.netshot.device.access.Snmp.getAsString(Snmp.java:223)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.snmpDiscover(DiscoverDeviceTypeTask.java:172)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.snmpv2cDiscover(DiscoverDeviceTypeTask.java:226)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:293)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2022-07-05 09:07:22,713 ERROR [NetshotRunnerScheduler_Worker-3] JobRunShell: Job DiscoverDeviceType_10.23.1.21.Task_41408 threw an unhandled Exception:
java.lang.IllegalStateException: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: onl.netfishers.netshot.device.Device
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:151)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1411)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:489)
at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3290)
at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2425)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281)
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
at onl.netfishers.netshot.device.DynamicDeviceGroup.refreshAllGroups(DynamicDeviceGroup.java:205)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:344)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: onl.netfishers.netshot.device.Device
at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:347)
at org.hibernate.type.EntityType.getIdentifier(EntityType.java:508)
at org.hibernate.type.EntityType.nullSafeSet(EntityType.java:281)
at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement(AbstractCollectionPersister.java:925)
at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1585)
at org.hibernate.action.internal.CollectionUpdateAction.execute(CollectionUpdateAction.java:89)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1407)
... 13 common frames omitted
2022-07-05 09:07:22,713 ERROR [NetshotRunnerScheduler_Worker-3] ErrorLogger: Job (DiscoverDeviceType_10.23.1.21.Task_41408 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception.
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: java.lang.IllegalStateException: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: onl.netfishers.netshot.device.Device
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:151)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1411)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:489)
at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3290)
at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2425)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281)
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
at onl.netfishers.netshot.device.DynamicDeviceGroup.refreshAllGroups(DynamicDeviceGroup.java:205)
at onl.netfishers.netshot.work.tasks.DiscoverDeviceTypeTask.run(DiscoverDeviceTypeTask.java:344)
at onl.netfishers.netshot.work.TaskJob.execute(TaskJob.java:95)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
... 1 common frames omitted
Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: onl.netfishers.netshot.device.Device
at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:347)
at org.hibernate.type.EntityType.getIdentifier(EntityType.java:508)
at org.hibernate.type.EntityType.nullSafeSet(EntityType.java:281)
at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement(AbstractCollectionPersister.java:925)
at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1585)
at org.hibernate.action.internal.CollectionUpdateAction.execute(CollectionUpdateAction.java:89)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1407)
... 13 common frames omitted
Thanks again for your support.
Regards, Sam
Hi @SCadilhac,
I don't know or why but after restarts of the docker instance, the task has moved to scheduled ones. I've been able to delete it.
I'm closing the issue.
Regards,
Sam
Hello @SCadilhac ,
I'm running Netshot under Docker with the version 0.18.2. And I have a task that still stucked in Running. Is there a way to stop it ?
I don't know if it's possible to do it but it could be interesting to add the possibility to stop a task which still pending in running mode.
Thanks for your support.
Regards,
Sam