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

Can't add api (mac os) #229

Closed
orliesaurus opened this issue May 12, 2015 · 7 comments
Closed

Can't add api (mac os) #229

orliesaurus opened this issue May 12, 2015 · 7 comments

Comments

@orliesaurus
Copy link

Okay so this is what I did.

Installed Kong through the homebrew method.

  • Added an api and returned:
    {"public_dns":"google.com","id":"32152cfb-2d82-473c-c768-c17ec65b5594","created_at":1431420742000,"name":"loc","target_url":"localhost:9999"}
  • made sure I got an API running on localhost:9999
  • tried to run a cURL
    curl -i -X GET --url localhost:8000 --header 'Host: google.com'

and I get:

HTTP/1.1 500 Internal Server Error
Date: Tue, 12 May 2015 18:14:38 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: close
Server: kong/0.2.0-2
@thibaultcha
Copy link
Member

Why is the target URL missing a protocol? Like mentioned in the docs, it should start with http(s). Related to #149.

Can you try?

@orliesaurus
Copy link
Author

Given:

{"public_dns":"google.com","target_url":"http:\/\/localhost:9999","id":"163b2187-ff2f-49f5-c969-1145420d5cd5","created_at":1431507384000,"name":"lol"}

Tried and got this:

HTTP/1.1 502 Bad Gateway
Server: openresty/1.7.10.2rc0
Date: Wed, 13 May 2015 08:58:32 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 182
Connection: keep-alive
Via: kong/0.2.0-2

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>openresty/1.7.10.2rc0</center>
</body>
</html>

@subnetmarco
Copy link
Member

Can you please try again with 0.2.1 and trigger the error again and parse the logs at /usr/local/kong/logs/error.log ?

My guess is that this is related to the DNS resolution bug that has been fixed on 0.2.1.

@orliesaurus
Copy link
Author

When trying to install with brew the new version:

Error: Failed installing dependency: https://luarocks.org/multipart-0.1-3.rockspec - Permission denied make: *** [install] Error 1

@thibaultcha
Copy link
Member

It's your computer, if you have to use sudo, it's not our issue.

@orliesaurus
Copy link
Author

It's not my computer - it's because of having installed the earlier PKG file has messed up the whole configuration with luarocks.
I give up on Kong OS X and move onto docker.

@subnetmarco
Copy link
Member

Can you use the new Kong package and let me know if it works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants