GVKun编程网logo

How do I debug error ECONNRESET in Node.js?

7

此处将为大家介绍关于HowdoIdebugerrorECONNRESETinNode.js?的详细内容,此外,我们还将为您介绍关于.netcoreDockerCompose启动问题:Debugging

此处将为大家介绍关于How do I debug error ECONNRESET in Node.js?的详细内容,此外,我们还将为您介绍关于.net core Docker Compose启动问题: Debugging Error, The program to be debug con not be found in the conta、Cocos Code IDE : Internal error logged from DLTKDebugPlugin: Address already in use: JVM_Bind、codeblocks17.12 debug 报错:ERROR: You need to specify a debugger program in the debuggers''s set...、ConnectionRefusedError:[Errno 61]在Mac上,连接拒绝了Python3.8.5的有用信息。

本文目录一览:

How do I debug error ECONNRESET in Node.js?

How do I debug error ECONNRESET in Node.js?

我正在使用 Socket.io 为聊天 webapp 运行 Express.js 应用程序,并且在 24 小时内随机出现大约 5 次以下错误。节点进程被永远包裹起来,它会立即重新启动。

问题是重新启动 Express 会将我的用户踢出他们的房间,而没有人想要这样。

Web 服务器由 HAProxy 代理。没有套接字稳定性问题,只使用 websockets 和 flashsockets 传输。我不能故意复制这个。

这是 Node 的错误v0.10.11

    events.js:72
            throw er; // Unhandled 'error' event
                  ^
    Error: read ECONNRESET     //alternatively it s a 'write'
        at errnoException (net.js:900:11)
        at TCP.onread (net.js:555:19)
    error: Forever detected script exited with code: 8
    error: Forever restarting script for 2 time

编辑 (2013-07-22)

添加了 socket.io 客户端错误处理程序和未捕获的异常处理程序。似乎这个抓住了错误:

    process.on('uncaughtException',function (err) {
      console.error(err.stack);
      console.log("Node NOT Exiting...");
    });

所以我怀疑这不是 Socket.io 问题,而是对我所做的另一台服务器的 HTTP 请求或 MySQL/Redis 连接。问题是错误堆栈不能帮助我识别我的代码问题。这是日志输出:

    Error: read ECONNRESET
        at errnoException (net.js:900:11)
        at TCP.onread (net.js:555:19)

我怎么知道是什么原因造成的?如何从错误中获得更多信息?

好的,不是很冗长,但这是 Longjohn 的堆栈跟踪:

    Exception caught: Error ECONNRESET
    { [Error: read ECONNRESET]
      code: 'ECONNRESET',errno: 'ECONNRESET',syscall: 'read',__cached_trace__:
       [ { receiver: [Object],fun: [Function: errnoException],pos: 22930 },{ receiver: [Object],fun: [Function: onread],pos: 14545 },{},fun: [Function: fireErrorCallbacks],pos: 11672 },fun: [Function],pos: 12329 },pos: 14536 } ],__previous__:
       { [Error]
         id: 1061835,location: 'fireErrorCallbacks (net.js:439)',__location__: 'process.nextTick',__previous__: null,__trace_count__: 1,__cached_trace__: [ [Object],[Object],[Object] ] } }

在这里,我提供闪存套接字策略文件:

    net = require("net")
    net.createServer( (socket) =>
      socket.write("<?xml version=\"1.0\"?>\n")
      socket.write("<!DOCTYPE cross-domain-policy SYSTEM \"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\">\n")
      socket.write("<cross-domain-policy>\n")
      socket.write("<allow-access-from domain=\"*\" to-ports=\"*\"/>\n")
      socket.write("</cross-domain-policy>\n")
      socket.end()
    ).listen(843)

这可能是原因吗?

.net core Docker Compose启动问题: Debugging Error, The program to be debug con not be found in the conta

.net core Docker Compose启动问题: Debugging Error, The program to be debug con not be found in the conta

背景

本地环境:VS2019 + Docker Compose启动并调试程序;

问题:F5启动的时候,时不时会出现如下报错,笔者尝试以下几种路径去寻找问题点;

1)网页浏览时有些api无法访问;

2)docker ps :该api的容器是正常启动的;

3)docker logs containerid  : 该api的容器没有任何日志;

4)查看VS的build以及debug输出框里的日志也无任何迹象;

5)尝试修改docker-compose.yml的内容,时不时会出现该问题很不稳定;

6)百度该提示,没有任何匹配问题;

7)bing国际版能搜到该提示问题,stackoverflow和github上有一些提问,但是没人解答;

8)google该问题,在.net社区有人提了该问题,https://developercommunity.visualstudio.com/t/the-program-to-be-debug-con-not-be-found-in-the-co/1089201

问题跟我一致,.net core 3.1 + docker compose

 

原来是VS的bug,官方团队说在最新版的VS2019上有修复该问题了,回答时间是2020.11

 

 

 

然后检查本地的VS版本,16.5.1,发布时间是2020.5,那难怪会有bug了,更新最新版本的VS 16.9.4

 

 

 原因与结果

最终查到是低版本的VS2019的bug导致了,更新最新版的VS2019即可!

更细的原因是找不到containerid命名的问题,在笔者的项目中有webapitest和webapitest2两个containerid相近,导致了VS找不到webapitest这个容器,不过这都是VS自己的bug,难道要用户去迁就它吗,所以还是最好更新最新版VS2019

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Cocos Code IDE : Internal error logged from DLTKDebugPlugin: Address already in use: JVM_Bind

Cocos Code IDE : Internal error logged from DLTKDebugPlugin: Address already in use: JVM_Bind


使用cocos code ide无法debug。不停地刷Internal error logged from DLTKDebugPlugin: Address already in use: JVM_Bind 查看日记,发现 [LUA-print] Debugger v1.1.0 [LUA-print] Debugger: Trying to connect to 127.0.0.1:10000 ... 问题明朗了,端口10000被占用。 打开cmd,输入netstat -ano|findstr "10000",你会发现类似的输出: TCP 0.0.0:10000 0.0.0:0 LISTENING 6444 在cmd中输入 taskkill/pid 6444 /f,这将会终止PID为6444的进程。该进程终止后,它占用的10000端口也将被释放。

codeblocks17.12 debug 报错:ERROR: You need to specify a debugger program in the debuggers''s set...

codeblocks17.12 debug 报错:ERROR: You need to specify a debugger program in the debuggers''s set...

Debug
ERROR: You need to specify a debugger program in the debuggers''s settings.
(For MinGW compilers, it''s ''gdb.exe'' (without the quotes))
(For MSVC compilers, it''s ''cdb.exe'' (without the quotes))
 

看图片:

 

 

网上查找配置:

1:https://stackoverflow.com/questions/21083560/how-do-you-specify-a-debugger-program-in-codeblocks-12-11/33289596

整理好了,但是会出现只能运行一次:

解决参考:http://tieba.baidu.com/p/3491019377

 

编译器配置:

注意:编译器不是 Codeblocks 自家的 MinGW, 而是 TDM-GCC-64  !!!!!!

 

 

 

 Executable path: D:\Program Files (x86)\CodeBlocks\TDM-GCC-64\bin\gdb64.exe (此处是 编译器 的安装路径,注意: 32 位系统选择 gdb.exe, 64 位系统选择: gdb64.exe)

 

 

运行调试完成的界面:

 

 

 

如何调试参考:http://www.docin.com/p-894823578.html

 

Reference:

https://blog.csdn.net/heda3/article/details/80637294

https://blog.csdn.net/baibaigao/article/details/80990266

 
---------------------
作者:漠北尘 - Gavin
来源:CSDN
原文:https://blog.csdn.net/xrinosvip/article/details/82142146
版权声明:本文为博主原创文章,转载请附上博文链接!

ConnectionRefusedError:[Errno 61]在Mac上,连接拒绝了Python3.8.5

ConnectionRefusedError:[Errno 61]在Mac上,连接拒绝了Python3.8.5

我正在使用IDLE进行编码。是问题所在。我猜IDLE有一个不允许人们做套接字的保护。所以我刚去终端,它终于可以工作了。

我们今天的关于How do I debug error ECONNRESET in Node.js?的分享就到这里,谢谢您的阅读,如果想了解更多关于.net core Docker Compose启动问题: Debugging Error, The program to be debug con not be found in the conta、Cocos Code IDE : Internal error logged from DLTKDebugPlugin: Address already in use: JVM_Bind、codeblocks17.12 debug 报错:ERROR: You need to specify a debugger program in the debuggers''s set...、ConnectionRefusedError:[Errno 61]在Mac上,连接拒绝了Python3.8.5的相关信息,可以在本站进行搜索。

本文标签: