Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

[WARN]agent check service is now critical #47

Open
vjappidi opened this issue Dec 7, 2016 · 3 comments
Open

[WARN]agent check service is now critical #47

vjappidi opened this issue Dec 7, 2016 · 3 comments

Comments

@vjappidi
Copy link

vjappidi commented Dec 7, 2016

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

@vjappidi vjappidi changed the title agent check service is critical [WARN]agent check service is now critical Dec 7, 2016
@dasiths
Copy link

dasiths commented Jan 11, 2017

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?

@rogeralsing
Copy link
Owner

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

@elsamrodco
Copy link

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,

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

No branches or pull requests

4 participants