Bug 1194565 - sometimes when refreshing manifest it fails with "Katello::Errors::CandlepinError: Unable to create export archive"
Summary: sometimes when refreshing manifest it fails with "Katello::Errors::CandlepinE...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Candlepin
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
: 1207503 (view as bug list)
Depends On: 1314042
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-20 08:49 UTC by Jan Hutař
Modified: 2019-09-26 13:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 20:03:12 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jan Hutař 2015-02-20 08:49:11 UTC
Description of problem:
Sometimes when refreshing manifest it fails with "Katello::Errors::CandlepinError: Unable to create export archive"


Version-Release number of selected component (if applicable):
Satellite-6.1.0-RHEL-6-20150217.0-Satellite-x86_64


How reproducible:
sometimes (happened to me after about 3 cycles)


Steps to Reproduce:
1. Upload manifest, refresh it, delete it
2. Go to 1


Actual results:
Refreshing manifest fails. Corresponding task have "Katello::Errors::CandlepinError: Unable to create export archive" exception. There is a traceback in /var/log/candlepin/candlepin.log


Expected results:
Should work


Additional info:
[...]
2015-02-20 04:16:06,580 [req=c3adc9f8-b31e-47f4-9c50-f764e09567b7, org=Default_Organization] INFO  org.candlepin.policy.js.pool.PoolRules - Creating pools for subscription: Subscription [id = 8aa2a3e44ba4ec4e014ba4fc1e8b0222, product = P
roduct [id = ES0113909, name = Red Hat Employee Subscription], quantity = 1, expires = Sat Jan 01 05:59:59 CET 2022]
2015-02-20 04:16:07,993 [req=1ef8697d-ae38-41bb-bb38-70be69bb88c7, org=Default_Organization] ERROR org.candlepin.common.exceptions.mappers.CandlepinExceptionMapper - Runtime Error could not execute statement at org.postgresql.core.v3.Que
ryExecutorImpl.receiveErrorResponse:2,094
org.hibernate.exception.ConstraintViolationException: could not execute statement
        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3343) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3546) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:100) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:369) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:293) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:339) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1234) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:996) ~[hibernate-entitymanager-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        at org.candlepin.model.AbstractHibernateCurator.flush(AbstractHibernateCurator.java:364) ~[AbstractHibernateCurator.class:na]
        at org.candlepin.model.AbstractHibernateCurator.save(AbstractHibernateCurator.java:359) ~[AbstractHibernateCurator.class:na]
        at org.candlepin.model.AbstractHibernateCurator.create(AbstractHibernateCurator.java:112) ~[AbstractHibernateCurator.class:na]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:58) ~[guice-persist-3.0-redhat-1.jar:3.0-redhat-1]
        at org.candlepin.resource.OwnerResource.recordManifestDeletion(OwnerResource.java:1421) ~[OwnerResource.class:na]
        at org.candlepin.resource.OwnerResource.undoImports(OwnerResource.java:1034) ~[OwnerResource.class:na]
        at org.candlepin.guice.TransactionalInvoker.invoke(TransactionalInvoker.java:34) ~[TransactionalInvoker.class:na]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) ~[guice-persist-3.0-redhat-1.jar:3.0-redhat-1]
        at org.candlepin.guice.CandlepinResourceTxnInterceptor.invoke(CandlepinResourceTxnInterceptor.java:33) ~[CandlepinResourceTxnInterceptor.class:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167) ~[resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) ~[resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) ~[resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) ~[resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542) [resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524) [resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126) [resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.7.2.Final-redhat-1.jar:2.3.7.2.Final-redhat-1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [tomcat6-servlet-2.5-api-6.0.24.jar:na]
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at org.candlepin.servlet.filter.EventFilter.doFilter(EventFilter.java:63) [EventFilter.class:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at org.candlepin.servlet.filter.ContentTypeHackFilter.doFilter(ContentTypeHackFilter.java:58) [ContentTypeHackFilter.class:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at org.candlepin.common.filter.LoggingFilter.doFilter(LoggingFilter.java:88) [candlepin-common-1.0.20.jar:]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at org.candlepin.servlet.filter.CandlepinPersistFilter.doFilter(CandlepinPersistFilter.java:48) [CandlepinPersistFilter.class:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at org.candlepin.servlet.filter.CandlepinScopeFilter.doFilter(CandlepinScopeFilter.java:68) [CandlepinScopeFilter.class:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0-redhat-1.jar:3.0-redhat-1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina-6.0.24.jar:na]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina-6.0.24.jar:na]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) [catalina-6.0.24.jar:na]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) [tomcat-coyote-6.0.24.jar:na]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) [tomcat-coyote-6.0.24.jar:na]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) [tomcat-coyote-6.0.24.jar:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "cp_subscription" violates foreign key constraint "fk_sub_branding_sub_id" on table "cp_sub_branding"
  Detail: Key (id)=(8aa2a3e44ba4ec4e014ba4f83d320058) is still referenced from table "cp_sub_branding".
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2094) ~[postgresql-jdbc-8.4.704.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1827) ~[postgresql-jdbc-8.4.704.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[postgresql-jdbc-8.4.704.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:508) ~[postgresql-jdbc-8.4.704.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:384) ~[postgresql-jdbc-8.4.704.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:330) ~[postgresql-jdbc-8.4.704.jar:na]
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:79) ~[c3p0-0.9.1.2.jar:0.9.1.2]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133) ~[hibernate-core-4.2.5.Final-redhat-1.jar:4.2.5.Final-redhat-1]
        ... 68 common frames omitted
2015-02-20 04:16:08,004 [req=1ef8697d-ae38-41bb-bb38-70be69bb88c7, org=Default_Organization] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=500, content-type="application/json", time=91116
2015-02-20 04:16:08,288 [req=c3adc9f8-b31e-47f4-9c50-f764e09567b7, org=Default_Organization] INFO  org.candlepin.resource.OwnerResource - Import attempt completed for owner Default Organization
[...]

Comment 2 Jan Hutař 2015-02-20 09:40:02 UTC
I was not able to reproduce reliably (looks like 3 attempts is not enough), so switching severity to medium.

Comment 3 RHEL Program Management 2015-02-20 15:42:16 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 5 Barnaby Court 2016-03-02 19:27:18 UTC
*** Bug 1207503 has been marked as a duplicate of this bug. ***

Comment 6 pjonasti 2016-10-03 14:05:53 UTC
Since behavior was changed in candlepin, could you retest it again ?

Comment 7 Jan Hutař 2016-10-04 05:41:17 UTC
In which version does the behaviour changed?

Should this be ON_QA then?

Comment 18 Bryan Kearney 2017-08-01 20:03:12 UTC
The fix to this bug will be delivered with release 6.3 of Satellite.


Note You need to log in before you can comment on or make changes to this bug.