> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# トラブルシューティング

<Info>
  以前のバージョンを使用している場合は、パス名の `overleaf` の代わりに `sharelatex` を使用してください。
</Info>

<Accordion title="NFS ファイルシステムで Overleaf を実行する">
  Overleaf コンテナに NFS ファイルシステムをマウントすることは技術的には可能ですが、推奨されません。さまざまな種類のパフォーマンス上のエラーが発生する可能性があります。

  コンパイル時によく見られるエラーの 1 つは次のとおりです。

  ```text theme={null}
  EBUSY: resource busy or locked, unlink '/var/lib/overleaf/data/compiles/62f3d57bef7cf9005c364e75-62f3d57bef7cf9005c364e7a/.nfs573663533034825247625441'
  ```

  特に、コンパイルデータ用のディレクトリのような一時的なデータに NFS ベースのファイルシステムを使用することはおすすめしません。以下のディレクトリには、ローカルのスクラッチディスク、できればローカルの SSD を使用することを推奨します。

  `docker-compose` ベースの構成では、NFS からのバインドマウントを上書きするだけにすることをおすすめします。これにより、アプリケーション内のパスを変更せずに済みます。以下は、`/scratch` にマウントされたスクラッチディスクを使用する `docker-compose` 設定の抜粋例です。

  ```yaml title="docker-compose excerpt" theme={null}
  services:
    sharelatex:
      environment:
        SANDBOXED_COMPILES_HOST_DIR: /scratch/compiles/
      volumes:
        - nfs:/var/lib/overleaf/data
        - /scratch/cache/:/var/lib/overleaf/data/cache
        - /scratch/compiles/:/var/lib/overleaf/data/compiles
        - /scratch/output/:/var/lib/overleaf/data/output
        - /scratch/tmp/:/var/lib/overleaf/tmp
  ```

  更新後に、既存のファイルを NFS から新しい場所へ移行する必要はありません。LaTeX コンパイラーは、フルコンパイルを再度実行することですべてのファイルを再作成できます。

  詳細は次を参照してください: [https://docs.overleaf.com/on-premises/support/troubleshooting#running-overleaf-with-an-nfs-filesystem](https://docs.overleaf.com/on-premises/support/troubleshooting#running-overleaf-with-an-nfs-filesystem)
</Accordion>

<Accordion title="Windows または macOS で Overleaf を実行すると `mongo` サービスが起動しない">
  Windows または macOS で Overleaf を実行している場合、`mongo` サービスが次のエラーで再起動に失敗することがあります。

  ```text title="Example error" theme={null}
  Failed to start up WiredTiger under any compatibility version.
  Reason: 1: Operation not permitted
  ```

  このエラーを回避するには、データをバインドマウントされたディレクトリではなくボリュームに保存する必要があります（詳細は `mongo` イメージのドキュメントを参照してください: [https://github.com/docker-library/docs/blob/master/mongo/content.md#where-to-store-data）。MongoDB](https://github.com/docker-library/docs/blob/master/mongo/content.md#where-to-store-data）。MongoDB) と Redis のコンテナ内にマウントされた Docker ボリュームにデータを保存するには、`config/docker-compose.override.yml` に以下を追加します（このファイルがまだ存在しない場合は作成してください）。

  ```yaml title="config/docker-compose.override.yml" theme={null}
  volumes:
    mongo-data:
    redis-data:

  services:
    mongo:
      volumes:
        - mongo-data:/data/db

    redis:
      volumes:
        - redis-data:/data
  ```

  詳細は次を参照してください: [https://docs.overleaf.com/on-premises/support/troubleshooting#running-overleaf-on-windows-or-macos-results-in-the-mongoservice-not-starting](https://docs.overleaf.com/on-premises/support/troubleshooting#running-overleaf-on-windows-or-macos-results-in-the-mongoservice-not-starting)
</Accordion>

<Accordion title="Redis 6.2 にアップグレードすると再起動ループが発生する">
  `docker logs redis` コマンドを使用してログのコピーを出力します。

  `Fatal: Can't initialize Background Jobs` という行が表示される場合、出力全体は次のようになります。

  ```text title="Redis log example" theme={null}
  1:M 11 Feb 2024 15:19:22.609 # Server initialized
  1:M 11 Feb 2024 15:19:22.609 # Fatal: Can't initialize Background Jobs.
  1:C 11 Feb 2024 15:19:26.055 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
  ```

  これは現在使用している Docker のバージョンに関連している可能性があります。バージョン 20.10.10 以上に更新すると、この問題は解決するはずです。

  詳細は Redis のアップストリームの issue を参照してください: [https://github.com/redis/redis/issues/12362](https://github.com/redis/redis/issues/12362)

  参考: [https://docs.overleaf.com/on-premises/support/troubleshooting#upgrading-to-redis-6.2-results-in-a-restart-loop](https://docs.overleaf.com/on-premises/support/troubleshooting#upgrading-to-redis-6.2-results-in-a-restart-loop)
</Accordion>

<Accordion title="テンプレートギャラリーのプレビュー／サムネイル画像の向きが正しくない">
  まれに、Server Pro が生成するプレビュー／サムネイル画像が誤った向きで作成され、手動で修正する必要がある場合があります。これらの画像は `/var/lib/overleaf/data/template_files/`（5.0.3 以降）および `/var/lib/sharelatex/data/template_files/`（それ以前）に保存されています。

  変更を加える前に、このフォルダーをバックアップすることを推奨します。

  影響を受けるテンプレートごとに、以下の手順を実行する必要があります。

  テンプレート ID を確認する：インスタンスのテンプレートギャラリー（/templates/all）に移動し、影響を受けるテンプレートを開いて、URL から ID をコピーします（例: [https://your-instance-url/templates/6645d346c224815e9460a695）。修正コマンドを実行する：Docker](https://your-instance-url/templates/6645d346c224815e9460a695）。修正コマンドを実行する：Docker) ホストから次のコマンドを実行します（テンプレート ID をコピーしたものに置き換え、必要に応じてパスを更新してください）：docker exec sharelatex /bin/bash -c "mogrify -rotate 90 /var/lib/overleaf/data/template\_files/6645d346c224815e9460a695\_\*\{thumbnail,preview}"

  参考: [https://docs.overleaf.com/on-premises/support/troubleshooting#incorrect-orientation-of-template-gallery-preview-thumbnail-images](https://docs.overleaf.com/on-premises/support/troubleshooting#incorrect-orientation-of-template-gallery-preview-thumbnail-images)
</Accordion>

<Accordion title="Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'.">
  Community Edition では、すべてのコンパイルが同じ `sharelatex` コンテナ内で行われるため、`\write18` コマンドはデフォルトで無効になっています。これはより安全なデフォルト設定です。

  pdflatex で有効にしたい場合は、プロジェクトのルートに次の内容で `latexmkrc` ファイルを作成してください。

  ```perl title="latexmkrc" theme={null}
  $pdflatex = 'pdflatex --shell-escape';
  ```

  その後、再コンパイルしてみてください。

  参考: [https://docs.overleaf.com/on-premises/support/troubleshooting#please-verify-that-you-have-enabled-system-calls.-for-pdflatex-this-is-pdflatex-shell-escape](https://docs.overleaf.com/on-premises/support/troubleshooting#please-verify-that-you-have-enabled-system-calls.-for-pdflatex-this-is-pdflatex-shell-escape)
</Accordion>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.