我按照教程Visual Studio Code quickstart并在本地创建了一个持久函数。当我的持久函数在启动函数中执行 await client.startNew 时,我收到一条错误消息
const instanceId = await client.startNew(req.params.functionName, undefined, req.body);
这是错误消息:
执行“Functions.HttpTrigger”(失败,Id=84dc103d-bef9-4450-b4c6-9e612c6dc263)System.Private.CoreLib:执行函数时出现异常:Functions.HttpTrigger。System.Private.CoreLib:结果:失败异常:错误:写入 EPROTO 101057795:错误:140770FC:SSL 例程:SSL23_GET_SERVER_HELLO:未知协议:openssl\ssl\s23_clnt.c:827:堆栈:错误:写入 EPROTO 101057795:错误:140770FC :SSL 例程:SSL23_GET_SERVER_HELLO:未知协议:openssl\ssl\s23_clnt.c:827:在 WriteWrap.afterWrite [as oncomplete] (net.js:864:14) 处的 _errnoException (util.js:992:11)。
我的环境:
- Azure Functions 核心工具 (2.3.148)
- 函数运行时版本(2.0.12210.0)
- 节点.js 8
这是我刚刚从教程中复制的代码。
const df = require("durable-functions");
module.exports = async function (context, req) {
const client = df.getClient(context);
const instanceId = await client.startNew(req.params.functionName, undefined, req.body);
context.log(`Started orchestration with ID = '${instanceId}'.`);
return client.createCheckStatusResponse(context.bindingData.req, instanceId);
};
{
"bindings": [
{
"authLevel": "anonymous",
"name": "req",
"type": "httpTrigger",
"direction": "in",
"route": "orchestrators/{functionName}",
"methods": ["post"]
},
{
"name": "$return",
"type": "http",
"direction": "out"
},
{
"name": "starter",
"type": "orchestrationClient",
"direction": "in"
}
]
}
我该如何解决这个问题?