These are chat archives for spring-cloud/spring-cloud

28th
Apr 2016
Simon
@sbuettner
Apr 28 2016 10:19
anybody using servo and spring cloud aws with cloudwatch metrics?
there seems to be an issue where the ServoMetricsAutoConfiguration registers a ServoMetricServices. This prevents the default BufferCounterServiceto be created. This seems to lead to this issue: @AutoConfigureBefore(MetricRepositoryAutoConfiguration.class) in the ServoMetricsAutoConfiguration.java
Dave Syer
@dsyer
Apr 28 2016 10:21
That's nothing to do with AWS is it?
Simon
@sbuettner
Apr 28 2016 10:22
No looks like a spring-cloud-netflix config issue
Dave Syer
@dsyer
Apr 28 2016 10:22
And you haven't explained the issue
If you want to switch off the servo metrics you can exclude the ServoMetricsAutoConfiguration
(I think I will add a flag as well for application.properties)
You could also exclude servo from the classpath
Simon
@sbuettner
Apr 28 2016 10:23
The issue is that the writer/sender from CloudWatchMetricAutoConfiguration dont get used when injecting a counter/gauge service.
It worked before. We had servo and custom metrics sent to cloudwatch.
Dave Syer
@dsyer
Apr 28 2016 10:24
I'm not sure I follow
Simon
@sbuettner
Apr 28 2016 10:24
Ok, sorry for the confusion.
Dave Syer
@dsyer
Apr 28 2016 10:24
You want to use servo?
Simon
@sbuettner
Apr 28 2016 10:26
Before we switched to 1.1.0.RC2 from 1.1.0.M2 the metrics worked. We saw custom metrics (using the counter/gauge service) and servo metrics sent to cloudwatch. Now the only the ServoMetricServices gets registered which does not send anything to cloudwatch.
Dave Syer
@dsyer
Apr 28 2016 10:27
So what changed?
Simon
@sbuettner
Apr 28 2016 10:27
and this seems due to the @AutoConfigureBefore(MetricRepositoryAutoConfiguration.class) statement in the ServoMetricsAutoConfiguration which prevents the MetricRepositoryAutoConfiguration to register the BufferCounterService.
Dave Syer
@dsyer
Apr 28 2016 10:28
Do you actually use the ServoMetricsService?
I'm not really clear yet what the problem is, sorry
Simon
@sbuettner
Apr 28 2016 10:28
no. Just CounterService and GaugeService.
and they used to be provided by the BufferCounterService implementation.
Dave Syer
@dsyer
Apr 28 2016 10:29
ServoMetricsService implements both those interfaces
So why do you care who implements it?
Simon
@sbuettner
Apr 28 2016 10:30
Because it looks like that the ServoMetricsService doesnt use the BufferingCloudWatchMetricSender
Dave Syer
@dsyer
Apr 28 2016 10:30
Neither does the default GaugeService
So what's different?
ServoMetricsAutoConfiguration was added since 1.1.0.M2
So that's what's different in the code
Now I need to understand what's different in the behaviour
You were using servo with 1.1.0.M2 when there was no autoconfiguration
So how did that work?
Simon
@sbuettner
Apr 28 2016 10:36
You are right. The problem is that the CloudWatchMetricWriter doesnt get used.
Dave Syer
@dsyer
Apr 28 2016 10:37
Can you raise an issue in github please?
Simon
@sbuettner
Apr 28 2016 10:38
The main problem is the ServoMetricsService seems to replace the metric infrastructure was was present before.
Dave Syer
@dsyer
Apr 28 2016 10:38
But in netflix
It does
It's not supposed to be a problem
It's supposed to be what you wanted to happen
because you have servo on the classpath
Simon
@sbuettner
Apr 28 2016 10:39
but before when servo was on the classpath it used the existing GaugeService.
Dave Syer
@dsyer
Apr 28 2016 10:39
That was before the auto config was added
Simon
@sbuettner
Apr 28 2016 10:40
No there is an autoconfig
Dave Syer
@dsyer
Apr 28 2016 10:40
No=Now?
Simon
@sbuettner
Apr 28 2016 10:40
in the 1.1.0.M2.
release
Dave Syer
@dsyer
Apr 28 2016 10:40
Anyway you can work around it by excluding the ServoMetricsAutoConfiguration. Please confirm that this fixes your issue
Simon
@sbuettner
Apr 28 2016 10:44
Ok. Just wondered because we got Servo metrics (like gauge.servo.zonestats_instancecount) and own metrics when using 1.1.0.M2.. If i exclude the auto config we wont get them i suppose.
Dave Syer
@dsyer
Apr 28 2016 10:44
Don't know.
Try it
I would assume the opposite
Simon
@sbuettner
Apr 28 2016 10:44
ok
Our custom metrics work with the exclusion but i am not sure about servo. Currently not seeing anything.
Simon
@sbuettner
Apr 28 2016 10:50
Thank you for looking into this @dsyer
Dave Syer
@dsyer
Apr 28 2016 10:53
gauge.servo.zonestats_instancecount doesn't look like a Netflix metric name
Did you set that one up yourself?
Simon
@sbuettner
Apr 28 2016 11:02
no
seems to come from the ribbon loadbalancer.
Dave Syer
@dsyer
Apr 28 2016 11:04
Where, exactly?
Simon
@sbuettner
Apr 28 2016 11:08
good question :-)
spring-cloud/spring-cloud-netflix#296
...     "gauge.servo.stores_createconnectiontimer": 0,
    "gauge.servo.stores_loadbalancerexecutiontimer": 0,
    "gauge.servo.stores_requestconnectiontimer": 0,
    "gauge.servo.zonestats_activerequestsperserver": 0,
    "gauge.servo.zonestats_circuitbreakertrippedcount": 0,
    "gauge.servo.zonestats_instancecount": 1
}
just as an example
Niklas Herder
@herder
Apr 28 2016 12:56
Hi, does anyone have any pointers on how to actually set up Eureka EIP binding via Route53? I interpret the docs as saying that you configure one or more free EIP:s via TXT records, then start your instances configured to bind to a free EIP. But this does not seem to happen. If the instance is already bound to an EIP it detects that and doesn't do anything, but it never binds if it doesn't have one already.
Am I understanding something incorrectly here?
nurgasemetey
@nurgasemetey
Apr 28 2016 16:36
Hello guys,
I want to take advice from you.
When searching for frameworks, I met Spring XD and Spring Cloud Data Flow. Documentation says that "Spring Cloud Data Flow cloud native redesign of Spring XD".
Could you explain? Are they the same except cloud stuff?
With regards
Spencer Gibb
@spencergibb
Apr 28 2016 16:38
Data Flow is “XD 2.0”. It has been split up into parts (Data Flow, Stream, Task) and now delegates to a platform for certain actions (CloudFoundry, YARN, Kubernetes, Mesos) instead of implementing a “platform” on it’s own.
Also you write spring boot applications as the unit of deployment.
Sabby Anandan
@sabbyanandan
Apr 28 2016 16:40
@nurgasemetey: This blog covers the general vision and also the reasons behind the rewrite from Spring XD to Spring Cloud Data Flow -> https://blog.pivotal.io/pivotal-cloud-foundry/products/introducing-spring-cloud-data-flow
Spencer Gibb
@spencergibb
Apr 28 2016 16:40
:+1:
@sabbyanandan that would be nice to link from http://cloud.spring.io/spring-cloud-dataflow/
Sabby Anandan
@sabbyanandan
Apr 28 2016 16:41
on it :thumbsup:
nurgasemetey
@nurgasemetey
Apr 28 2016 16:41
I wish more people knew about these good projects. Thanks guys
Dean Poulin
@DeanPoulin
Apr 28 2016 22:00
I'm experiencing something I haven't seen before with spring boot. I have my spring boot services configured to use a config server, which is up and running, but when I look at the health endpoint it's reporting that the config server is down. It's reporting that because of this in the logs:
Could not find key 'spring.application.name:application' in any property source. Returning [null]
2016-04-28 17:33:13.341 DEBUG 16474 --- [nio-8073-exec-2] o.s.c.e.PropertySourcesPropertyResolver  : Could not find key 'spring.application.name' in any property source. Returning [null]
2016-04-28 17:33:13.341 DEBUG 16474 --- [nio-8073-exec-2] o.s.c.e.PropertySourcesPropertyResolver  : Could not find key 'spring.cloud.config.name:application' in any property source. Returning [null]
2016-04-28 17:33:13.341 DEBUG 16474 --- [nio-8073-exec-2] o.s.c.e.PropertySourcesPropertyResolver  : Could not find key 'spring.cloud.config.name' in any property source. Returning [null]
2016-04-28 17:33:13.349  INFO 16474 --- [nio-8073-exec-2] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://10.240.33.83:8888
2016-04-28 17:33:13.349 DEBUG 16474 --- [nio-8073-exec-2] o.s.web.client.RestTemplate              : Created GET request for "http://10.240.33.83:8888/application/dev"
2016-04-28 17:33:13.351 DEBUG 16474 --- [nio-8073-exec-2] o.s.web.client.RestTemplate              : Setting request Accept header to [application/json, application/*+json]
2016-04-28 17:33:13.422 DEBUG 16474 --- [nio-8073-exec-2] o.s.web.client.RestTemplate              : GET request for "http://10.240.33.83:8888/application/dev" resulted in 404 (Not Found); invoking error handler
2016-04-28 17:33:13.423 DEBUG 16474 --- [nio-8073-exec-2] o.s.r.backoff.ExponentialBackOffPolicy   : Sleeping for 1331
2016-04-28 17:33:14.758 DEBUG 16474 --- [nio-8073-exec-2] o.s.retry.support.RetryTemplate          : Checking for rethrow: count=4
2016-04-28 17:33:14.758 DEBUG 16474 --- [nio-8073-exec-2] o.s.retry.support.RetryTemplate          : Retry: count=4
in bootstrap.yml I have this:
spring:
  application:
    name: foo-ws
  cloud:
    config:
      failFast: true
      uri: http://10.240.33.83:8888
but the healthcheck isn't seeing that property and it's using application instead of foo-ws
Dean Poulin
@DeanPoulin
Apr 28 2016 22:05
this is what the health endpoint shows for foo-ws:
{
    "status": "DOWN",
    "diskSpace": {
        "status": "UP",
        "total": 499065552896,
        "free": 36284129280,
        "threshold": 10485760
    },
    "refreshScope": {
        "status": "UP"
    },
    "configServer": {
        "status": "DOWN",
        "error": "java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing"
    },
    "hystrix": {
        "status": "UP"
    }
}
Spencer Gibb
@spencergibb
Apr 28 2016 22:14
@DeanPoulin that’s strange. What version are you using?
Dean Poulin
@DeanPoulin
Apr 28 2016 22:14
@spencergibb I'm using version 1.3.2.RELEASE
Spencer Gibb
@spencergibb
Apr 28 2016 22:15
of spring cloud, not spring boot
Dean Poulin
@DeanPoulin
Apr 28 2016 22:15
oh, one sec
Spencer Gibb
@spencergibb
Apr 28 2016 22:16
The health indicator uses ‘application’ as the application name. Wondering why your config server fails.
Dean Poulin
@DeanPoulin
Apr 28 2016 22:17
looks like I'm referencing spring-cloud-starter at version 1.1.0.M5
Spencer Gibb
@spencergibb
Apr 28 2016 22:18
can you try this on your config server http://<configserverhost>:<port>/application/default
Dean Poulin
@DeanPoulin
Apr 28 2016 22:22
I can, but I don't have an application with that name in the config server, so it throws a 404. the name I've defined is in the bootstrap.yml as foo-ws. When my application starts up, it's correctly retrieving the config from http://<configserverhost>:<port>/foo-ws/<spring-profile> but when the healthcheck is attempting to verify the config server is alive it's calling http://<configserverhost>:<port>/application/<spring-profile>
Spencer Gibb
@spencergibb
Apr 28 2016 22:25
why does your config server respond with a 404?
You can disable the check with health.config.enabled=false.
And submit an issue to use the apps name rather than the default.
Dean Poulin
@DeanPoulin
Apr 28 2016 22:29
will do, my config server is throwing a 404 like this when I call http://<configserverhost>:<port>/application/default
<html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Thu Apr 28 18:26:01 EDT 2016</div><div>There was an unexpected error (type=Not Found, status=404).</div><div>No such label: master</div></body></html>
Spencer Gibb
@spencergibb
Apr 28 2016 22:30
Must have to do with how you have configured config server
Dean Poulin
@DeanPoulin
Apr 28 2016 22:30
I have it configured like this, a different git repository per application:
server:
  port: 8888

management:
  port: 8889

logging:
  file: /var/log/config-ws/config-ws.log

spring:
  application:
    name: config-ws
  cloud:
    config:
      server:
        git:
          uri: git@gitlab.io:acme/{application}-config.git
Spencer Gibb
@spencergibb
Apr 28 2016 22:31
yup, so if there’s no acme/application-config.git it 404’s
submit an issue, if you would.
Dean Poulin
@DeanPoulin
Apr 28 2016 22:32
alright will do. thanks for your help
Spencer Gibb
@spencergibb
Apr 28 2016 22:32
NP, in the meantime you can disable that check if it hurts your app.
Dean Poulin
@DeanPoulin
Apr 28 2016 22:33
perfect, I saw your mention about that, I was just hooking our services up to the healthcheck of the load balancer. thanks again :smile: