[英]Error Continue wait issue on Cube.js backend
I'm having some trouble connecting to the cube.js backend on AWS serverless and executing the /cubejs-api/v1/load request in the frontend dashboard.我在连接到 AWS serverless 上的 cube.js 后端并在前端仪表板中执行 /cubejs-api/v1/load 请求时遇到了一些问题。 I keep getting
{"error":"Continue wait"}
instead of a result returned.我不断收到
{"error":"Continue wait"}
而不是返回的结果。 I am following the react-dashboard guide for authentication but deployed using the backend cube.js serverless AWS template.我正在遵循 react-dashboard 指南进行身份验证,但使用后端 cube.js 无服务器 AWS 模板进行部署。 This is what my main cube.js file looks like.:
这是我的主要 cube.js 文件的样子。:
const AWSHandlers = require('@cubejs-backend/serverless-aws');
const PostgresDriver = require('@cubejs-backend/postgres-driver');
const fs = require("fs");
const jwt = require("jsonwebtoken");
const jwkToPem = require("jwk-to-pem");
const jwks = JSON.parse(fs.readFileSync("jwks.json"));
const _ = require("lodash");
module.exports = new AWSHandlers({
checkAuth: async (req, auth) => {
const decoded = jwt.decode(auth, { complete: true });
const jwk = _.find(jwks.keys, x => x.kid === decoded.header.kid);
const pem = jwkToPem(jwk);
req.authInfo = jwt.verify(auth, pem);
},
externalDbType: 'postgres',
externalDriverFactory: () => new PostgresDriver({
host: process.env.CUBEJS_EXT_DB_HOST,
database: process.env.CUBEJS_EXT_DB_NAME,
port: process.env.CUBEJS_EXT_DB_PORT,
user: process.env.CUBEJS_EXT_DB_USER,
password: process.env.CUBEJS_EXT_DB_PASS,
})
});
I didn't have the redis URL set correctly initially and fixed the connection to redis after adding redis:// extension before the url to the serverless.yml file to fix that so I know it's not redis connection issue.我最初没有正确设置 redis URL,并在将 redis:// 扩展名添加到 serverless.yml 文件之前修复了与 redis 的连接以解决该问题,因此我知道这不是 redis 连接问题。 I'm assuming there's some other problem.
我假设还有一些其他问题。
The cubejs process function has no logs at all. cubejs 进程函数根本没有日志。 I have setup a NAT gateway and subnets according to the guide on the deployment site so that i have 1 subnet for each zone just for the lambda and they have been added to the new NAT gateway that was created and to the 2 functions so they have internet access.
我已经根据部署站点上的指南设置了 NAT 网关和子网,以便每个区域都有 1 个子网,仅用于 lambda,并且它们已添加到创建的新 NAT 网关和 2 个函数中,因此它们具有互联网。
What could be the issue?可能是什么问题? Did I configure something wrong or do I need to make changes to something?
我是否配置错误或需要更改某些内容?
@cubejs-backend/serverless uses internet connection to access messaging API as well as Redis inside VPC for managing queue and cache. @cubejs-backend/serverless使用互联网连接来访问消息传递 API 以及 VPC 内的 Redis 来管理队列和缓存。
Such continuous Continue wait
messages usually mean that there's a problem with internet connection or with Redis connection .这种连续的
Continue wait
消息通常意味着Internet 连接或Redis 连接存在问题。 If it's Redis you'll usually see timeouts after 5 minutes or so in both cubejs
and cubejsProcess
functions.如果是Redis,您通常会在
cubejs
和cubejsProcess
函数中看到5 分钟左右的超时。 If it's internet connection you will never see any logs of query processing in cubejsProcess
function.如果是互联网连接,您将永远不会在
cubejsProcess
函数中看到任何查询处理日志。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.