Hi there, I want to start using Kong and so I went through the first couple of steps in the official quickstart guide for OSX. I’m trying to run kong with postgres. I created a postgres user and database no problem, then started kong and created a service and route, however, when I send a query via kong for that route I get an error message. I’ve detailed the error below and what I’ve tested so far, I’d really be grateful if anyone has any advice on how to debug this? Or what I might have done wrong in setting up? Thank you!
The problem comes when I actually try to execute a request with kong (no problem with admin):
$ curl -i -X GET \
--url http://localhost:8000/ \
--header 'Host: example.com'
Results in:
HTTP/1.1 500 Internal Server Error
Date: Mon, 14 Sep 2020 09:16:48 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Content-Length: 42
X-Kong-Response-Latency: 28
Server: kong/2.1.3
{"message":"An unexpected error occurred"}
Also I can’t seem to get any logs to try and debug this rather terse error message. The folder usr/local/kong
does not exist. I also tried installing a syslog
addon to try and get logs but again the logs are not being output in the /var/log/
folder.
If I query kong’s admin url directly for the service everything seems to be set up ok I think.
{"host":"mockbin.org",
"id":"48261135-8aed-4e04-a1ad-3b8ed25b82ee",
"protocol":"http",
"read_timeout":60000,
"tls_verify_depth":null,
"port":80,"updated_at":1599900991,
"ca_certificates":null,
"created_at":1599900991,
"connect_timeout":60000,
"write_timeout":60000,
"name":"example-service",
"retries":5,
"path":null,
"tls_verify":null,
"tags":null,
"client_certificate":null}
And the same for the route
{"next":null,
"data":[{"id":"cd24b4f3-aa30-45f6-8ec5-7156fe5856b9",
"path_handling":"v0",
"paths":null,
"destinations":null,
"headers":null,
"protocols":["http","https"],
"created_at":1599901530,
"snis":null,
"service":{"id":"48261135-8aed-4e04-a1ad-3b8ed25b82ee"},
"name":null,
"strip_path":true,
"preserve_host":false,
"regex_priority":0,
"updated_at":1599901530,
"sources":null,
"methods":null,
"https_redirect_status_code":426,
"hosts":["example.com"],
"tags":null}]}