7***@qq.com
7***@qq.com
  • 发布:2020-11-04 09:21
  • 更新:2021-06-28 11:58
  • 阅读:1325

uniCloud云函数报错socket hang up

分类:uniCloud

请求入参: {
"args": {
"action": "dogdiaryall",
"type": "dog",
"clientInfo": {
"PLATFORM": "mp-weixin",
"OS": "android",
"APPID": "UNI88C4A96",
"CLIENT_SDK_VERSION": "1.0.0"
},
},
"requestId": "ac1415321604452016470422175"
}
[dogdiary/ac1415321604452016470422175/7ms/ERROR] Error: socket hang up
at createHangUpError (_http_client.js:331:15)
at TLSSocket.socketCloseListener (_http_client.js:363:23)
at emitOne (events.js:121:20)
at TLSSocket.emit (events.js:211:7)
at _handle.close (net.js:554:12)
at TCP.done [as _onclose] (_tls_wrap.js:356:7)
请求响应状态: fail

这个报错经常出现,请问下是什么原因

2020-11-04 09:21 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

重新部署一下你的云函数,这个问题已经解决了需要重新部署生效

2***@qq.com

2***@qq.com

还是会出现这个问题,只不过不是每次出现,而是一定的概率

请求入参: {
"args": {
"path": "/",
"httpMethod": "GET",
"headers": {
"cookie": "acw_tc=276077e016247177416068283e9914b0a7bc77a0e751f37a1e769150ca5ed0",
"postman-token": "b9dc4735-d5c6-4671-bf32-2cac90625bf1",
"x-forwarded-for": "103.110.93.70",
"accept": "/",
"x-real-ip": "103.110.93.70",
"host": "f0a4843a-0c13-4bd8-b784-933245cc8871.bspapp.com",
"x-forwarded-by": "172.20.28.18:80",
"user-agent": "PostmanRuntime/7.26.8"
},
"queryStringParameters": {
"action": "devices/getDeviceSecret",
"deviceName": "860222047504526"
},
"isBase64Encoded": false,
"body": ""
},
"requestId": "ac141c121624717788690127232"
}
[admin/ac141c121624717788690127232/6ms/ERROR] socket hang upPOST https://iot.cn-shanghai.aliyuncs.com/?Action=QueryDeviceDetail&Format=json&Version=2018-01-20&Timestamp=2021-06-26T14%3A29%3A48Z&SignatureNonce=278ab6fa224b23738b9589565ed31879&SignatureMethod=HMAC-SHA1&SignatureVersion=1.0&AccessKeyId=uTUSKDmOFVhmNCRa&Signature=1p8XMSX5auhaul%2FTdqULaPNJsZY%3D failed.
Error: socket hang upPOST https://iot.cn-shanghai.aliyuncs.com/?Action=QueryDeviceDetail&Format=json&Version=2018-01-20&Timestamp=2021-06-26T14%3A29%3A48Z&SignatureNonce=278ab6fa224b23738b9589565ed31879&SignatureMethod=HMAC-SHA1&SignatureVersion=1.0&AccessKeyId=uTUSKDmOFVhmNCRa&Signature=1p8XMSX5auhaul%2FTdqULaPNJsZY%3D failed.
at createHangUpError (_http_client.js:331:15)
at TLSSocket.socketCloseListener (_http_client.js:363:23)
at emitOne (events.js:121:20)
at TLSSocket.emit (events.js:211:7)
at _handle.close (net.js:554:12)
at TCP.done [as _onclose] (_tls_wrap.js:356:7)
请求响应状态: success

DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

你的云函数返回了,但是请求没有结束是吗?

该问题目前已经被锁定, 无法添加新回复