-
Notifications
You must be signed in to change notification settings - Fork 60
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
Crash with TLS Enabled #41
Comments
Actually seems unrelated to TLS, seeing the same thing without TLS involved. Using the Docker images, both v0.4 and latest. |
See this is a duplicate of #39. Closing. |
No, this was because of incorrect docker images. Needed to be build with go 1.6 (for vendoring). Can you do a docker pull and try again? |
Pulled the latest docker image and saw the same results. |
Ok, just saw the docker build logs, it built with the old Dockerfile ofcourse because it builds the tag (v0.4) and in that commit the dockerfile wasn't correct. -sigh- So I pinned v0.4 on dockerhub to master. If you do docker pull again of v0.4 or latest, it should work now. |
Different crash this time: goroutine 8 [running]: |
And this worked fine in the non-TLS setup ? |
This is actually without TLS enabled, with debug enabled and watching the console. I'm running Mattermost 2.1 and it wasn't clear if 0.4 should work with that version. |
Hm, in the other ticket (#40) you told me it worked fine if you were not using ELB, but now it doesn't work anymore ? Is this correct or are you testing somewhere else now? If you're using a stable mattermost 2.1 release you can use matterircd stable (master branch), if your using development mattermost you have to use matterircd develop branch. |
Apologies for the confusion. I was working when I was using the docker images from xyproto/matterircd without the ELB in place. Following your comment that TLS support on in there now I switched over to your docker images. Currently I'm using a custom mattermost 2.1 docker image and your 0.4 matterircd docker image, and seeing the errors I described. |
Ok, I can reproduce it on a new setup. By refactoring into the new library I dropped http support, only https (with valid certificates) is allowed. |
Correct! I can try switching back to HTTPS though, I started using port 82 and HTTP when I was having issues with the AWS ELB. |
Ok, bug fixed and new docker images triggered. |
Back in business! Latest docker hub image for 0.4 is working. Thanks! |
Spoke too soon. It works but after a few minutes crashes: goroutine 47 [running]: |
Seems like you tried to join a channel with a client without that client being logged in into mattermost. If so, don't do that for now ;) Always login via /msg mattermost login before doing anything else. |
First attempt I used irssi and was able to login, it joined the channels automatically. Second time I attempted to use Hexchat, when I logged in, it crashed: 2016-03-28 23:14:51.823 DEBUG <- PING LAG1459156886972 goroutine 10 [running]: |
Ok, I fixed the "join a channel without logging in" bug, and added much more debug for the hexchat problem. It also shouldn't panic anymore. The dockerhub images are updated, if you could try |
Awesome! I shall give it a try and report back. |
Looking good so far! Was able to connect & log in successfully using Hexchat and irssi. |
Great to hear, thanks for the testing and feedback. |
Happy to help! |
Just an fyi, something a coworker found when testing out matterircd using Hexchat 2.9.6, when he connected and hadn't logged in yet, he issued a /LIST and the daemon crashed with the following dump: goroutine 13 [running]: |
Ok, fixed and also proactive the /TOPIC command. ;-) |
Awesome! Will update. i think this one can be considered resolved. Will close. Thanks! |
Excited about the the TLS support! Unfortunately when I attempted to use it crashed. I was able to connect fine but as soon as I attempted to login I saw this:
2016-03-28 02:02:22.147 DEBUG <- PRIVMSG mattermost :login [email protected] xxxx
2016/03/28 02:02:22 retrying login croscon [email protected] localhost:82
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4b408f]
goroutine 10 [running]:
github.com/42wim/mm-go-irckit.(_User).addUsersToChannels(0xc8200b6460)
/go/src/github.com/42wim/mm-go-irckit/mmuser.go:72 +0x74f
github.com/42wim/mm-go-irckit.(_User).handleMMServiceBot(0xc8200b6460, 0xc8200b6540, 0xc8201c6f54, 0x29)
/go/src/github.com/42wim/mm-go-irckit/mmuser.go:458 +0xf48
created by github.com/42wim/mm-go-irckit.(*server).handle
/go/src/github.com/42wim/mm-go-irckit/server.go:786 +0x511b
goroutine 1 [IO wait]:
net.runtime_pollWait(0x7f465accfb28, 0x72, 0xc820012160)
/usr/lib/go/src/runtime/netpoll.go:157 +0x60
net.(_pollDesc).Wait(0xc8200e9090, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(_pollDesc).WaitRead(0xc8200e9090, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:78 +0x36
net.(_netFD).accept(0xc8200e9030, 0x0, 0x7f465accfbe8, 0xc8200119a0)
/usr/lib/go/src/net/fd_unix.go:408 +0x27c
net.(_TCPListener).AcceptTCP(0xc8200240f8, 0xc8ffffffff, 0x0, 0x0)
/usr/lib/go/src/net/tcpsock_posix.go:254 +0x4d
net.(*TCPListener).Accept(0xc8200240f8, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/tcpsock_posix.go:264 +0x3d
main.start(0x7f465acceb80, 0xc8200240f8)
/go/src/github.com/42wim/matterircd/main.go:83 +0x4e
main.main()
/go/src/github.com/42wim/matterircd/main.go:62 +0xe4e
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:1721 +0x1
goroutine 5 [chan receive]:
github.com/alecthomas/log4go.(*ConsoleLogWriter).run(0xc820010520, 0x7f465acce358, 0xc820024010)
/go/src/github.com/alecthomas/log4go/termlog.go:33 +0x69
created by github.com/alecthomas/log4go.NewConsoleLogWriter
/go/src/github.com/alecthomas/log4go/termlog.go:26 +0xb5
goroutine 6 [IO wait]:
net.runtime_pollWait(0x7f465accfa68, 0x72, 0xc820012160)
/usr/lib/go/src/runtime/netpoll.go:157 +0x60
net.(_pollDesc).Wait(0xc820118fb0, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(_pollDesc).WaitRead(0xc820118fb0, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:78 +0x36
net.(_netFD).accept(0xc820118f50, 0x0, 0x7f465accfbe8, 0xc820129140)
/usr/lib/go/src/net/fd_unix.go:408 +0x27c
net.(_TCPListener).AcceptTCP(0xc820024110, 0x7f465af51000, 0x0, 0x0)
/usr/lib/go/src/net/tcpsock_posix.go:254 +0x4d
net.(_TCPListener).Accept(0xc820024110, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/tcpsock_posix.go:264 +0x3d
crypto/tls.(_listener).Accept(0xc8201290e0, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/tls.go:46 +0x60
main.start(0x7f465accfc88, 0xc8201290e0)
/go/src/github.com/42wim/matterircd/main.go:83 +0x4e
main.main.func1()
/go/src/github.com/42wim/matterircd/main.go:49 +0x68
created by main.main
/go/src/github.com/42wim/matterircd/main.go:50 +0x8c7
goroutine 9 [IO wait]:
net.runtime_pollWait(0x7f465accf9a8, 0x72, 0xc820012160)
/usr/lib/go/src/runtime/netpoll.go:157 +0x60
net.(_pollDesc).Wait(0xc820119020, 0x72, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(_pollDesc).WaitRead(0xc820119020, 0x0, 0x0)
/usr/lib/go/src/net/fd_poll_runtime.go:78 +0x36
net.(_netFD).Read(0xc820118fc0, 0xc820136400, 0x400, 0x400, 0x0, 0x7f465acca168, 0xc820012160)
/usr/lib/go/src/net/fd_unix.go:232 +0x23a
net.(_conn).Read(0xc820024118, 0xc820136400, 0x400, 0x400, 0x0, 0x0, 0x0)
/usr/lib/go/src/net/net.go:172 +0xe4
crypto/tls.(_block).readFromUntil(0xc8201bfe00, 0x7f465acd01f0, 0xc820024118, 0x5, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/conn.go:455 +0xcc
crypto/tls.(_Conn).readRecord(0xc8200c02c0, 0x9fee17, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/conn.go:540 +0x2d1
crypto/tls.(_Conn).Read(0xc8200c02c0, 0xc820132000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/lib/go/src/crypto/tls/conn.go:901 +0x167
bufio.(_Reader).fill(0xc82011e300)
/usr/lib/go/src/bufio/bufio.go:97 +0x1e9
bufio.(_Reader).ReadSlice(0xc82011e300, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/bufio/bufio.go:328 +0x21a
bufio.(_Reader).ReadBytes(0xc82011e300, 0xc82012910a, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/bufio/bufio.go:406 +0xa9
bufio.(_Reader).ReadString(0xc82011e300, 0x7e130a, 0x0, 0x0, 0x0, 0x0)
/usr/lib/go/src/bufio/bufio.go:446 +0x4d
github.com/sorcix/irc.(_Decoder).Decode(0xc8201291c0, 0x0, 0x0, 0x0)
/go/src/github.com/sorcix/irc/stream.go:80 +0x59
github.com/42wim/mm-go-irckit.(_User).Decode(0xc8200b6460, 0x9fe1b8, 0x0, 0x0)
/go/src/github.com/42wim/mm-go-irckit/user.go:137 +0xab
github.com/42wim/mm-go-irckit.(_server).handle(0xc8200f2340, 0xc8200b6460)
/go/src/github.com/42wim/mm-go-irckit/server.go:582 +0xb1
created by github.com/42wim/mm-go-irckit.(*server).Connect
/go/src/github.com/42wim/mm-go-irckit/server.go:283 +0xb5
I used an existing key/cert pay and I used the go certificate generator to get a self signed cert. Both had the same results.
The text was updated successfully, but these errors were encountered: