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

fix: intermittent error when asking for interfaces #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikeal
Copy link

@mikeal mikeal commented Dec 27, 2020

I’m seeing a strange error in newer versions of Node.js. For some reason, libuv doesn’t like it when you ask for the network interfaces too much. Eventually you get an error like this:

os.js:64
      throw new ERR_SYSTEM_ERROR(ctx);
      ^
  
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_interface_addresses returned Unknown system error 24
(Unknown system error 24)
    at Object.networkInterfaces (os.js:203:16)
    at allInterfaces (/root/IPSQL/node_modules/multicast-dns/index.js:167:21)
    at Timeout.that.update [as _onTimeout] (/root/IPSQL/node_modules/multicast-dns/index.js:124:63)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7) {
  code: 'ERR_SYSTEM_ERROR',
  info: {
    errno: 24,
    code: 'Unknown system error 24',
    message: 'Unknown system error 24',
    syscall: 'uv_interface_addresses'
  },  
  errno: [Getter/Setter],
  syscall: [Getter/Setter]
}

It seems very unnecessary to ask for the network interfaces so often since they aren’t expected to change during the lifecycle of the program so this is also just more efficient.

I’m seeing a strange error in newer version of Node.js. For some reason, libuv doesn’t like it when you ask for the network interfaces too much. Eventually you get an error like this:

```
os.js:64
      throw new ERR_SYSTEM_ERROR(ctx);
      ^
  
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_interface_addresses returned Unknown system error 24
(Unknown system error 24)
    at Object.networkInterfaces (os.js:203:16)
    at allInterfaces (/root/IPSQL/node_modules/multicast-dns/index.js:167:21)
    at Timeout.that.update [as _onTimeout] (/root/IPSQL/node_modules/multicast-dns/index.js:124:63)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7) {
  code: 'ERR_SYSTEM_ERROR',
  info: {
    errno: 24,
    code: 'Unknown system error 24',
    message: 'Unknown system error 24',
    syscall: 'uv_interface_addresses'
  },  
  errno: [Getter/Setter],
  syscall: [Getter/Setter]
}
```

It seems very unnecessary to ask for the network interfaces so often since they aren’t expected to change during the lifecycle of the program so this is also just more efficient.
mikeal added a commit to libp2p/js-libp2p-tcp that referenced this pull request Dec 27, 2020
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 this pull request may close these issues.

1 participant