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

[BUG] mattermost self-signed certificate #81

Closed
altairo2087 opened this issue Apr 16, 2019 · 1 comment
Closed

[BUG] mattermost self-signed certificate #81

altairo2087 opened this issue Apr 16, 2019 · 1 comment
Labels

Comments

@altairo2087
Copy link

@altairo2087 altairo2087 commented Apr 16, 2019

Describe the bug
I have private mattermost server with self-signed certificate. I'm tried to add custom CA to docker container.

INFO[2019-04-16T06:44:07Z] Allowed Events - map[{Resource:clusterrole Namespace:all}:true {Resource:configmap Namespace:all}:true {Resource:daemonset Namespace:all}:true {Resource:deployment Namespace:all}:true {Resource:ingress Namespace:all}:true {Resource:job Namespace:all}:true {Resource:namespace Namespace:all}:true {Resource:node Namespace:all}:true {Resource:persistentvolume Namespace:all}:true {Resource:persistentvolumeclaim Namespace:all}:true {Resource:pod Namespace:all}:true {Resource:role Namespace:all}:true {Resource:rolebinding Namespace:all}:true {Resource:secret Namespace:all}:true {Resource:service Namespace:all}:true]
DEBU[2019-04-16T06:44:07Z] Registering the filter&{}
DEBU[2019-04-16T06:44:07Z] Registering the filter&{}
DEBU[2019-04-16T06:44:07Z] Registering the filter&{}
INFO[2019-04-16T06:44:07Z] Starting controller
INFO[2019-04-16T06:44:07Z] Starting mattermost bot
panic: runtime error: invalid memory address or nil pointer dereference
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x115de22]

goroutine 53 [running]:
github.com/infracloudio/botkube/vendor/github.com/mattermost/mattermost-server/model.(*WebSocketClient).Listen.func1.1(0x0)
        /go/src/github.com/infracloudio/botkube/vendor/github.com/mattermost/mattermost-server/model/websocket_client.go:101 +0x22
panic(0x1314c20, 0x2322130)
        /usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/infracloudio/botkube/vendor/github.com/mattermost/mattermost-server/model.(*WebSocketClient).Listen.func1(0x0)
        /go/src/github.com/infracloudio/botkube/vendor/github.com/mattermost/mattermost-server/model/websocket_client.go:109 +0x64
created by github.com/infracloudio/botkube/vendor/github.com/mattermost/mattermost-server/model.(*WebSocketClient).Listen
        /go/src/github.com/infracloudio/botkube/vendor/github.com/mattermost/mattermost-server/model/websocket_client.go:99 +0x3f

To Reproduce
Steps to reproduce the behavior:

  1. Add custom CA certificate to /usr/local/share/ca-certificates
  2. Run docker container with /bin/sh -c "apk add --update --no-cache ca-certificates && update-ca-certificates --fresh && /go/bin/botkube"

Additional context
Run with defaults:

/bin/sh -c "/go/bin/botkube"
INFO[2019-04-16T06:57:01Z] Allowed Events - map[{Resource:clusterrole Namespace:all}:true {Resource:configmap Namespace:all}:true {Resource:daemonset Namespace:all}:true {Resource:deployment Namespace:all}:true {Resource:ingress Namespace:all}:true {Resource:job Namespace:all}:true {Resource:namespace Namespace:all}:true {Resource:node Namespace:all}:true {Resource:persistentvolume Namespace:all}:true {Resource:persistentvolumeclaim Namespace:all}:true {Resource:pod Namespace:all}:true {Resource:role Namespace:all}:true {Resource:rolebinding Namespace:all}:true {Resource:secret Namespace:all}:true {Resource:service Namespace:all}:true]
DEBU[2019-04-16T06:57:01Z] Registering the filter&{}
DEBU[2019-04-16T06:57:01Z] Registering the filter&{}
DEBU[2019-04-16T06:57:01Z] Registering the filter&{}
INFO[2019-04-16T06:57:01Z] Starting controller
INFO[2019-04-16T06:57:01Z] Starting mattermost bot
ERRO[2019-04-16T06:57:06Z] There was a problem pinging the Mattermost server URL: https://private.server
Error: https://private.server/api/v4/config/client?format=old: model.client.connecting.app_error, Get https://private.server/api/v4/config/client?format=old: x509: certificate signed by unknown authority
ERRO[2019-04-16T06:57:06Z] Error in connecting to Mattermost team TEAM
Error: https://private.server/api/v4/teams/name/TEAM: model.client.connecting.app_error, Get https://private.server/api/v4/teams/name/TEAM: x509: certificate signed by unknown authority

@PrasadG193
Copy link
Member

@PrasadG193 PrasadG193 commented May 9, 2019

Fixed with #83

@PrasadG193 PrasadG193 closed this May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants