performance-analyzer warnings in bundled search server logs

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 8.9.0
    • Affects Version/s: 8.3.4, 8.4.3, 8.5.2, 8.6.0
    • Component/s: Installation, Search
    • None
    • Severity 3 - Minor

      Issue Summary

      If a version of Bitbucket with bundled OpenSearch 1.3.1 was installed or upgraded to:

      • Bitbucket 8.10 - 8.1.5
      • Bitbucket 8.2.0 - 8.2.4
      • Bitbucket 8.3.0 - 8.3.3
      • Bitbucket 8.4.0 - 8.4.2
      • Bitbucket 8.5.0 - 8.5.1

      and then Bitbucket is upgraded to a version with bundled OpenSearch 1.3.5 or higher:

      • Bitbucket 8.3.4 or later bugfix version
      • Bitbucket 8.4.3 or later bugfix version
      • Bitbucket 8.5.2 or later bugfix version
      • Bitbucket 8.6 or later

      then the bundled search server logs will contain a WARN relating to the search performance-analyzer plugin once every time the bundled search server is started.

      Note that the bundled OpenSearch performance-analyzer plugin is not used by Bitbucket, so search functionality is not impacted. The bug here is the WARN being logged on every startup.

      If upgrading Bitbucket from a version prior to including bundled OpenSearch 1.3.1 directly to a version containing OpenSearch 1.3.5 or higher (e.g. Bitbucket 8.0.0 to 8.6.0) then this bug will not occur. Similarly if installing a fresh installation of Bitbucket with bundled OpenSearch 1.3.5 then this bug will not occur.

      This bug only impacts the bundled search server (in the upgrading conditions described above). This has no impact if using an external search server.

      This is reproducible on Data Center: yes (Single Node Data Center using the bundled search server only)

      Steps to Reproduce

      1. Install (or upgrade to) Bitbucket with bundled OpenSearch 1.3.1.
      2. Start Bitbucket (including the bundled search server) then stop Bitbucket.
      3. Upgrade to Bitbucket with bundled OpenSearch 1.3.5 or higher.
      4. Start Bitbucket.

      Expected Results

      No performance-analyzer warnings in the bundled search logs.

      Actual Results

      The following is logged in the log/search/bundled_search.log file:

      [2023-01-12T11:04:48,503][ERROR][o.o.p.c.PluginSettings   ] [bitbucket_bundled] Loading config file /var/atlassian/application-data/bitbucket/shared/search/config/opensearch-performance-analyzer/performance-analyzer.properties
      failed with error: org.opensearch.performanceanalyzer.config.ConfigFileException: java.io.FileNotFoundException: /var/atlassian/application-data/bitbucket/shared/search/config/opensearch-performance-analyzer/performance-analyze
      r.properties (No such file or directory). Disabling plugin.
      [2023-01-12T11:04:48,503][INFO ][o.o.p.c.PluginSettings   ] [bitbucket_bundled] Config: metricsLocation: /dev/shm/performanceanalyzer/, metricsDeletionInterval: 1, httpsEnabled: false, cleanup-metrics-db-files: fa
      lse, batch-metrics-retention-period-minutes: 7, rpc-port: 9650, webservice-port 9600
      [2023-01-12T11:04:48,770][ERROR][o.o.p.c.StatsCollector   ] [bitbucket_bundled] Error in loading metadata for folderLocation: /var/atlassian/application-data/bitbucket/shared/search/config/opensearch-performance-analyzer/, file
      Location: plugin-stats-metadata
      java.io.FileNotFoundException: /var/atlassian/application-data/bitbucket/shared/search/config/opensearch-performance-analyzer/plugin-stats-metadata (No such file or directory)
              at java.io.FileInputStream.open0(Native Method) ~[?:1.8.0_352]
              at java.io.FileInputStream.open(FileInputStream.java:195) ~[?:1.8.0_352]
              at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[?:1.8.0_352]
              at java.io.FileInputStream.<init>(FileInputStream.java:93) ~[?:1.8.0_352]
              at org.opensearch.performanceanalyzer.collectors.StatsCollector.loadMetadata(StatsCollector.java:148) [performanceanalyzer-rca-1.3.7.0.jar:?]
              at org.opensearch.performanceanalyzer.collectors.StatsCollector.instance(StatsCollector.java:68) [performanceanalyzer-rca-1.3.7.0.jar:?]
              at org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin.<init>(PerformanceAnalyzerPlugin.java:217) [opensearch-performance-analyzer-1.3.7.0.jar:1.3.7.0]
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [?:1.8.0_352]
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_352]
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_352]
              at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_352]
              at org.opensearch.plugins.PluginsService.loadPlugin(PluginsService.java:783) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.plugins.PluginsService.loadBundle(PluginsService.java:728) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.plugins.PluginsService.loadBundles(PluginsService.java:530) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.plugins.PluginsService.<init>(PluginsService.java:193) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.node.Node.<init>(Node.java:396) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.node.Node.<init>(Node.java:319) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:242) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:412) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:178) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:169) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:100) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138) [opensearch-cli-1.3.7.jar:1.3.7]
              at org.opensearch.cli.Command.main(Command.java:101) [opensearch-cli-1.3.7.jar:1.3.7]
              at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:135) [opensearch-1.3.7.jar:1.3.7]
              at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:101) [opensearch-1.3.7.jar:1.3.7] 

      This WARN will be logged once every time the bundled search server is started.

      Workaround

      Given there is no impact to Bitbucket search functionality it is recommended to wait until the bug is fixed then upgrade to a fixed version.

      However the following workaround will simulate the fix:

      1. Stop Bitbucket and the bundled search server
      2. Delete the $BITBUCKET_HOME/shared/search/config/.version file
      3. Start Bitbucket and the bundled search server

      This will force on startup the bundled search config to backed up then re-copied from the Bitbucket installation directory into the search config directory, including the performance-analyzer configuration files.

            Assignee:
            Stefan
            Reporter:
            Stefan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: