Terraform-aws-github-runner: ラムダのスケールアップに失敗しました

作成日 2020年11月17日  ·  17コメント  ·  ソース: philips-labs/terraform-aws-github-runner

やあ。 モジュールをセットアップした後、ラムダのスケールアップでエラーが発生しました。
以下のCloudwatchログ:

ERROR   Invoke Error    
{
    "errorType": "Error",
    "errorMessage": "Failed handling SQS event",
    "stack": [
        "Error: Failed handling SQS event",
        "    at _homogeneousError (/var/runtime/CallbackContext.js:12:12)",
        "    at postError (/var/runtime/CallbackContext.js:29:54)",
        "    at callback (/var/runtime/CallbackContext.js:41:7)",
        "    at /var/runtime/CallbackContext.js:104:16",
        "    at /var/task/index.js:16834:16",
        "    at Generator.throw (<anonymous>)",
        "    at rejected (/var/task/index.js:16816:65)",
        "    at processTicksAndRejections (internal/process/task_queues.js:97:5)"
    ]
}

ERROR RequestError [HttpError]: Resource not accessible by integration at /var/task/index.js:15124:23 at processTicksAndRejections (internal/process/task_queues.js:97:5) { status: 403, headers: { 'access-control-allow-origin': '*', 'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset', connection: 'close', 'content-encoding': 'gzip', 'content-security-policy': "default-src 'none'", 'content-type': 'application/json; charset=utf-8', date: 'Tue, 17 Nov 2020 17:51:47 GMT', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', server: 'GitHub.com', status: '403 Forbidden', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', 'transfer-encoding': 'chunked', vary: 'Accept-Encoding, Accept, X-Requested-With', 'x-content-type-options': 'nosniff', 'x-frame-options': 'deny', 'x-github-media-type': 'github.v3; format=json', 'x-github-request-id': '93DE:E7C5:957F272:AC944E7:5FB40DB3', 'x-ratelimit-limit': '5600', 'x-ratelimit-remaining': '5598', 'x-ratelimit-reset': '1605639047', 'x-ratelimit-used': '2', 'x-xss-protection': '1; mode=block' }, request: { method: 'GET', url: 'https://api.github.com/repos/RaketaApp/packer-base-ami/actions/runs?status=queued', headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'octokit-rest.js/18.0.6 octokit-core.js/3.1.1 Node.js/12.18.4 (linux; x64)', authorization: 'token [REDACTED]' }, request: { hook: [Function: bound bound register] } }, documentation_url: 'https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository' }

documentation question

最も参考になるコメント

@npalmはい、許可を得て問題をセルフホストランナーアクセス(読み取りと書き込み

全てのコメント17件

同じエラーが発生しました。アクショングループでアプリの権限を付与してみてください。

@adrianmiron修正しましたか?

同じ問題+1

@npalm助けてくれませんか。

@adrianmiron Actions groupを試しましたが、まだ問題があります。 すべての権限を共有できますか? 私は組織ランナーを試しています。

問題を認識していませんスケールアップラムダがキューからメッセンジャーをフェッチしています。次に、キューに入れられたジョブがまだあるかどうかを確認します。 はいの場合はスケールアップしています。 スケールアップラムダは、キューに30秒間存在するメッセージに対してトリガーされます。 エラーメッセージは、ラムダがAPIの呼び出しを許可されていないことを示しています。

ドキュメントに従ってGitHubアプリがセットアップされているかどうかを確認してください。 スケールアップラムダがトリガーされたため、アプリはリポジトリ用にインストールされているようです。それ以外の場合、イベントは受信されません。 したがって、ほとんどの合法的なものは、権限が正しく設定されていないように見えます。

@ manoj-k-deepr同じエラーの調査から、githubアプリ(実際にリポジトリアクションへのクエリを実行しているアプリ)の権限の問題であることが判明しました。ラムダ-> githubアプリを確認したことを覚えています。物事は5回、それはそうではありませんでした。

組織/レポの許可を得てプリントスクリーンを共有してください。午前中に比較します。

@npalmはい、許可を得て問題をセルフホストランナーアクセス(読み取りと書き込み

Githubアプリの権限に問題がありました。 @npalmドキュメントを更新し、アプリケーションに必要な権限を指定できますか

@mkryvaすばらしいですね。 ドキュメントを更新できるように、問題を開いたままにしておきます。 ドキュメントを改善するためのPRはいつでも歓迎です!

権限を更新した後、次のエラーで失敗します。

ERROR AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances.

UPD:理由は「このアカウントのスポットフリートリクエストの最大数の割り当てに達しました」だったようです。

@mcaulifnによる(ghes)修正の最新のコミット後でも、ラムダのスケールアップに失敗しました


DEBUG   https://enterprise.github.custom.com/api/v3

ERROR   RequestError [HttpError]: request to https://enterprise.github.custom.com/api/v3/app/installations/22/access_tokens 
failed, reason: connect ETIMEDOUT 192.168.1.1:443
    at /var/task/index.js:2797:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async getInstallationAuthentication (/var/task/index.js:266:7) {
  status: 500,
  headers: {},
  request: {
    method: 'POST',
    url: 'https://enterprise.github.custom.com/api/v3/app/installations/22/access_tokens',
    headers: {
      accept: 'application/vnd.github.antiope-preview+json,application/vnd.github.machine-man-preview+json',
      'user-agent': 'octokit-request.js/5.4.12 Node.js/12.19.0 (linux; x64)',
      authorization: 'bearer [REDACTED]',
      'content-length': 0
    }
  }
}

ERROR RequestError [HttpError]: request to https://enterprise.github.custom.com/api/v3/app/installations/22/access_tokens failed, 
reason: connect ETIMEDOUT 192.168.1.1:443 at /var/task/index.js:2797:11 at processTicksAndRejections 
(internal/process/task_queues.js:97:5) at async getInstallationAuthentication (/var/task/index.js:266:7) 
{ status: 500, headers: {}, request: { 
    method: 'POST', url: 'https://enterprise.github.custom.com/api/v3/app/installations/22/access_tokens', 
    headers: { accept: 'application/vnd.github.antiope-preview+json,application/vnd.github.machine-man-preview+json', 
    'user-agent': 'octokit-request.js/5.4.12 Node.js/12.19.0 (linux; x64)', authorization: 'bearer [REDACTED]', 
    'content-length': 0 } } }



ERROR   Invoke Error    
{
    "errorType": "Error",
    "errorMessage": "Failed handling SQS event",
    "stack": [
        "Error: Failed handling SQS event",
        "    at _homogeneousError (/var/runtime/CallbackContext.js:12:12)",
        "    at postError (/var/runtime/CallbackContext.js:29:54)",
        "    at callback (/var/runtime/CallbackContext.js:41:7)",
        "    at /var/runtime/CallbackContext.js:104:16",
        "    at /var/task/index.js:50911:16",
        "    at Generator.throw (<anonymous>)",
        "    at rejected (/var/task/index.js:50893:65)",
        "    at processTicksAndRejections (internal/process/task_queues.js:97:5)"
    ]
}

@buamod GHESを使用していますか? 右? 念のために、ラムダを再構築し、それが使用されていることを確認しましたか?

ETIMEDOUTは、GHESが応答しなかったことを示します。 あなたは代理人の後ろにいますか?

@buamod GHESを使用していますか? 右? 念のために、ラムダを再構築し、それが使用されていることを確認しましたか?

最新のコミットラムダをデプロイし、Ci /build.shスクリプトのdockerコマンドを使用してビルドしました。

ETIMEDOUTは、GHESが応答しなかったことを示します。 あなたは代理人の後ろにいますか?

知らないプロキシがあるかもしれません。 プロキシがあるとしましょう。どうすればそれを渡すことができますか?

@buamodプロキシの要件は大きく異なる可能性があります。 接続を通過させるために必要なものについては、ネットワークチームに問い合わせることをお勧めします。

このページは役に立ちましたか?
0 / 5 - 0 評価