Microphone
Microphone copied to clipboard
[WARN]agent check service is now critical
I created the simple web api service as below
var options = new ConsulOptions();
options.Host = "198.160.161.XXX";
options.Port = 8500;
options.NameResolution = ConsulNameResolution.HttpApi;
options.NameResolution = ConsulNameResolution.EbayFabio
var loggerFactory = new LoggerFactory();
var logger = loggerFactory.CreateLogger("logger");
var provider = new ConsulProvider(loggerFactory, Options.Create(options));
Cluster.RegisterService(new Uri($"http://localhost"), provider, "WebApi", "v1", logger);
When i ran the service I am getting following warning in consul
2016/12/07 12:56:05 [INFO] agent: Synced service 'WebApi_localhost_80' 2016/12/07 12:56:05 [WARN] agent: check 'service:WebApi_localhost_80' is now critical 2016/12/07 12:56:06 [WARN] agent: check 'service:WebApi_localhost_80' is now critical 2016/12/07 12:56:07 [WARN] agent: check 'service:WebApi_localhost_80' is now critical 2016/12/07 12:56:08 [WARN] agent: check 'service:WebApi_localhost_80' is now critical 2016/12/07 12:56:09 [WARN] agent: check 'service:WebApi_localhost_80' is now critical 2016/12/07 12:56:10 [WARN] agent: check 'service:WebApi_localhost_80' is now critical 2016/12/07 12:56:11 [WARN] agent: check 'service:WebApi_localhost_80' is now critical 2016/12/07 12:56:12 [WARN] agent: check 'service:WebApi_localhost_80' is now critical 2016/12/07 12:56:13 [WARN] agent: check 'service:WebApi_localhost_80' is now critical
can someone please guide me on how can i make fix
Thanks, Vijay
I don't think Consul is dropping the service from the registry automatically like it used to. Should there be a DeRegister method in Microphone too?
Things have changed in Consul. it is now possible to pass a "DeregisterCriticalAfter" parameter when registering Services. This means that Consul itself will deregister services that have been failing for too long.
Previously, we had such a feature in Microphone, we later removed it as it is not really the responsibility of Microphone itself to remove dead services.
I will add support to pass the auto deregister argument when registering
Hi Rogeralsing
Great library! Thanks you for creating it. Quick question: Did you add support for DeregisterCriticalAfter? Also is there a way to Deregister the service with you library?
Thanks you again,