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

Internal administrator health check fails with a SQL error

      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

            [CONFSERVER-45593] Internal administrator health check fails with a SQL error

            Dave C added a comment -

            Hey it-services538514038, we haven't made any changes to the check since we changed it in 2.1.10, and if there's any exceptions thrown during the check it fails over to a previous internal admin check that doesn't use hibernate to query the database, so won't report the failure as per the stack trace in this issue.

            I tested with 5.9.14 and 5.10.8 on 2.4.1 Confluence Instance Health and wasn't able to reproduce this. Unfortunately we don't have much info about the environment so I may not have tested with the same things, and it may be a different problem.

            So we can investigate further could you please create a support case at https://support.atlassian.com/contact/ and we can take a further look into it. I suspect it might be a different problem but would need more info to verify it.

            Dave C added a comment - Hey it-services538514038 , we haven't made any changes to the check since we changed it in 2.1.10, and if there's any exceptions thrown during the check it fails over to a previous internal admin check that doesn't use hibernate to query the database, so won't report the failure as per the stack trace in this issue. I tested with 5.9.14 and 5.10.8 on 2.4.1 Confluence Instance Health and wasn't able to reproduce this. Unfortunately we don't have much info about the environment so I may not have tested with the same things, and it may be a different problem. So we can investigate further could you please create a support case at https://support.atlassian.com/contact/ and we can take a further look into it. I suspect it might be a different problem but would need more info to verify it.

            IT-Services added a comment - - edited

            Version 2.4.1 (or earlier version) reintroduced this bug.

            Could you please reinvestigate and (if need be) reopen the issue?

            IT-Services added a comment - - edited Version 2.4.1 (or earlier version) reintroduced this bug. Could you please reinvestigate and (if need be) reopen the issue?

            Dave C added a comment -

            Hey all, this has been resolved in the Confluence Instance Health version 2.1.10 released at the Atlassian Marketplace. You can either update through the Manage Add-ons section or download the latest version and upload it manually.

            CONF-45245 is still open as we're actively looking at a way to fix that bug without causing any others.

            Cheers

            Dave C added a comment - Hey all, this has been resolved in the Confluence Instance Health version 2.1.10 released at the Atlassian Marketplace . You can either update through the Manage Add-ons section or download the latest version and upload it manually. CONF-45245 is still open as we're actively looking at a way to fix that bug without causing any others. Cheers

            Minh Tran added a comment -

            Dear btom1

            This ticket has been marked as duplicate. Please follow the progress here https://jira.atlassian.com/browse/CONF-45245

            Thanks,
            Minh Tran
            Confluence BugMaster
            Atlassiano

            Minh Tran added a comment - Dear btom1 This ticket has been marked as duplicate. Please follow the progress here https://jira.atlassian.com/browse/CONF-45245 Thanks, Minh Tran Confluence BugMaster Atlassiano

              Unassigned Unassigned
              btom1 Brian
              Affected customers:
              0 This affects my team
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: