gpt4 book ai didi

ubuntu - AWS API 网关返回 { "message": "Internal Server Error" } in HTTP proxy integration

转载 作者:行者123 更新时间:2023-12-04 19:29:55 25 4
gpt4 key购买 nike

我已经解决这个问题两天了。我在 AWS 中有一个 HTTP API 网关,其中我有不同的路由与 HTTP 代理集成。例如:
“https://apigateway.domain.com/service/path”路由到“https://service.domain.com/path”。
'apigateway.domain.com' 是在 API 网关上配置的自定义域名,'service.domain.com' 是一个域,其 dns 条目是带有 ubuntu 和 nginx 的 EC2 实例的弹性 IP。
直到今天,我们都有不同的路由都指向一些 EC2 实例和我们在西类牙的主要 Web 应用程序。我们正在配置我们必须提供服务的另一个国家/地区。我们在 us-west-1 区域为它启动了一些 EC2 实例,分配了一个弹性 IP 并创建了它的域名。
问题是我们向 apigateway.domain.com/country/service/path 发出请求,它以 500 状态码回答:

{
"message": "Internal Server Error"
}
如果我直接对 EC2 实例的域名执行相同的请求,它会以 200 状态代码回答我。
对 api 网关的请求没有到达 ec2 机器,因为我在 nginx 日志中找不到该请求。
我尝试使用 Cloudwatch 和 X-ray 调试这种情况,但我没有找到足够的信息:

{ "accountId": "", "apiId": "", "authorizerError":"-", "basePathMatched": "(none)", "fullDomainName": "********","msgString": " "Internal Server Error"", "httpMethod": "GET","integStatus": "200", "requestId":"flJRogGhliAEPUA=", "ip":"138.199.37.68", "requestTime":"19/May/2021:14:36:32 +0000","httpMethod":"GET","routeKey":"ANY /mx/staging/tmc/{proxy+}","status":"500","protocol":"HTTP/1.1", "responseLength":"35", "error":"Internal Server Error", "errorResponseType": "INTEGRATION_FAILURE","integrationErrorMsg": "-", "authorizerError": "-" , "integErrorMsg":"-", "status": "500" }


enter image description here
remote 是指 ec2 实例的域名。
我已经检查了多次安全组,它似乎很好(从我们拥有西类牙主要 ec2 实例的法兰克福地区复制)。我们在这个区域有一个 EC2 实例,并且 api 网关正确地为它做代理,所以我们怀疑在请求到达机器本身(我不知道,iptables 或类似的东西,我不是亲 linux 呵呵)。
如果有人与类似的东西打架,请告诉我们,因为我们已经被阻止了。
谢谢

最佳答案

到达 AWS 支持团队后,结果发现是最终 nginx 服务器上的 SSL 证书存在问题(格式错误)。
他们告诉我他们会改进这个错误信息,因为它不是那么具有描述性。

关于ubuntu - AWS API 网关返回 { "message": "Internal Server Error" } in HTTP proxy integration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67606538/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com