Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push to one of three endpoints failed - "User system does not have permission to add to Folder null" #12377

Closed
brentgriffin opened this issue Aug 19, 2017 · 1 comment

Comments

@brentgriffin
Copy link
Contributor

Dynamically push publishing to an environment with three endpoints. All three endpoints started with copies of the starter site. Only one of the recipients failed with this error: "Failed to publish because an error occurred: User system does not have permission to add to Folder null"

Expected Behavior

Expected success like on one of the endpoints.

This is an excerpt of dotcms.log on receiving server that failed

[18/08/17 21:44:07:559 PDT]  WARN util.JDBCExceptionReporter: SQL Error: 0, SQLState: 23503
[18/08/17 21:44:07:560 PDT] ERROR util.JDBCExceptionReporter: ERROR: insert or update on table "contentlet" violates foreign key constraint "content_identifier_fk"
  Detail: Key (identifier)=(5ebfa8c1-ebf1-4e17-b937-64b597660c9c) is not present in table "identifier".
[18/08/17 21:44:07:561 PDT] ERROR impl.SessionImpl: Could not synchronize database state with session
[18/08/17 21:44:07:562 PDT] ERROR business.ESContentletAPIImpl: Unable to save/update Object to Hibernate Session
com.dotmarketing.exception.DotHibernateException: Unable to save/update Object to Hibernate Session
	at com.dotmarketing.db.HibernateUtil.saveOrUpdate(HibernateUtil.java:502) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.save(ESContentFactoryImpl.java:1509) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.save(ESContentFactoryImpl.java:1495) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2894) [dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2631) [dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2557) [dotcms_project-8_a3381fe.jar:?]
	at com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor.checkin(ContentletAPIInterceptor.java:229) [dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:463) [ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:195) [ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(SourceFile:125) [ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(SourceFile:102) [ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.publisher.receiver.BundlePublisher.process(BundlePublisher.java:201) [dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.rest.PublishThread.run(PublishThread.java:41) [dotcms_project-8_a3381fe.jar:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
Caused by: com.dotcms.repackage.net.sf.hibernate.exception.ConstraintViolationException: could not update: [com.dotmarketing.portlets.contentlet.business.Contentlet#1e2ad351-acef-4036-99e3-714e8a82082f]
	at com.dotcms.repackage.net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:62) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:675) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:639) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2393) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotmarketing.db.HibernateUtil.saveOrUpdate(HibernateUtil.java:500) ~[dotcms_project-8_a3381fe.jar:?]
	... 13 more
Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "contentlet" violates foreign key constraint "content_identifier_fk"
  Detail: Key (identifier)=(5ebfa8c1-ebf1-4e17-b937-64b597660c9c) is not present in table "identifier".
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2477) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2190) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:136) ~[postgresql-42.1.4.jar:42.1.4]
	at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:97) ~[tomcat-dbcp.jar:8.5.15]
	at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:97) ~[tomcat-dbcp.jar:8.5.15]
	at com.dotcms.repackage.net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:664) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:639) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2393) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotmarketing.db.HibernateUtil.saveOrUpdate(HibernateUtil.java:500) ~[dotcms_project-8_a3381fe.jar:?]
	... 13 more
[18/08/17 21:44:07:565 PDT] ERROR db.HibernateUtil: ---------- DotHibernate: error on rollbackTransaction ---------------
org.postgresql.util.PSQLException: Cannot rollback when autoCommit is enabled.
[18/08/17 21:44:07:565 PDT] ERROR business.PublisherAPIImpl: Error Publishing Bundle: Unable to save/update Object to Hibernate Session
com.dotcms.publishing.DotPublishingException: Unable to save/update Object to Hibernate Session
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:304) ~[ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(SourceFile:125) ~[ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(SourceFile:102) ~[ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.publisher.receiver.BundlePublisher.process(BundlePublisher.java:201) [dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.rest.PublishThread.run(PublishThread.java:41) [dotcms_project-8_a3381fe.jar:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
Caused by: com.dotmarketing.exception.DotHibernateException: Unable to save/update Object to Hibernate Session
	at com.dotmarketing.db.HibernateUtil.saveOrUpdate(HibernateUtil.java:502) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.save(ESContentFactoryImpl.java:1509) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.save(ESContentFactoryImpl.java:1495) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2894) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2631) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2557) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor.checkin(ContentletAPIInterceptor.java:229) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:463) ~[ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:195) ~[ee-project-8-SNAPSHOT.jar:?]
	... 5 more
Caused by: com.dotcms.repackage.net.sf.hibernate.exception.ConstraintViolationException: could not update: [com.dotmarketing.portlets.contentlet.business.Contentlet#1e2ad351-acef-4036-99e3-714e8a82082f]
	at com.dotcms.repackage.net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:62) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:675) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:639) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2393) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotmarketing.db.HibernateUtil.saveOrUpdate(HibernateUtil.java:500) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.save(ESContentFactoryImpl.java:1509) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.save(ESContentFactoryImpl.java:1495) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2894) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2631) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2557) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor.checkin(ContentletAPIInterceptor.java:229) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:463) ~[ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:195) ~[ee-project-8-SNAPSHOT.jar:?]
	... 5 more
Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "contentlet" violates foreign key constraint "content_identifier_fk"
  Detail: Key (identifier)=(5ebfa8c1-ebf1-4e17-b937-64b597660c9c) is not present in table "identifier".
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2477) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2190) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169) ~[postgresql-42.1.4.jar:42.1.4]
	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:136) ~[postgresql-42.1.4.jar:42.1.4]
	at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:97) ~[tomcat-dbcp.jar:8.5.15]
	at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:97) ~[tomcat-dbcp.jar:8.5.15]
	at com.dotcms.repackage.net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:664) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:639) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2393) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotcms.repackage.net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261) ~[dot.hibernate-2.1.7_2.jar:?]
	at com.dotmarketing.db.HibernateUtil.saveOrUpdate(HibernateUtil.java:500) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.save(ESContentFactoryImpl.java:1509) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentFactoryImpl.save(ESContentFactoryImpl.java:1495) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2894) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2631) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2557) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor.checkin(ContentletAPIInterceptor.java:229) ~[dotcms_project-8_a3381fe.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:463) ~[ee-project-8-SNAPSHOT.jar:?]
	at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.a(SourceFile:195) ~[ee-project-8-SNAPSHOT.jar:?]
	... 5 more
[18/08/17 21:44:07:579 PDT] ERROR lang.String: Error Publishing: com.dotcms.publishing.DotPublishingException: Unable to save/update Object to Hibernate Session
[18/08/17 21:44:07:579 PDT]  INFO rest.PublishThread: Finished bundle publish process

Why did this succeed in one endpoint and fail in the other one?
I do wonder if it had anything to do with this entry from earlier in the log:

[18/08/17 18:33:16:873 PDT]  WARN handler.FolderHandler: The Bundle is asking to update the SYSTEM_FOLDER identifier - sender system does not match receiver system - trying to continue

Can provide bundle that failed but be warned - it is about 20GB in size

@dsilvam dsilvam added this to the Rex Current milestone Aug 21, 2017
@dsilvam dsilvam self-assigned this Aug 21, 2017
dsilvam added a commit that referenced this issue Aug 22, 2017
dsilvam added a commit that referenced this issue Aug 22, 2017
@dsilvam dsilvam modified the milestones: Rex Next, Rex Current Aug 22, 2017
@dsilvam dsilvam modified the milestones: Rex Next, Rex Current Sep 12, 2017
@dsilvam dsilvam closed this as completed Sep 22, 2017
@dsilvam dsilvam reopened this Sep 22, 2017
@dsilvam dsilvam removed their assignment Sep 22, 2017
@dsilvam dsilvam removed this from the Rex Current milestone Sep 22, 2017
@stale
Copy link

stale bot commented Sep 28, 2019

This issue has been automatically marked as stale because it has not had activity within the past 90 days. It will be closed in 30 days no further activity occurs. Thank you.

@stale stale bot added the wontfix label Sep 28, 2019
@stale stale bot closed this as completed Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants