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

Nginx resolver #127

Closed
subnetmarco opened this issue Apr 9, 2015 · 5 comments
Closed

Nginx resolver #127

subnetmarco opened this issue Apr 9, 2015 · 5 comments
Assignees
Milestone

Comments

@subnetmarco
Copy link
Member

nginx doesn't support /etc/hosts file as a resolver for the proxy_pass directive. Right now the resolver is set to the Google DNS service at 8.8.8.8 which requires an Internet connection to work.

The alternative is to install another dependency like dnsmasq which will simulate a DNS server on 127.0.0.1, to be configured like:

echo -e "user=root\nno-resolv\nserver=8.8.8.8" >> /etc/dnsmasq.conf

With dnsmasq installed the resolver could point to 127.0.0.1 and it will read from /etc/hosts file, or fallback to 8.8.8.8.

Whatever we decide to do, we need to change the way it currently works because it makes the Internet a dependency to Kong (!).

@subnetmarco subnetmarco self-assigned this Apr 9, 2015
@subnetmarco subnetmarco added this to the 0.2.0 milestone Apr 9, 2015
@thibaultcha
Copy link
Member

If Kong doesn't have internet, it cannot be installed anyways, it needs Internet for the Luarocks dependencies.

Secondly, if it doesn't have internet, why does it need to do DNS lookups? One should simply set the IP of his or her API.

Finally, isn't that an edge case that we should deal with later? Do we know yet if someone with an internal API that doesn't have access to internet will be using Kong?

@subnetmarco
Copy link
Member Author

Kong can be installed without internet through the packages. The rpm, deb etc distributions are not communicating with the Internet internally nor invoking Luarocks, Kong is bundled inside.

The only use case would be for internal environments that also have internal DNS server or custom DNS configuration in /etc/hosts, or for on-premise installations in private environments that don't have a NAT.

@SGrondin
Copy link
Contributor

It's not about not having internet. It's about internal routes, hosts file, local enterprise DNS server, etc etc. You can't make an enterprise product without using the local resolver! Just don't add the resolver line in nginx.conf and it'll be fine. It'll figure it out.

@ahmadnassri
Copy link
Contributor

It's not about not having internet. It's about internal routes, hosts file, local enterprise DNS server, etc etc. You can't make an enterprise product without using the local resolver!

this ^

can't assume endpoint is always an IP, provider might be doing some magic routing, and wants to point to an internal DNS name ... e.g. api-5.local

@subnetmarco
Copy link
Member Author

You can't make an enterprise product without using the local resolver!

That's what I am saying. Nginx needs a resolver entry otherwise you will start seeing 502 Bad Gateway errors. So removing the resolver entry is not an option. It needs to point somewhere and to make it point to /etc/hosts we need to use dnsmasq as I suggested.

Just don't add the resolver line in nginx.conf and it'll be fine

It won't be fine. You need a resolver entry in nginx for proxy_pass directives because we are not using server groups.

@subnetmarco subnetmarco modified the milestones: 0.3.0, 0.2.0, 0.2.1 Apr 22, 2015
This was referenced May 1, 2015
javierguerragiraldez pushed a commit that referenced this issue Sep 3, 2021
* doc(README) update to 6.0.0

* chore(rockspec) release 6.0.0

* docs(*) updated to reflect latest changes
hutchic pushed a commit that referenced this issue Jun 10, 2022
### Summary

#### libyaml 0.2.2 release

- #95 -- build: do not install config.h
- #97 -- appveyor.yml: fix Release build
- #103 -- Remove unused code in yaml_document_delete
- #104 -- Allow colons in plain scalars inside flow collections
- #109 -- Fix comparison in tests/run-emitter.c
- #117 -- Fix typo error
- #119 -- The closing single quote needs to be indented...
- #121 -- fix token name typos in comments
- #122 -- Revert removing of open_ended after top level plain scalar
- #125 -- Cherry-picks from PR 27
- #135 -- Windows/C89 compatibility
- #136 -- allow override of Windows static lib name

#### libyaml 0.2.3 release

- #130 Fixed typo.
- #144 Fix typo in comment
- #140 Use pointer to const for strings that aren't/shouldn't be modified
- #128 Squash a couple of warnings in example-deconstructor-alt
- #151 Fix spelling for error message
- #161 Make appveyor config be a hidden file
- #159 Add CHANGES file
- #160 Always output document end before directive (YAML 1.2 compatibility)
- #162 Output document end marker after open ended scalars
- #157 change cmake target name from libOFF.a to libyaml.a
- #155 include/yaml.h: fix comments
- #169 Fixed missing token in example
- #127 Avoid recursion in the document loader.
- #172 Support %YAML 1.2 directives
- #66 Change dllexport controlling macro to use _WIN32
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

4 participants