Dashboard looks good. I have APIs and policies. But I can’t get the tyk-gateway service to start correctly.
When i start the service with ./tyk, it looks to start up, but it’s not responding to any calls. 404s all day.
Service Status error:
ubuntu@ip-172-31-10-184:/opt/tyk-gateway$ sudo service tyk-gateway status
â tyk-gateway.service - Tyk API Gateway
Loaded: loaded (/lib/systemd/system/tyk-gateway.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Oct 17 17:59:56 ip-172-31-10-184 tyk[2382]: /home/tyk/go/src/github.com/lonelycode/tyk/main.go:1201 +0x79a
Oct 17 17:59:56 ip-172-31-10-184 tyk[2382]: main.init()
Oct 17 17:59:56 ip-172-31-10-184 tyk[2382]: /home/tyk/go/src/github.com/lonelycode/tyk/version.go:4 +0x7db
Oct 17 17:59:56 ip-172-31-10-184 systemd[1]: tyk-gateway.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 17 17:59:56 ip-172-31-10-184 systemd[1]: tyk-gateway.service: Unit entered failed state.
Oct 17 17:59:56 ip-172-31-10-184 systemd[1]: tyk-gateway.service: Failed with result ‘exit-code’.
Oct 17 17:59:56 ip-172-31-10-184 systemd[1]: tyk-gateway.service: Service hold-off time over, scheduling restart.
Oct 17 17:59:56 ip-172-31-10-184 systemd[1]: Stopped Tyk API Gateway.
Oct 17 17:59:56 ip-172-31-10-184 systemd[1]: tyk-gateway.service: Start request repeated too quickly.
Oct 17 17:59:56 ip-172-31-10-184 systemd[1]: Failed to start Tyk API Gateway.
So according to that log output, you have one API running under:
http://{hostname}:8080/tyk-api-test/{resource}
Which is protected using a token, so you’ll need to generate a token and use that to access Resources that are proxies on the URL above (your ‘app’).
That token will likely need to be added as an Authorization header in order to allow the request through the gateway.
The logs also state that there’s something wrong with the connection string for your policies as it’s trying to load them from a file instead of from the dashboard, you’ll need to address that if you want to use those.
The health check will need a special secret (which is in the Tyk.conf file), and use it for that api as an X-tyk-authorisation header.