Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-45593

Internal administrator health check fails with a SQL error

    XMLWordPrintable

Details

    Description

      Summary

      Version 2.1.9 of the Confluence Instance Health plugin, which is a bug-fix release to correct CONF-45245, causes the internal administrator health check to fail in Confluence versions 5.10.x and below with a SQL error.

      The internal administrator check also fails with a MySQL database, but no error is reported in the logs.

      Environment

      This has been replicated with the Embedded database, PostgreSQL and MySQL. It is likely it affects Oracle and SQL Server also.

      To reproduce

      1. Install Confluence version 5.10.x or 5.9.x
      2. Update the Confluence Instance Health plugin to 2.1.9 (aka Confluence Healthcheck Plugin)
      3. Check the instance health via the Support Tools page

      Expected Results

      The health check proceeds as per expected.

      Actual results

      The health check fails with a SQL exception - the results depend on the database. With PostgreSQL:

      2016-12-16 13:42:33,116 ERROR [SupportHealthCheckThread-1] [healthcheck.directory.internal.InternalAdminCheck] check An error occurred when performing the Internal Administrator User healthcheck:
       -- referer: http://localhost:5108/confluence/plugins/servlet/stp/view/ | url: /confluence/rest/supportHealthCheck/1.0/check/process/ | traceId: 80050b4535a35221 | userName: admin
      net.sf.hibernate.exception.SQLGrammarException: Could not execute query
      	at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:58)
      	at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
      	at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4151)
      	at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1573)
      	at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
      	at net.sf.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:550)
      	at com.atlassian.confluence.plugins.healthcheck.directory.internal.InternalAdminCheck.countUsersInAdminGroupQuery(InternalAdminCheck.java:125)
      	at com.atlassian.confluence.plugins.healthcheck.directory.internal.InternalAdminCheck.check(InternalAdminCheck.java:87)
      	at com.atlassian.support.healthcheck.impl.PluginSuppliedSupportHealthCheck.check(PluginSuppliedSupportHealthCheck.java:41)
      	at com.atlassian.support.healthcheck.concurrent.SupportHealthCheckTask.run(SupportHealthCheckTask.java:33)
      	at com.atlassian.support.healthcheck.concurrent.SupportHealthCheckProcess.run(SupportHealthCheckProcess.java:43)
      	at com.atlassian.support.healthcheck.thread.HealthCheckProcessCallable.call(HealthCheckProcessCallable.java:44)
      	at com.atlassian.support.healthcheck.thread.HealthCheckProcessCallable.call(HealthCheckProcessCallable.java:20)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bytea
        Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
        Position: 581
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
      	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:379)
      	at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:89)
      	at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:880)
      	at net.sf.hibernate.loader.Loader.doQuery(Loader.java:273)
      	at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
      	at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
      	at net.sf.hibernate.loader.Loader.list(Loader.java:1054)
      	at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
      	at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1570)
      	... 13 more 

      Workaround

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              btom1 Brian
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: