fraction / oasis

Free, open-source, peer-to-peer social application that helps you follow friends and discover new ones on Secure Scuttlebutt (SSB).
http://oasis-demo.fraction.io
GNU Affero General Public License v3.0
286 stars 42 forks source link

Getting Error: listen EINVAL: invalid argument ::1:8989 on OpenBSD #610

Closed samebchase closed 3 years ago

samebchase commented 3 years ago

What's the problem you want solved?

Hello, I am attempting to run an older version of Oasis, as I cannot compile the latest version of Oasis on OpenBSD due to https://github.com/libvips/libvips/discussions/2100

This is the error I get for commit f68dd8fbe53974e2ab69cd269d100f08fd0c3190

> node .
  oasis No configuration file found at /home/samuel/.config/oasis/default.json, using built-in default values. +0ms
error loading sodium bindings: Cannot find module 'sodium-native'
Require stack:
- /home/samuel/src/oasis/node_modules/chloride/bindings.js
- /home/samuel/src/oasis/node_modules/chloride/index.js
- /home/samuel/src/oasis/node_modules/ssb-keys/index.js
- /home/samuel/src/oasis/node_modules/ssb-client/index.js
- /home/samuel/src/oasis/src/ssb.js
- /home/samuel/src/oasis/src/index.js
falling back to javascript version.
  oasis Listening on http://localhost:3000 +394ms
  oasis Starting Scuttlebutt service +0ms
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/samuel/src/oasis/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
}

From what I can gather online ::1 is the ipv6 IP for localhost.

Powersource commented 3 years ago

Are you saying that apart from libvips/libvips#2100 and this you'd expect oasis to work on openbsd? Otherwise idk if we're officially supporting it.

rapenne-s commented 3 years ago

It should work, I wrote a blog post about the setup.

I guess that ipv6 must also be disabled on all interfaces to have the compilation issue resolved here, this is a bug on OpenBSD but I can't find which node package is causing this.

samebchase commented 3 years ago

Ah thanks @rapenne-s, let me disabling ipv6 and try again.

samebchase commented 3 years ago

Okay, the trick linked by @rapenne-s worked.