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

ipv6 #81

Open
kusmierz opened this issue Mar 10, 2016 · 5 comments
Open

ipv6 #81

kusmierz opened this issue Mar 10, 2016 · 5 comments

Comments

@kusmierz
Copy link

I'm trying to run MailHog without docker, but it listening only on tcp6, see below.

root@x:~# ./MailHog_linux_amd64 &
[1] 20110
2016/03/10 21:36:06 Using in-memory storage
2016/03/10 21:36:06 [SMTP] Binding to address: 0.0.0.0:1025
[HTTP] Binding to address: 0.0.0.0:8025
Creating API v1
Creating API v2

root@x:~# netstat -lanp | grep 025
tcp6       0      0 :::8025                 :::*                    LISTEN      20110/MailHog_linux
tcp6       0      0 :::1025                 :::*                    LISTEN      20110/MailHog_linux
root@x:~# 
@ian-kent
Copy link
Member

Hi @kusmierz

I'm not able to reproduce it on a mac - does MailHog still work as expected? I'm wondering if it's related to this: https://groups.google.com/forum/#!topic/golang-nuts/F5HE7Eqb6iM

It looks like I could force it to use IPv4, but that would complicate also supporting IPv6

@kusmierz
Copy link
Author

It was on Ubuntu. But it seems each and every linuxes works the same. Try CoreOS on VM or DigitalOcean.

core@digitalocean ~ $ wget 'https://github.com/mailhog/MailHog/releases/download/v0.1.9/MailHog_linux_amd64'
--2016-03-14 09:28:20--  https://github.com/mailhog/MailHog/releases/download/v0.1.9/MailHog_linux_amd64
Resolving github.com... 192.30.252.131
(...)
Resolving github-cloud.s3.amazonaws.com... 54.231.114.138
Connecting to github-cloud.s3.amazonaws.com|54.231.114.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12440776 (12M) [application/octet-stream]
Saving to: 'MailHog_linux_amd64'

MailHog_linux_amd64             100%[========================================================>]  11.86M  5.63MB/s   in 2.1s   

2016-03-14 09:28:23 (5.63 MB/s) - 'MailHog_linux_amd64' saved [12440776/12440776]

core@digitalocean ~ $ chmod a+x MailHog_linux_amd64 
core@digitalocean ~ $ ./MailHog_linux_amd64 &
[1] 5264
2016/03/14 09:28:34 Using in-memory storage
2016/03/14 09:28:34 [SMTP] Binding to address: 0.0.0.0:1025
[HTTP] Binding to address: 0.0.0.0:8025
2016/03/14 09:28:34 Serving under http://0.0.0.0:8025/
Creating API v1 with WebPath: 
Creating API v2 with WebPath: 

core@digitalocean ~ $ sudo netstat -lanp | grep 25
tcp6       0      0 :::8025                 :::*                    LISTEN      5264/./MailHog_linu 
tcp6       0      0 :::1025                 :::*                    LISTEN      5264/./MailHog_linu 
core@digitalocean ~ $

@kusmierz
Copy link
Author

See also moby/moby#13914.

@ian-kent
Copy link
Member

Thanks @kusmierz

I've tested it using CoreOS in a VM, and get the same output as you. But it still works as expected, e.g. using curl -4 http://localhost:8025, which suggests the ports are actually open.

Interestingly, but maybe unrelated - if I follow this guide to remove ipv6 addresses, restart MailHog, then run sudo netstat -lanp | grep 25 again, it still lists only tcp6 ports

Does this bug cause MailHog to break in any way, or does it only affect the output of netstat?

@kusmierz
Copy link
Author

Hm, it's really weird, curl -4 http://localhost:8025 returns output as expected and it's really there.

I'd rather do not turning off ipv6...

Nevertheless, it seems it works very well...

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

2 participants