Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Heartbeat Node
Heartbeat Node
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Ind.ie Projects
  • Heartbeat NodeHeartbeat Node
  • Issues
  • #30

Closed
Open
Opened Jan 24, 2015 by Aral Balkan@aralMaintainer
  • Report abuse
  • New issue
Report abuse New issue

Handle orphaned node process EADDRINUSE gracefully (and recover)

Current workaround as documented in the readme:

[2015-01-24 17:51:54:375] info  - Pulse Process | Pulse REST API is ready.
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: listen EADDRINUSE
  at exports._errnoException (util.js:742:11)
  at Server._listen2 (net.js:1148:14)
  at listen (net.js:1170:10)
  at net.js:1253:9
  at dns.js:82:18
  at process._tickCallback (node.js:343:11)

This is the point when NodeSocket attemtps to create the web socket connection.

Check that a node process has not been left on port 8000 with:

lsof -i tcp:8000

If it has, you’ll get something like this back:

COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
node    54866 aral   18u  IPv4 0xaa9f31e18a8024bb      0t0  TCP *:irdmi (LISTEN)

Then kill the PID e.g.

kill 54866
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
2
Labels
bug edge case
Assign labels
  • View project labels
Reference: project/heartbeat-node#30

Like this? Fund us! Your patronage helps keep us independent and going.