UNMS icon indicating copy to clipboard operation
UNMS copied to clipboard

DNS issue nginx 1.0.1

Open fculpo opened this issue 5 years ago • 3 comments

[error] 33#33: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.11:53

Why is the DNS server enforced in nginx configuration ?

http {
  # we must define resolver to be able to resolve container names line 'unms' and 'ucrm' in proxy_pass directives
  resolver 127.0.0.11;
  ...

As all containers are linked the resolution in Docker is native, and it clearly prevent Kubernetes from working...

Could you please add an env variable to disable this if not needed, or better remove this line.

In the meatime i will build the image myself from src.

fculpo avatar Sep 01 '19 23:09 fculpo

Ok so resolver seems needed because of variables, so please allow an environment variable to overwrite this field (so that we can put kube-dbs.kube-system.svc.cluster.local, for example)

fculpo avatar Sep 02 '19 13:09 fculpo

Hello @fculpo. At this moment when Nginx starts, it checks all servers in its config and when any of those servers are not running the Nginx crashes. We may remove this behavior in later versions though.

radekskrivan avatar Sep 06 '19 12:09 radekskrivan

It does not crashes because the container can ping the unms container defined in upstream, but the variabilisation in the map makes it call resolver, thus failing

On Fri, Sep 6, 2019, 14:58 Radek Skrivan [email protected] wrote:

Hello @fculpo https://github.com/fculpo. At this moment when Nginx starts, it checks all servers in its config and when any of those servers are not running the Nginx crashes. We may remove this behavior in later versions though.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ubiquiti-App/UNMS/issues/176?email_source=notifications&email_token=AACPL7LQFFZI5Y4SJ6LIRT3QIJHWBA5CNFSM4ISYLFBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CYLAI#issuecomment-528844161, or mute the thread https://github.com/notifications/unsubscribe-auth/AACPL7JW2XZ2Z762CK23WGDQIJHWBANCNFSM4ISYLFBA .

fculpo avatar Sep 06 '19 13:09 fculpo