SSL setup error

Hi, I setup SSL in tyk.conf and tyk_analytics.conf. I can get the dashboard to run in https but the gateway is not working. There are a bunch of errors as below in the tyk-dashboard.stderr. I’m using the community version and the dashboard is 1.2.0.0. Any help is appreciated, thanks!

2016/08/03 03:51:01 http: TLS handshake error from 127.0.0.1:44942: tls: first record does not look like a TLS handshake
2016/08/03 03:51:02 http: TLS handshake error from [my IP]:43648: tls: first record does not look like a TLS handshake
2016/08/03 03:51:02 http: TLS handshake error from [my IP]:21918: tls: first record does not look like a TLS handshake

Hi, are these records part of the gateway log?
Do they show up when you start it?

It’s part of the dashboard error.

Here’s the gateway error when SSL enabled.

Get http://mydomain:3000/register/node: malformed HTTP response "\x15\x03\x01\x00\x02\x02""

Hi, here’re more details. The above error only happens when both dashboard and gateway have SSL enabled.
If I only enable SSL on gateway, something different comes out.

The dashboard error:
time=“Aug 3 21:31:23” level=error msg=“Get https://mydomain:443/tyk/keys/579b0005a084e97de2000002b5c33c1d5add4517438cbd748e971ab1?api_id=0d6daf2b35cc4fa36583a60d1e8a3c8c: x509:certificate signed by unknown authority”

The gateway error:
2016/08/03 21:31:23 http: TLS handshake error from 127.0.0.1:46959: remote error: bad certificate

Apparently TYK doesn’t recognize my SSL cert, quick question, does TYK compatible with the wildcard certificate from rapidssl?

Hi, we did some trial and error with the cert file and the gateway seems to work now. It would be nice if we can get the dashboard to run under SSL too but that’s not our requirement. If we also turn on SSL on the dashboard, we have those handshake errors in the log again.

1 Like

@mching The issue is that you have enabled SSL in the dashboard, but your connection strings in the gateway are obviously still set to http:

You will need to tell your gateway that the dashboard is on HTTPS (and vice versa), all those connection strings need to be set to https in both the tyk.conf and tyk_analytics.conf

The bad certs will be just that, self-signed or invalids certs cause x509 errors.