adoptingerlang / service_discovery

Adopting Erlang service discovery project
Apache License 2.0
52 stars 11 forks source link

Failed to load zones (reason: enoent) #15

Open volkanunsal opened 3 years ago

volkanunsal commented 3 years ago

After building the release and running the console command,

$ _build/default/rel/service_discovery/bin/service_discovery console

...I'm getting the following error:

Failed to load zones (reason: enoent)

Screen Shot 2020-09-26 at 4 51 30 PM

It seems to be coming from erldns_zone_loader.erl. Any insight in fixing it would be very much appreciated.

tsloughter commented 3 years ago

That is an "error" log from erldns but isn't actually an error. I have meant to patch erldns to at least be configurable to not log this as an error.

Since service_discovery does not use a static file of zones there is no file to load, it isn't required by erldns but does result in that log despite it being just fine.

volkanunsal commented 3 years ago

I'm also getting 400 on PUT and 404 on GET requests.

curl -v -XPUT http://localhost:3000/service -d '{"name": "webapp2", "attributes": {"attr-1": "value-2"}}'

* upload completely sent off: 56 out of 56 bytes
< HTTP/1.1 400 Bad Request
< Connection: Keep-Alive
< Content-Length: 21

I thought it might be related to this error.

This request works fine when I use the Dockerfile to start the app. I guess it's related to the lack of a database connection.