【发布时间】:2022-01-04 16:28:24
【问题描述】:
我有一个 Hasura 实例在 Docker 容器中运行,而用 NodeJS/Express 编写的动作处理程序 API 直接在机器上运行。
当我在本地测试所有内容时,它就像一个魅力 (macOS M1),但是当我在服务器 (Ubuntu 20.04) 上复制相同的设置时,它返回一个操作处理程序不存在错误。
所有其他查询和突变都运行良好,只是操作返回此错误
您可以看到 Hasura 和 NodeJS 应用程序都在运行
在本地开发中,我的操作处理程序基本 url 是
它工作正常。 我也试过了
http://localhost:5000/api
这是 Hasura 操作调用返回的确切错误
{
"errors": [
{
"extensions": {
"internal": {
"error": {
"type": "http_exception",
"message": "ConnectionFailure Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 0, addrAddress = 0.0.0.0:0, addrCanonName = Nothing}, host name: Just \"host.docker.internal\", service name: Just \"5000\"): does not exist (Name or service not known)"
},
"response": null,
"request": {
"body": {
"session_variables": {
"x-hasura-role": "public"
},
"input": {
"email": "",
"password": ""
},
"action": {
"name": "login"
}
},
"url": "http://host.docker.internal:5000/api/auth/login",
"headers": []
}
},
"path": "$",
"code": "unexpected"
},
"message": "http exception when calling webhook"
}
]
}
【问题讨论】:
标签: docker ubuntu graphql hasura hasura-docker