Skip to content

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

@rapenne-s

Description

@rapenne-s

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions