Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clinic heap triggers ECONNREFUSED #448

Closed
Eomm opened this issue Apr 11, 2023 · 5 comments · Fixed by clinicjs/node-clinic-heap-profiler#136
Closed

Clinic heap triggers ECONNREFUSED #448

Eomm opened this issue Apr 11, 2023 · 5 comments · Fixed by clinicjs/node-clinic-heap-profiler#136

Comments

@Eomm
Copy link
Contributor

Eomm commented Apr 11, 2023

Expected Behavior

Current Behavior

image

{"level":50,"@timestamp":"2023-04-11T06:46:17.072Z","pid":75359,"hostname":"MSpigolon-ITMAC21","err":{"type":"Error","message":"connect ECONNREFUSED ::1:50001","stack":"Error: connect ECONNREFUSED ::1:50001\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)","errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"::1","port":50001},"msg":"connect ECONNREFUSED ::1:50001"}

Steps to Reproduce (for bugs)

  1. clone https://github.com/PacktPublishing/Accelerate-Web-Development-with-Fastify/
  2. cd './Accelerate-Web-Development-with-Fastify/Chapter 13'
  3. npm i
  4. cp .env.sample .env
  5. npm run mongo:start
  6. npm run clinic:heap --> Error: Cannot find module '/Users/mspigolon/workspace/_experiments/Accelerate-Web-Development-with-Fastify/Chapter' this is another bug, the space in the dir broke it.
  7. npm i clinic@12 -g
  8. npm i autocannon@7 -g
  9. so you can run clinic heap --on-port 'autocannon -d 20 -c 100 http://localhost:3000/todos-heap' -- node index.js to get the error above

Sample upload

NA

Environment

  • Clinic.js version: 12.1 and 12.0
  • Node.js version: v18.15.0
  • Browser name and version: NA
  • Operating system and version: OSX 13
@RafaelGSS
Copy link
Contributor

Can you try the --autocannon [ -d 20 -c 100 /todos-heap ] instead of --on-port script?

@Eomm
Copy link
Contributor Author

Eomm commented Apr 12, 2023

Same output :(

image

@jazelly
Copy link

jazelly commented Apr 22, 2023

Error: Cannot find module '/Users/mspigolon/workspace/_experiments/Accelerate-Web-Development-with-Fastify/Chapter' this is another bug, the space in the dir broke it

I'll raise a PR to fix this

@jazelly
Copy link

jazelly commented Apr 22, 2023

Your localhost is treated as IPV6. Can you try with 127.0.0.1

Probably related with mcollina/autocannon#481

jazelly added a commit to jazelly/node-clinic-heap-profiler that referenced this issue Apr 23, 2023
@Eomm
Copy link
Contributor Author

Eomm commented Apr 24, 2023

You made my day!
It is working with the IP. I will remember it for long time!

RafaelGSS pushed a commit to clinicjs/node-clinic-heap-profiler that referenced this issue Apr 29, 2023
* fix: tolerate space when preloading ipc.js

Fixes: clinicjs/node-clinic#448

* test: stricter check on exit code

Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>

---------

Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants