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

Can't run ssb-server on OpenBSD if one interface has IPv6 #742

Open
rapenne-s opened this issue Nov 25, 2020 · 3 comments
Open

Can't run ssb-server on OpenBSD if one interface has IPv6 #742

rapenne-s opened this issue Nov 25, 2020 · 3 comments

Comments

@rapenne-s
Copy link

Hi!

I've run into an issue when running oasis on OpenBSD 6.8 amd64 and arm64, which I've been able to pinpoint down to ssb-server.

If one network interface has an IPv6 assigned, ssb-server will error on start.

I'm not really sure if the issue comes from ssb-server or a dependency. I am not familiar with the JS ecosystem and the errors doesn't make it easy to know where the error is.

Maybe it's from node_modules/ws/lib/WebSocketServer.js but the ws plugin installed in node_modules by npm install downloaded version 1.1.5 of ws which is 3 years old. On the other hand I've run npm test in ssbc/ssb-ws and the test passes fine. I'm quite lost here.

kongroo$ node bin.js  start
ssb-server 16.0.1 /home/testuser/.ssb logging.level:notice
my key ID: itpstBRGhNXHafcJBGKVa6fh1+YVz8UzyHFGxtOqqkU=.ed25519
events.js:288
      throw er; // Unhandled 'error' event
      ^

Error: listen EINVAL: invalid argument ::1:8989
    at Server.setupListenHandle [as _listen2] (net.js:1292:21)
    at listenInCluster (net.js:1357:12)
    at doListen (net.js:1496:7)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
    at runNextTicks (internal/process/task_queues.js:66:3)
    at processImmediate (internal/timers.js:429:9)
Emitted 'error' event on WebSocketServer instance at:
    at Server.WebSocketServer._onServerError (/home/testuser/ssb-server/node_modules/ws/lib/WebSocketServer.js:82:50)
    at Server.emit (events.js:311:20)
    at emitErrorNT (net.js:1336:8)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
    at runNextTicks (internal/process/task_queues.js:66:3)
    at processImmediate (internal/timers.js:429:9) {
  code: 'EINVAL',
  errno: 'EINVAL',
  syscall: 'listen',
  address: '::1',
  port: 8989
}
@staltz
Copy link
Member

staltz commented Nov 30, 2020

Probably a multiserver issue, not strictly ssb-server

@rapenne-s
Copy link
Author

Do you mean this multiserver ?

@hackergrrl
Copy link
Contributor

hackergrrl commented Mar 25, 2021

@rapenne-s Yes, that module.

If you run ssb-server as DEBUG=* node bin.js start do you get any interesting-looking debug messages before Node errors out?

Also: what version of Node are you on?

(I'm low-key wondering if nodejs/node#16712 could be the culprit.)

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

No branches or pull requests

3 participants