jinja2.exceptions.TemplateNotFound

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

Bamboo fails to start when migrating a standalone instance to Kubernetes cluster using Helm chart with an error seen in the UI "Database contains existing data", and with the log;

 INFO:root:Generating /opt/atlassian/bamboo/atlassian-bamboo/WEB-INF/classes/database-defaults/[postgresql].properties from template [postgresql].properties.j2
 Traceback (most recent call last):
   File "/entrypoint.py", line 39, in <module>
     gen_cfg(f"{ATL_DB_TYPE}.properties.j2",
   File "/entrypoint_helpers.py", line 66, in gen_cfg
     cfg = jenv.get_template(tmpl).render(env)
   File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 997, in get_template
     return self._load_template(name, globals)
   File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 958, in _load_template
     template = self.loader.load(self, name, self.make_globals(globals))
   File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 125, in load
     source, filename, uptodate = self.get_source(environment, name)
   File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 214, in get_source
     raise TemplateNotFound(template)
 jinja2.exceptions.TemplateNotFound: [postgresql].properties.j2


原因

  1. Bamboo Exported shared data is not present in the shared volume mount location.
  2. Wrong database connection configuration .

    database:
      type: postgresql
      url:
        - 'jdbc:postgresql://domain:5432/bamboo'

ソリューション

  1. To export Bamboo to a K8 cluster, ensure Bamboo shared home data is exported or present in the shared persistent volume directory.
  2. Use key:value pair for the database URL configuration

    url:jdbc:postgresql://domain:5432/bamboo

    and not list value key:[value]


最終更新日 2023 年 7 月 24 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.