你好。 设置模块后,我在 lambda 扩展方面出错。
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'
}
我遇到了同样的错误,尝试在操作组上授予应用程序权限。
@adrianmiron你修好了吗?
同样的问题+1
@npalm你能帮我吗?
@adrianmiron我尝试了 Actions 组,但仍然有问题。 你能分享你的所有权限吗? 我正在尝试组织跑步者。
我不认识这个问题 扩大 lambda 正在从队列中获取消息,接下来它检查是否还有排队的作业。 如果是,它正在扩大规模。 对于队列中 30 秒的消息,会触发向上扩展 lambda。 错误消息表示不允许 lambda 调用 API。
请您检查是否根据文档设置了 GitHub 应用程序。 由于您的扩展 lambda 被触发,似乎该应用程序已为回购安装,否则不应收到任何事件。 所以大多数ligical看起来权限设置不正确。
@manoj-k-deepr 从我对同一错误的调查来看,原来是 github 应用程序的权限问题(实际上是对 repo 操作进行查询的那个。我记得我浏览了 lambda -> 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:看起来原因是“您已达到此帐户的最大 Spot 队列请求配额”。
扩大 lambda 对我来说失败了,即使在@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 吗? 对? 可以肯定的是,您是否重建了 lambda,并确保使用它?
ETIMEDOUT
表示 GHES 没有回应。 你在代理后面吗?
@buamod您正在使用 GHES 吗? 对? 可以肯定的是,您是否重建了 lambda,并确保使用它?
我确实部署了最新的提交 lambda,我确实使用 Ci/build.sh 脚本中的 docker 命令构建了它们。
ETIMEDOUT
表示 GHES 没有回应。 你在代理后面吗?
可能有一个我不知道的代理。 假设有一个代理,我将如何通过它?
@buamod代理要求可能
最有用的评论
@npalm是的,许可问题。 我通过在组织中提供自托管运行器访问(读和写)来解决这个问题。 在文档中没有提到跑步者权限。