Getting 'HTTP 415 Unsupported Media' or 'HTTP 404 Not Found' error message when previewing a PPT/PPTX file
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
Confluence fails to preview a PPT/PPTX file.
診断
When loading the preview of the file, it can be observed with your browser Developer Tools that the conversion request returns a HTTP 415 Unsupported Media error when accessing via your Load Balancer or Reverse Proxy, or a HTTP 404 Not Found when accessed Confluence directly (see KB Data Center How to bypass a reverse proxy or SSL in Application Links if you want to validate this behaviour).
The conversion request might look like the following:
https://CONFLUENCE_URL/rest/documentConversion/latest/conversion/convertHD/249299691/1?_=1682403897520
[HTTP/2 415 Unsupported Media Type 284ms]
Despite following KB How to rebuild the file preview cache from scratch in Confluence, the issue remains.
原因
The underlying problem is that the first time the file was converted by the external Sandbox process in Confluence DC, it failed and the preview file in the cache was not completed properly. This implies that following requests to preview this same file will use the cached files and the conversion will not be forced again.
If the preview cached is cleared, a new fresh conversion is triggered. However, it will fail if the root cause of the initial failure was not resolved earlier.
ソリューション
Follow the steps below, as guidance for troubleshooting this situation:
- As initial step, the preview cache file of the specific file that is not converted needs to be cleared.
There are two alternatives in this regard:- The whole preview cache for every file can be cleared following KB How to rebuild the file preview cache from scratch in Confluence
A more fine-grained approach is to find and rename/remove the specific files related to the affected file.
The attachment ID of the PPT/PPTX file can be found in the HTTP request submitted while converting the file.
> cd CONFLUENCE_HOME/shared-home/dcl-document* > find . -name 249299691* > cd CONFLUENCE_HOME/shared-home/dcl-document_hd* > find . -name 249299691* > cd CONFLUENCE_HOME/shared-home/dcl-thumbnail* > find . -name 249299691*
- Once the cache is cleared, enable the Debug mode following the steps on How to enable debug logging to investigate document conversion problems in Confluence's External Process Pool (sandbox)
- Reproduce the issue, accessing to the preview of the affected file. As the cache was cleared, the conversion will take place.
- Investigate any potential error in the
atlassian-confluence.log
file that may indicate why the file is not previewed properly. If the issue is related to the sandbox and the conversion process itself, the Document conversion for Confluence Data Center might be handy. - Perform the necessary modifications to address the issue and confirm that the error is solved.
This is an iterative process, as each try will require the preview cache to be cleared again until the file is properly converted, rendered and previewed.