"Unable to communicate with server. Saving is not possible at the moment." Post Upgrade to 6.8.2

Upgraded from 6.8.0 to 6.8.2 and now I can no longer save.  

I did not use (and still don't use) Collaborative Editing. 

Tried multiple browsers.

I disabled the HipChat plugin (as many posts recommended)

Still can't save.

Ran diagnostics and it tells me that the logs contain the following error:

ERROR Stacktrace upon page creation in Confluence (Hibernate operation: Could not execute query; uncategorized SQLException for SQL) (https://jira.atlassian.com/browse/CONFSERVER-28250?utm_source=STP&utm_medium=logScan)

 

Here is the log file containing start-up and me attempting to save a file, which triggers the error.


devMode = false
--------------------------
Server Information
--------------------------
Application Server: Apache Tomcat/8.0.51
Servlet Version: 3.1
--------------------------
Database Information
--------------------------
Database Dialect: com.atlassian.confluence.impl.hibernate.dialect.PostgreSQLDialect
Database URL: jdbc:postgresql://localhost:5432/XXXXXXXXXXXXXXX
Database Driver Name: org.postgresql.Driver
Database Driver Version: 42.1.1
Database Name: PostgreSQL
Database Version: 9.6.8
Database Latency (ms): 1
--------------------------
System Information
--------------------------
date = Friday, May 18, 2018
jvmInputArguments = -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing -Dconfluence.context.path= -Datlassian.plugins.startup.options= -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dsynchrony.enable.xhr.fallback=true -Xms1024m -Xmx1024m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/opt/atlassian/confluence/logs/gc-2018-05-18_23-40-57.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution -Dignore.endorsed.dirs= -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp
systemLanguage = en
jvmVendor = Oracle Corporation
workingDirectory = /opt/atlassian/confluence/bin
javaVersion = 1.8.0_162
javaVendor = Oracle Corporation
userName = confluence
operatingSystem = Linux 4.14.33-59.37.amzn2.x86_64
tempDirectory = /opt/atlassian/confluence/temp
jvmImplementationVersion = 25.162-b12
appServer = Apache Tomcat
javaVm = Java HotSpot(TM) 64-Bit Server VM
jvmVersion = 1.8
favouriteCharacter = Hermione
favouriteColour = Alexandria
javaRuntime = Java(TM) SE Runtime Environment
time = 11:42:05 PM
systemTimezone = UTC
operatingSystemArchitecture = amd64
fileSystemEncoding = UTF-8
--------------------------

--------------------------
JVM Stats
--------------------------
usedMemory = 656934920
usedMemoryInMegabytes = 626
availableHeap = 416806904
freeMemoryInMegabytes = 397
allocatedHeap = 1073741824
freeAllocatedHeap = 416806904
totalMemory = 1073741824
totalMemoryInMegabytes = 1024
availablePermGen = 0
maxPermGen = -1
maxHeap = 1073741824
usedHeap = 656934920
freeMemory = 416806904
usedPermGen = -1
--------------------------
Cluster Information
--------------------------
Not clustered.
--------------------------
2018-05-18 23:42:07,721 INFO [localhost-startStop-1] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve
2018-05-18 23:42:53,722 WARN [http-nio-8090-exec-2] [v2.c3p0.impl.NewPooledConnection] log [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
-- referer: https://doc.truonix.io/pages/editpage.action?pageId=2064403 | url: /rest/api/content/2064403 | traceId: 69ea1021447f371d | userName: yanfosec
2018-05-18 23:42:53,725 WARN [http-nio-8090-exec-2] [v2.c3p0.impl.NewPooledConnection] log [c3p0] Another error has occurred [ org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block ] which will not be reported to listeners!
-- referer: https://doc.truonix.io/pages/editpage.action?pageId=2064403 | url: /rest/api/content/2064403 | traceId: 69ea1021447f371d | userName: yanfosec
org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2476)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2189)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
.......

Caused by: org.postgresql.util.PSQLException: ERROR: relation "AO_88BB94_BATCH_NOTIFICATION_ID_seq" does not exist
Position: 16
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2476)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2189)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)

2018-05-18 23:42:53,731 ERROR [http-nio-8090-exec-2] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block
-- referer: https://doc.truonix.io/pages/editpage.action?pageId=2064403 | url: /rest/api/content/2064403 | traceId: 69ea1021447f371d | userName: yanfosec
2018-05-18 23:42:53,738 WARN [http-nio-8090-exec-2] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
->[com.atlassian.confluence.api.impl.service.content.ContentServiceImpl.update]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #1518988503)
-- referer: https://doc.truonix.io/pages/editpage.action?pageId=2064403 | url: /rest/api/content/2064403 | traceId: 69ea1021447f371d | userName: yanfosec
2018-05-18 23:42:53,746 ERROR [http-nio-8090-exec-2] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error :
-- referer: https://doc.truonix.io/pages/editpage.action?pageId=2064403 | url: /rest/api/content/2064403 | traceId: 69ea1021447f371d | userName: yanfosec
org.springframework.orm.hibernate5.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [25P02]; error code [0]; could not extract ResultSet; nested exception is org.hibernate.exception.GenericJDBCException: could not extract ResultSet
at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:248)
at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:366)
at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:313)
Caused by: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:80)
at org.hibernate.loader.Loader.getResultSet(Loader.java:2123)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1911)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1887)
at org.hibernate.loader.Loader.doQuery(Loader.java:932)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349)
at org.hibernate.loader.Loader.doList(Loader.java:2615)
at org.hibernate.loader.Loader.doList(Loader.java:2598)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2430)
at org.hibernate.loader.Loader.list(Loader.java:2425)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:502)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:370)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1481)
at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1441)
at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1410)
at com.atlassian.confluence.mail.notification.persistence.dao.hibernate.HibernateNotificationDao.lambda$findNotificationByUserAndContent$0(HibernateNotificationDao.java:105)
at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:359)
... 386 more
Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2476)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2189)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:117)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:379)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:71)
... 403 more
Caused by: org.postgresql.util.PSQLException: ERROR: relation "AO_88BB94_BATCH_NOTIFICATION_ID_seq" does not exist
Position: 16
at com.atlassian.confluence.pages.DefaultPageManager.publishUpdateEvent(DefaultPageManager.java:1626)
at com.atlassian.confluence.core.DefaultContentEntityManager.saveContentEntity(DefaultContentEntityManager.java:186)
... 359 more
2018-05-18 23:42:57,327 WARN [http-nio-8090-exec-4] [com.atlassian.gzipfilter.GzipResponseWrapper] finishResponse Was unable to create GzipResponseStream. Invalid gzip stream was sent in response body!
-- referer: https://doc.truonix.io/pages/editpage.action?pageId=2064403 | url: /rest/analytics/1.0/publish/bulk | traceId: 3e42d62639d1504a
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:396)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
... 104 more

 

 

1 answer

1 accepted

0 votes
Accepted answer
Ann Worley Atlassian Team May 21, 2018

Hi Yan,

 

Please let me know what method you used to upgrade, for example did you use the Linux installer as described in Upgrading Confluence or the tar.gz file, as in Upgrading Confluence Manually? Please note from Upgrading Confluence that:

XML backups should not be used to upgrade Confluence.

The reason I am mentioning the XML back-ups is that there are Atlassian products that we do upgrade that way, and the error we are seeing, that the database is not as expected, is consistent with a faulty XML back-up being imported.

The error:


Caused by: org.postgresql.util.PSQLException: ERROR: relation "AO_88BB94_BATCH_NOTIFICATION_ID_seq" does not exist

indicates that Confluence is expecting a sequence in the PostgreSQL database and the sequence is not there. Both my Confluence 6.8.0 and Confluence 6.8.2 test instances running against PostgreSQL do have this sequence.

Please check the <confluence_home>atlassian-confluence.log for entries that indicate the upgrade completed successfully. If the upgrade failed, there should be an error message that tells us why. (Note: The <confluence_home> directory is the path defined in the following file: <confluence_install>/confluence/WEB-INF/classes/confluence-init.properties)

Thanks,

Ann



 

I used the provided Linux installer for the upgrade.

 

I resolved the issue by manually creating a sequence, which was also missing on a few other tables.  Things are pretty stable now, and I was able to upgrade to 6.9 without any issues.

 

Thanks!

Hi,

Can you please explain to me how to create a sequence manually in PostgresSQL 9.6.9 ? I am facing the same issue on Confluence 6.6.7.

 

Thanks,

Here is what I did:

Assume the table name is: AO_6978BB_RESTRICTED_REF, missing sequence is: AO_6978BB_RESTRICTED_REF_REF_ID_seq, and the sequence is needed around the field: REF_ID

-- select * from "AO_6978BB_RESTRICTED_REF"; --> Check to see if there is data in the table, and double-check the field names

-- SELECT max("REF_ID") from "AO_6978BB_RESTRICTED_REF" --> If there is data in the table it's important to know the largest id / sequence already in it. If there is data here, note what it is.

-- CREATE SEQUENCE "AO_6978BB_RESTRICTED_REF_REF_ID_seq"  INCREMENT BY  1

--      MINVALUE 1  MAXVALUE 9223372036854775807 

--      START WITH 1   NO  CYCLE

--      OWNED BY "AO_6978BB_RESTRICTED_REF"."REF_ID" -> this creates the sequence

-- SELECT setval('"AO_6978BB_RESTRICTED_REF_REF_ID_seq"', 1 , true) --> This sets the sequence value to 1 (which is OK if no data in the table, or you need to change the value to whatever the second command returned +1.

 Hope this helps.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,440 views 110 8
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you