Health check reports bad collation due to failed SQL in postgreSQL

XMLWordPrintable

    • 7.03
    • 52
    • Severity 3 - Minor
    • 2

      Summary

      Seems that the health check incorrectly reports bad collation due to failed SQL in PostgreSQL,

      Environment

      • PostgreSQL 9.3/9.4, 13.5
      • Atlassian Troubleshooting and Support Tools 1.16.0

      Steps to Reproduce

      1. CREATE DATABASE jiradb2 WITH ENCODING 'UNICODE' LC_COLLATE 'C' LC_CTYPE 'C' TEMPLATE template0;
      2. SELECT DISTINCT COALESCE(collation_name, 'DEFAULT') collation_name FROM information_schema.columns WHERE table_schema = Current_schema();

      Expected Results

      Returned correct collation.

      Actual Results

      The below exception is thrown in the atlassian-jira.log file:

      2017-06-06 17:39:49,651 HealthCheck:thread-4 ERROR ServiceRunner [c.a.j.p.healthcheck.support.AbstractSupportHealthCheck] Unhandled error during healthcheck
       java.lang.RuntimeException: Error Checking Collation with query:SELECT DISTINCT coalesce(collation_name,'DEFAULT') collation_name FROM information_schema.columns WHERE table_schema = current_schema()
       at com.atlassian.jira.plugins.healthcheck.support.CollationHealthCheck.lambda$executeQuery$0(CollationHealthCheck.java:117)
       at com.atlassian.jira.database.DatabaseAccessorImpl.executeQuery(DatabaseAccessorImpl.java:67)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
       at com.sun.proxy.$Proxy611.executeQuery(Unknown Source)
       ... 3 filtered
       at java.lang.reflect.Method.invoke(Method.java:498)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
       at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
       at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
       at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
       at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
       at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
       at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
       at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
       at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
       at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
       at com.sun.proxy.$Proxy3234.executeQuery(Unknown Source)
       at com.atlassian.jira.plugins.healthcheck.support.CollationHealthCheck.executeQuery(CollationHealthCheck.java:106)
       at com.atlassian.jira.plugins.healthcheck.support.CollationHealthCheck.doCheck(CollationHealthCheck.java:63)
       at com.atlassian.jira.plugins.healthcheck.support.AbstractSupportHealthCheck.check(AbstractSupportHealthCheck.java:23)
       at com.atlassian.support.healthcheck.impl.PluginSuppliedSupportHealthCheck.check(PluginSuppliedSupportHealthCheck.java:51)
       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)
      
      

      Workaround

      Currently there is no workaround for this behavior. It does not seem to affect any functionality.

            Assignee:
            Unassigned
            Reporter:
            Eric Storch (Inactive)
            Votes:
            21 Vote for this issue
            Watchers:
            32 Start watching this issue

              Created:
              Updated: