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

mailu_front_1: Error starting userland proxy: listen tcp [::]:995: bind: cannot assign requested address #641

Closed
Jan-Bart opened this issue Oct 9, 2018 · 9 comments

Comments

@Jan-Bart
Copy link

Jan-Bart commented Oct 9, 2018

Hi,

I'm getting this error when listening on both, ipv6 and ipv4 addresses:

mailu_front_1: Error starting userland proxy: listen tcp [::]:995: bind: cannot assign requested address

I know per #321 that you can fix this by removing either BIND_ADDRESS6 or BIND_ADDRESS4.
And indeed, that fixes the issues but is rather a workaround than a fix.

What's the proper way to deal with this issue?
I'm running docker-compose version 1.17 and do not use 0.0.0.0 as ipv4 address ( #537 )
Using notls or letsencrypt doesn't make any difference ( #378 )

Related issues but with workarounds:
#464
#422

@kaiyou
Copy link
Member

kaiyou commented Oct 10, 2018

The proper way is to set an actual IPv6 address instead of ::. Mailu is meant to be listening on a specific IP address, which is the address of your MX record.

@Jan-Bart
Copy link
Author

But you can't use both IPv4 and IPv6?

I'm using an actual IP address for both IPv4 and IPv6.

@kaiyou
Copy link
Member

kaiyou commented Oct 10, 2018

You can use both as long as you specify an actual IP for each one. If you did, then I believe you just found a bug.

@Jan-Bart
Copy link
Author

In that case: I think I found a bug :)

@kaiyou
Copy link
Member

kaiyou commented Oct 10, 2018

What is weird is that docker tries to listen to :: which should not happen if you properly set BIND_ADDRESS6. Could you share at least this part of your .env? (slightly change your IP if you do not wish to share it)

@Jan-Bart
Copy link
Author

Jan-Bart commented Oct 10, 2018

(IP is slightly changed)

# Address where listening ports should bind
BIND_ADDRESS4=00.00.137.241
BIND_ADDRESS6=3b00:4f9:c010:1f0::2


# Main mail domain

@muhlemmer
Copy link
Member

muhlemmer commented Oct 10, 2018

I can reproduce this when using the <link> scoped ip6 address.

@Jan-Bart : Run the following, replacing eth0 to the interface you want to use:

[tim@mars ~]$ ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 5.189.138.127  netmask 255.255.255.0  broadcast 5.189.138.255
        inet6 2a02:c207:2019:6443::1  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::250:56ff:fe3c:b223  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:3c:b2:23  txqueuelen 1000  (Ethernet)
        RX packets 18935526  bytes 25326921818 (23.5 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4657359  bytes 445449606 (424.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

There are 2 inet6 addresses specified. You need to use the one with the <global> scope. If you don't have a <global> scope, it means your DHCP server did not give your interface one or your network does not support ipv6.

@Jan-Bart
Copy link
Author

That was indeed the issue. Thank you verry much @muhlemmer ! :)

muhlemmer added a commit to usrpro/Mailu that referenced this issue Oct 11, 2018
 - Improve advice on IP binding; Follow up on issue Mailu#641
 - mailradar is dead. Found mxtoolbox instead
 - Fix some internal linking
@Techssh
Copy link

Techssh commented Jun 23, 2023

With ipv4, does it work with the IP address of the local interface? or public IP?

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

4 participants