> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/ja/sapto/troubleshooting.md).

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

{% hint style="info" %}
以前のバージョンを使用している場合は、次を使用してください `sharelatex` の代わりに `Overleaf` パス名内で。
{% endhint %}

<details>

<summary>NFS ファイルシステムで Overleaf を実行する</summary>

Overleaf コンテナ内で NFS ファイルシステムをマウントすることは技術的には可能ですが、推奨されず、さまざまなパフォーマンスエラーを引き起こす可能性があります。

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

```
EBUSY: リソースが使用中またはロックされています, unlink '/var/lib/overleaf/data/compiles/62f3d57bef7cf9005c364e75-62f3d57bef7cf9005c364e7a/.nfs573663533034825247625441'
```

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

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

{% code title="docker-compose の抜粋" %}

```yaml
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
```

{% endcode %}

更新後に、NFS から新しい保存先へ既存ファイルを移行する必要はありません。LaTeX コンパイラは、完全なコンパイルをもう一度実行すれば、すべてのファイルを再作成できます。

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

</details>

<details>

<summary>Windows または macOS で Overleaf を実行すると、`mongo` サービスが起動しない</summary>

Windows または macOS で Overleaf を実行している場合、 `mongo` サービスが再起動に失敗し、次のエラーが表示されることがあります:

{% code title="エラー例" %}

```
WiredTiger を互換性バージョンのいずれでも起動できませんでした。
理由: 1: 操作が許可されていません
```

{% endcode %}

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

{% code title="config/docker-compose.override.yml" %}

```yaml
volumes:
  mongo-data:
  redis-data:

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

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

{% endcode %}

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

</details>

<details>

<summary>Redis 6.2 へのアップグレードにより再起動ループが発生する</summary>

次を使用してください: `docker logs redis` コマンドでログのコピーを出力します。

次の行が表示される場合 `致命的エラー: バックグラウンドジョブを初期化できません`が表示される場合、全体の出力は次のようになります:

{% code title="Redis ログの例" %}

```
1:M 11 Feb 2024 15:19:22.609 # Server initialized
1:M 11 Feb 2024 15:19:22.609 # 致命的エラー: バックグラウンドジョブを初期化できません。
1:C 11 Feb 2024 15:19:26.055 # oO0OoO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0OoO0Oo
```

{% endcode %}

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

詳細は Redis の upstream issue を参照してください: <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>

</details>

<details>

<summary>テンプレートギャラリーのプレビュー/サムネイル画像の向きが正しくない</summary>

まれに、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> ホストから次のコマンドを実行します（コピーしたテンプレート 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>

</details>

<details>

<summary>システムコールが有効になっていることを確認してください。pdflatex の場合は、これは 'pdflatex -shell-escape' です。</summary>

次の `\write18` \`\write18\` コマンドは、すべてのコンパイルが同じ `sharelatex` コンテナ内で実行されるため、Community Edition ではデフォルトで無効です。これはより安全なデフォルトです。

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

{% code title="latexmkrc" %}

```perl
$pdflatex = 'pdflatex --shell-escape';
```

{% endcode %}

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

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

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/ja/sapto/troubleshooting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
