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

Panic when using -ui-bind-addr (flag redefined: listen) #42

Closed
nayyden opened this issue Mar 27, 2015 · 3 comments
Closed

Panic when using -ui-bind-addr (flag redefined: listen) #42

nayyden opened this issue Mar 27, 2015 · 3 comments
Labels

Comments

@nayyden
Copy link

nayyden commented Mar 27, 2015

Problem

I get panic when trying to override the UI or API bind address.

Version

v0.1.6 binary release

Trace:

$ ./MailHog_linux_amd64 -ui-bind-addr=":8026"

2015/03/27 13:10:47 Using in-memory storage
[HTTP] Binding to address: 0.0.0.0:8025
Creating API v1
Creating API v2
Starting application on 0.0.0.0:8025
[HTTP] Binding to address: :8026
./MailHog_linux_amd64 flag redefined: listen
panic: ./MailHog_linux_amd64 flag redefined: listen

goroutine 7 [running]:
flag.(*FlagSet).Var(0xc2080640c0, 0x7f6073a823c8, 0xc2080c0fc0, 0x8f59a0, 0x6, 0x99dd10, 0x36)
    /usr/local/Cellar/go/1.4/libexec/src/flag/flag.go:679 +0x494
flag.StringVar(0xc2080c0fc0, 0x8f59a0, 0x6, 0x0, 0x0, 0x99dd10, 0x36)
    /usr/local/Cellar/go/1.4/libexec/src/flag/flag.go:588 +0xce
github.com/ian-kent/gotcha/config.(*Config).flags(0xc20804f8b0)
    /Users/ikent/dev/src/github.com/ian-kent/gotcha/config/config.go:52 +0x7d
github.com/ian-kent/gotcha/config.Create(0x9e4d28, 0x449240)
    /Users/ikent/dev/src/github.com/ian-kent/gotcha/config/config.go:39 +0x224
github.com/ian-kent/gotcha/app.Create(0x9e4d28, 0x2)
    /Users/ikent/dev/src/github.com/ian-kent/gotcha/app/app.go:18 +0x28
github.com/mailhog/http.Listen(0x7fff87f6922b, 0x5, 0x9e4d28, 0xc2080643c0, 0x9e56c0)
    /Users/ikent/dev/src/github.com/mailhog/http/server.go:11 +0x14b
created by main.main
    /Users/ikent/dev/src/github.com/mailhog/MailHog/main.go:50 +0x316

goroutine 1 [chan receive]:
main.main()
    /Users/ikent/dev/src/github.com/mailhog/MailHog/main.go:56 +0x186

goroutine 6 [chan receive]:
github.com/mailhog/http.Listen(0x906110, 0xc, 0x9e4d28, 0xc2080643c0, 0x9e56b8)
    /Users/ikent/dev/src/github.com/mailhog/http/server.go:18 +0x1e6
created by main.main
    /Users/ikent/dev/src/github.com/mailhog/MailHog/main.go:49 +0x2c7

goroutine 8 [runnable]:
github.com/mailhog/MailHog-Server/smtp.Listen(0xc2080ba410, 0xc2080643c0, 0x9e4d28)
    /Users/ikent/dev/src/github.com/mailhog/MailHog-Server/smtp/smtp.go:11
created by main.main
    /Users/ikent/dev/src/github.com/mailhog/MailHog/main.go:52 +0x14a

goroutine 9 [runnable]:
github.com/mailhog/MailHog-Server/api.func·001()
    /Users/ikent/dev/src/github.com/mailhog/MailHog-Server/api/v1.go:66
created by github.com/mailhog/MailHog-Server/api.CreateAPIv1
    /Users/ikent/dev/src/github.com/mailhog/MailHog-Server/api/v1.go:77 +0x90c

goroutine 10 [runnable]:
github.com/ian-kent/gotcha/app.func·001()
    /Users/ikent/dev/src/github.com/ian-kent/gotcha/app/app.go:33
created by github.com/ian-kent/gotcha/app.(*App).Start
    /Users/ikent/dev/src/github.com/ian-kent/gotcha/app/app.go:38 +0x288
@ian-kent ian-kent added the bug label Mar 27, 2015
@nayyden nayyden changed the title Panic when using -{ui|api}-bind-addr (flag redefined: listen) Panic when using -ui-bind-addr (flag redefined: listen) Mar 27, 2015
@ian-kent
Copy link
Member

thanks @nayyden, should have time to look at it this weekend

@nayyden
Copy link
Author

nayyden commented Mar 27, 2015

Thanks @ian-kent !
I tried to search it in the code but i could not find a registration of the listen flag.

@ian-kent
Copy link
Member

it'll be coming from github.com/ian-kent/gotcha, which needs to be destroyed asap 😄 might try and refactor that out this weekend... it was my example of "i'm sure golang needs a web framework", how wrong I was!

ian-kent added a commit to mailhog/MailHog-UI that referenced this issue Apr 19, 2015
ian-kent added a commit to mailhog/MailHog-Server that referenced this issue Apr 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants