Invalid memory address or nil pointer dereference


#1

Hi,

I have just installed tyk-gateway, tyk-dashboard and tyk-pump using instructions at the following link

https://tyk.io/docs/tyk-api-gateway-v-2-0/installation-options-setup/install-tyk-pro-edition-on-red-hat/

And then followed instructions to setup the first API

https://tyk.io/docs/tyk-api-gateway-v-2-0/tutorials/set-up-your-first-api-pro-edition/
I get an empty response and if I look into the error logs I find this.

Getting the following error

2016/06/02 11:44:22 http: panic serving 127.0.0.1:56358: runtime error: invalid memory address or nil pointer dereference
goroutine 108 [running]:
net/http.(*conn).serve.func1(0xc8226d8780)
/usr/local/go/src/net/http/server.go:1389 +0xc1
panic(0xc90e00, 0xc82000e090)
/usr/local/go/src/runtime/panic.go:426 +0x4e9
main.CopyHttpResponse(0x0, 0x0)
/home/tyk/go/src/github.com/lonelycode/tyk/util_http_helpers.go:55 +0x4e8
main.SuccessHandler.ServeHTTP(0xc822707540, 0x7f443c8bb4b0, 0xc82011c680, 0xc82007b180, 0x0)
/home/tyk/go/src/github.com/lonelycode/tyk/handler_success.go:288 +0x543
main.DummyProxyHandler.ServeHTTP(0xc822707540, 0x7f443c8bb4b0, 0xc82011c680, 0xc82007b180)
/home/tyk/go/src/github.com/lonelycode/tyk/handler_proxy.go:13 +0x42
main.CreateMiddleware.func1.1(0x7f443c8bb4b0, 0xc82011c680, 0xc82007b180)
/home/tyk/go/src/github.com/lonelycode/tyk/middleware.go:54 +0x26f
net/http.HandlerFunc.ServeHTTP(0xc82271cf40, 0x7f443c8bb4b0, 0xc82011c680, 0xc82007b180)

What can I look into to fix this?

Also I dont see anything running on port 80 for the portal. Wondering if I have to take separate steps get the portal running. I tried following instructions at this link but cannot get to the developer portal

https://tyk.io/docs/tyk-dashboard-v1-0/tutorials/set-up-your-portal/

Regards,
Gaurav


#2

To fix the panic, disable detail recording in your Tyk.conf

Tyk is attempting to copy the request or response and getting a mil pointer, this could be a bug, though I’d need to know how your API is configured and what the endpoint is returning?