OCI Functionsのトラブルシューティング

OCI Functionsの問題をトラブルシューティングする方法、および一般的な問題に対する考えられる解決策をご覧ください。

このトピックでは、OCIファンクションに関連する一般的な問題と、その解決方法について説明します。

次の手法を使用して、エラーまたは問題の詳細を確認します。

  • コンソールの「メトリック」ページの「エラー」チャートを使用して、個々の関数のエラー・コードおよびメッセージを表示します:ファンクションが起動時に予期したとおりに実行または実行されない場合は、コンソールの「メトリック」ページで「エラー」チャートを使用して、そのファンクションのエラー・コードおよびエラー・メッセージを表示できます。詳細は、ファンクション・メトリックを参照してください。
  • トレースを使用したファンクション実行の監視:ファンクションが起動時に予期したとおりに実行または実行されない場合は、トレースを使用して実行およびパフォーマンスの問題をデバッグできます。トレースを使用するには、関数を含むアプリケーションのトレースを有効にしてから、1つ以上の関数に対してトレースを有効にする必要があります。その後、APMトレース・エクスプローラでファンクション・トレースを表示できます。詳細は、関数の分散トレースを参照してください。
  • ファンクション・ログを使用してファンクション呼出し情報を確認します: Oracle Cloud Infrastructure Loggingサービスは、ファンクション・ログのアクセス、検索および格納を行うデフォルトかつ推奨のオプションです。ファンクションのログを格納および表示するには、そのファンクションにprint文が含まれる必要があることに注意してください。詳細は、ファンクション・ログの格納および表示を参照してください。
  • DEBUG=1を使用して、OCI Functionsサービスとの間で送受信されるリクエストおよびレスポンスの詳細を表示します: Fn Project CLIコマンドの使用時に予期しないエラーが発生した場合、OCI Functionsサービスとの間で送受信されるHTTPリクエストおよびレスポンスの詳細を確認できます。文字列DEBUG=1を指定してコマンドを起動し、コマンドを再度実行します。例:

    $ DEBUG=1 fn invoke helloworld-app helloworld-func

    DEBUG=1はコマンドの前に指定する必要があり、DEBUGは大文字にする必要があることに注意してください。

    Oracle Supportと契約し、サポート・チケットを発行する場合は、出力をチケットに添付できます。

    また、ローカル・マシンをOCI Functions開発環境(Fn ProjectのCLIコンテキストで--provider oracleを指定)として設定した場合は、環境変数OCI_GO_SDK_DEBUG=vを設定し、DEBUG=1でコマンドを起動する必要があります。

このトピックの問題は、次の大まかなカテゴリで構成されています。

OCI Functionsの設定および実行

アプリケーションおよびファンクションの作成

エラー番号とメッセージ(ある場合) 説明とリンク
Unable to create your app, please try again. 新規アプリケーションを作成すると、「新規アプリケーション」ダイアログにエラー・メッセージが表示される

アプリケーションおよびファンクションのデプロイ

エラー番号とメッセージ(ある場合) 説明とリンク
unauthorized: incorrect username or password アプリケーションをデプロイすると、「unauthorized: incorrect username or password」メッセージが返される

denied: requested access to the resource is denied

Fn: error running docker push, are you logged into docker?: exit status 1

ファンクションをデプロイすると、「docker pushの実行中にエラーが発生しました。dockerにログインしましたか。」というメッセージが返されます
500: Internal server error ファンクションをデプロイすると、ListTriggersメッセージと500エラーが返される
Image <image-name> does not exist or you do not have access to use it. ファンクションをデプロイすると「イメージが存在しないか、それを使用するためのアクセス権がありません」というメッセージが返される
401: Missing subnets annotation OCI Functionsにファンクションをデプロイすると、「Fn: Missing subnetsotations」メッセージが返されます
Function's image architecture 'x86' is incompatible with the application's shape type 'GENERIC_X86_ARM' ファンクションをOCIファンクションにデプロイすると、「ファンクションのイメージ・アーキテクチャ'x86'に互換性がありません...」というメッセージが返されます
OL8 CloudShell does not support cross-compilation and multi-arch functions builds. Please ensure the architecture of your App matches the CloudShell architecture. ファンクションをクラウド・シェルにOCIファンクションにデプロイすると、「OL8 Cloud Shellは、クロスコンパイルおよびマルチアーカイブ・ファンクション・ビルドをサポートしていません...」というメッセージが返されます
Invalid or unsupported image manifest. Unable to get architecture from the OCIR Manifest/Headers… ファンクションをデプロイすると、「Invalid or unsupported image manifest」が返されます。OCIRマニフェスト/ヘッダーからアーキテクチャを取得できません..."メッセージ

ファンクションの呼出し

エラー番号とメッセージ(ある場合) 説明とリンク

413: Request content too large

FunctionInvokeRequestContentTooLarge

ファンクションを呼び出すと、FunctionInvokeRequestContentTooLargeメッセージおよび413エラーが返されます。

429: User-rate limit exceeded

TooManyRequests

ファンクションを呼び出すと、TooManyRequestsメッセージおよび429エラーが返されます。

444 ファンクションを呼び出すと、クライアントはタイムアウトを報告し、ファンクションのログに444エラーが表示されます
502: Function failed ファンクションを呼び出すと、ファンクションの失敗メッセージおよび502エラーが返されます
502: Syslog endpoint unavailable ファンクションを呼び出すと、FunctionInvokeSyslogUnavailableメッセージおよび502エラーが返される
502: Failed to pull function image ファンクションを呼び出すと、FunctionInvokeImageNotAvailableメッセージおよび502エラーが返される
502: subnet ocid1.subnet.... is out of IPs ファンクションを呼び出すと、FunctionInvokeSubnetOutOfIPsメッセージおよび502エラーが返される
502: subnet ocid1.subnet.... does not exist or Oracle Functions is not authorized to use it ファンクションを呼び出すと、FunctionInvokeSubnetNotAvailableメッセージおよび502エラー(サブネットの問題による)が返される
502: dhcp options ocid1.dhcpoptions.... does not exist or Oracle Functions is not authorized to use it ファンクションを呼び出すと、FunctionInvokeSubnetNotAvailableメッセージおよび502エラー(DHCPオプションの問題による)が返される

502: function response body too large

FunctionInvokeResponseBodyTooLarge

ファンクションを呼び出すと、FunctionInvokeResponseBodyTooLargeメッセージおよび502エラーが戻されます。

502: FunctionInvokeResponseHeaderTooLarge

function response header too large

ファンクションを呼び出すと、FunctionInvokeResponseHeaderTooLargeメッセージおよび502エラーが戻されます。

502: Unable to get resource authorization token due to Function resource matching too many Dynamic Groups. Update your Dynamic Groups' matching rules

FunctionInvokeTooManyMatchingDGs

ファンクションを呼び出すと、FunctionInvokeTooManyMatchingDGsメッセージおよび502エラーが戻されます。

502: error receiving function response

FunctionInvokeExecutionError

ファンクションを呼び出すと、FunctionInvokeExecutionErrorメッセージおよび502エラーが戻されます。

502: function failed

FunctionInvokeExecutionFailed

ファンクションを呼び出すと、FunctionInvokeExecutionFailedメッセージおよび502エラーが戻されます。

502: invalid function response

FunctionInvokeInvalidResponse

ファンクションを呼び出すと、FunctionInvokeInvalidResponseメッセージおよび502エラーが戻されます。

502: Customer subnet DNS resolver error. Please fix the subnet configuration and try again

ファンクションを呼び出すと、FunctionInvokeSubnetConfigErrorメッセージおよび502エラーが戻されます。

502: The combined uncompressed size of all Function images in an application has exceeded the allowed limit. Please reduce the size of the images or number of functions from the application.

関数を呼び出すと、「The combined uncompressed size of all Function images in an application has exceeded the allotted limit....」というメッセージおよび502エラーが返されます。

503: Timed out - server too busy

FunctionInvokeServiceUnavailable

ファンクションを呼び出すと、FunctionInvokeServiceUnavailableメッセージおよび503エラーが返されます。

504: Container failed to initialize, please ensure you are using the latest fdk and check the logs

'ModuleNotFoundError: No module named 'contextvars'

ファンクションを呼び出すと、FunctionInvokeContainerInitFailエラー・メッセージ、504エラーおよびModuleNotFoundError: 'contextvars'という名前のモジュールがないログ・メッセージが返されます
504: Container failed to initialize, please ensure you are using the latest fdk and check the logs ファンクションを呼び出すとFunctionInvokeContainerInitFailおよび「コンテナ初期化のタイムアウト」メッセージ、ならびに504エラーが返される
504: Timed out ファンクションを呼び出すと、FunctionInvokeTimeoutメッセージおよび504エラーが返される

504: Container initialization timed out, please ensure you are using the latest fdk and check the logs

FunctionInvokeContainerInitTimeout

ファンクションを呼び出すと、FunctionInvokeContainerInitTimeoutメッセージおよび504エラーが返されます。

504: Image pull timed out

FunctionInvokeImagePullTimeout

ファンクションを呼び出すと、FunctionInvokeImagePullTimeoutメッセージおよび504エラーが返されます。

その他

エラー番号とメッセージ(ある場合) 説明とリンク
error getting credentials - err: exit status 1, out: Error spawning command line 'dbus-launch --autolaunch... UbuntuでOCIファンクションを実行しているときに、Dockerログインで「error getting credentials - err: exit status 1...」メッセージが返される