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

[Feature request]: Actual Server fails to start when host has IPV6 disabled #336

Open
1 task done
Krupski19 opened this issue Apr 11, 2024 · 6 comments
Open
1 task done
Labels
feature New feature or request

Comments

@Krupski19
Copy link

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

When trying to start actual-server locally or through Docker on a host that has IPv6 disabled, the server fails to start as it tries to bind port 5006 to :: on IPV6. With IPV6 being disabled on the host through the kernel, the bind fails and actual-server is unable to start.

What error did you receive?

Checking if there are any migrations to run for direction "up"...

Migrations: DONE

Listening on :::5006...

node:events:495

      throw er; // Unhandled 'error' event

      ^

Error: listen EAFNOSUPPORT: address family not supported :::5006

    at Server.setupListenHandle [as _listen2] (node:net:1800:21)

    at listenInCluster (node:net:1865:12)

    at doListen (node:net:2014:7)

    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

Emitted 'error' event on Server instance at:

    at emitErrorNT (node:net:1844:8)

    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {

  code: 'EAFNOSUPPORT',

  errno: -97,

  syscall: 'listen',

  address: '::',

�

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Other

Operating System

Linux

@Krupski19 Krupski19 added the bug Something isn't working label Apr 11, 2024
@MatissJanis MatissJanis changed the title [Bug]: Actual Server fails to start when host has IPV6 disabled [Feature request]: Actual Server fails to start when host has IPV6 disabled Apr 13, 2024
@MatissJanis MatissJanis added feature New feature or request and removed bug Something isn't working labels Apr 13, 2024
@etay1
Copy link

etay1 commented May 16, 2024

Hi, is anyone working on this feature already or can I hack at it?

@dl1ch
Copy link

dl1ch commented May 24, 2024

Just add "ACTUAL_HOSTNAME=0.0.0.0" to your environment variable and should work.

@DarkWolfSLV
Copy link

Just add "ACTUAL_HOSTNAME=0.0.0.0" to your environment variable and should work.

Can you elaborate on the workaround?

@dl1ch
Copy link

dl1ch commented Oct 24, 2024

Well, the mentioned variable sets the listening IP to all IPv4 interfaces so it doesn't try to listen on any IPv6 interface, thus not causing the mentioned errors by the OP. This solved the same issue when I tried to run the containerized version of actual server.

@DarkWolfSLV
Copy link

Well, the mentioned variable sets the listening IP to all IPv4 interfaces so it doesn't try to listen on any IPv6 interface, thus not causing the mentioned errors by the OP. This solved the same issue when I tried to run the containerized version of actual server.

Sorry, I'm new to this, but to which file exactly do you add "ACTUAL_HOSTNAME=0.0.0.0"? In Ubuntu I tried with export "server1=0.0.0.0" or adding it to /etc/environment, which didn't solve the crash. Does it need to be added directly to one of the container files?

@daveofca
Copy link

daveofca commented Oct 24, 2024 via email

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

No branches or pull requests

6 participants