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 start Oasis if loopback device has IPv6 address (OpenBSD) #464

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

Can't start Oasis if loopback device has IPv6 address (OpenBSD) #464

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

Comments

@rapenne-s
Copy link

What's the problem you want solved?

I'm trying to run Oasis on OpenBSD 6.8

  oasis No configuration file found at /home/test/.config/oasis/default.json, using built-in default values. +0ms
  oasis Listening on http://localhost:3000 +855ms
  oasis Starting Scuttlebutt service +0ms
/home/test/oasis/src/index.js:107
    throw err;
    ^

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)
Emitted 'error' event on WebSocketServer instance at:
    at Server.WebSocketServer._onServerError (/home/test/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) {
  code: 'EINVAL',
  errno: 'EINVAL',
  syscall: 'listen',
  address: '::1',
  port: 8989
}

I tried to force the host to be 127.0.0.1 with the config file /home/test/.config/oasis/default.json without better result.

{
 "host": "127.0.0.1"
}

I tried following the build git (git clone, cd into and npm install --only=prod), and I start oasis with node . from the sources directory.

Is there a solution you'd like to recommend?

Disabling all IPv6 address on the loopback device allows to start oasis. This is really a workaround and I don't recommend using it.

ifconfig lo0 -inet6

Default ifconfig lo0 output

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
	index 3 priority 0 llprio 3
	groups: lo
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
	inet 127.0.0.1 netmask 0xff000000
@christianbundy
Copy link
Member

Sorry you're facing this. I don't have a fix, but I'm guessing it's probably somewhere deep in the stack. Is there any interesting info if you run with export DEBUG='*' oasis?

@rapenne-s
Copy link
Author

While trying to run ssb-server separately (for patchfoo) I got the exact same error so I'll report this to ssb-server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants