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

5th
May 2018
MadeInChina
@MadeInChina
May 05 2018 06:32
Hi guys, i had upgrade app from spring-boot 1.5.x to 2.0.x but got exception
018-05-05 06:02:03.649 ERROR 1 --- [Y-0Lpv7a3LxWg-1] o.s.c.n.t.s.HystrixStreamAggregator      : Error receiving hystrix stream payload: 123,34,111,114,105,103,105,110,34,58,123,34,104,111,115,116,34,58,34,49,48,46,52,50,46,49,53,50,46,54,56,34,44,34,112,111,114,116,34,58,54,48,48,48,44,34,115,101,114,118,105,99,101,73,100,34,58,34,97,99,99,111,117,110,116,45,115,101,114,118,105,99,101,34,44,34,105,100,34,58,34,97,99,99,111,117,110,116,45,115,101,114,118,105,99,101,45,49,34,125,44,34,100,97,116,97,34,58,123,34,116,121,112,101,34,58,34,72,121,115,116,114,105,120,84,104,114,101,97,100,80,111,111,108,34,44,34,110,97,109,101,34,58,34,115,116,97,116,105,115,116,105,99,115,45,115,101,114,118,105,99,101,34,44,34,99,117,114,114,101,110,116,84,105,109,101,34,58,49,53,50,53,53,48,48,49,50,51,49,51,53,44,34,99,117,114,114,101,110,116,65,99,116,105,118,101,67,111,117,110,116,34,58,48,44,34,99,117,114,114,101,110,116,67,111,109,112,108,101,116,101,100,84,97,115,107,67,111,117,110,116,34,58,53,44,34,99,117,114,114,101,110,116,67,111,114,101,80,111,111,108,83,105,122,101,34,58,49,48,44,34,99,117,114,114,101,110,116,76,97,114,103,101,115,116,80,111,111,108,83,105,122,101,34,58,53,44,34,99,117,114,114,101,110,116,77,97,120,105,109,117,109,80,111,111,108,83,105,122,101,34,58,49,48,44,34,99,117,114,114,101,110,116,80,111,111,108,83,105,122,101,34,58,53,44,34,99,117,114,114,101,110,116,81,117,101,117,101,83,105,122,101,34,58,48,44,34,99,117,114,114,101,110,116,84,97,115,107,67,111,117,110,116,34,58,53,44,34,114,111,108,108,105,110,103,67,111,117,110,116,84,104,114,101,97,100,115,69,120,101,99,117,116,101,100,34,58,48,44,34,114,111,108,108,105,110,103,77,97,120,65,99,116,105,118,101,84,104,114,101,97,100,115,34,58,48,44,34,112,114,111,112,101,114,116,121,86,97,108,117,101,95,113,117,101,117,101,83,105,122,101,82,101,106,101,99,116,105,111,110,84,104,114,101,115,104,111,108,100,34,58,53,44,34,112,114,111,112,101,114,116,121,86,97,108,117,101,95,109,101,116,114,105,99,115,82,111,108,108,105,110,103,83,116,97,116,105,115,116,105,99,97,108,87,105,110,100,111,119,73,110,77,105,108,108,105,115,101,99,111,110,100,115,34,58,49,48,48,48,48,44,34,114,101,112,111,114,116,105,110,103,72,111,115,116,115,34,58,49,125,125

com.fasterxml.jackson.core.JsonParseException: Unexpected character (',' (code 44)): Expected space separating root-level values
 at [Source: (String)"123,34,111,114,105,103,105,110,34,58,123,34,104,111,115,116,34,58,34,49,48,46,52,50,46,49,53,50,46,54,56,34,44,34,112,111,114,116,34,58,54,48,48,48,44,34,115,101,114,118,105,99,101,73,100,34,58,34,97,99,99,111,117,110,116,45,115,101,114,118,105,99,101,34,44,34,105,100,34,58,34,97,99,99,111,117,110,116,45,115,101,114,118,105,99,101,45,49,34,125,44,34,100,97,116,97,34,58,123,34,116,121,112,101,34,58,34,72,121,115,116,114,105,120,84,104,114,101,97,100,80,111,111,108,34,44,34,110,97,109,101,34,58,34"[truncated 1588 chars]; line: 1, column: 5]
    at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804) ~[jackson-core-2.9.5.jar!/:2.9.5]
    at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:663) ~[jackson-core-2.9.5.jar!/:2.9.5]
    at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:561) ~[jackson-core-2.9.5.jar!/:2.9.5]
    at com.fasterxml.jackson.core.base.ParserMinimalBase._reportMissingRootWS(ParserMinimalBase.java:608) ~[jackson-core-2.9.5.jar!/:2.9.5]
    at
any ideas?
package com.piggymetrics.monitoring;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.netflix.turbine.stream.EnableTurbineStream;

@SpringBootApplication
@EnableTurbineStream
@EnableHystrixDashboard
public class MonitoringApplication {

  public static void main(String[] args) {
    final SpringApplication application = new SpringApplication(MonitoringApplication.class);
    application.setBannerMode(Banner.Mode.OFF);
    application.setWebApplicationType(WebApplicationType.SERVLET);
    application.run(args);
  }
}
quick setup for
cd /PiggyMetrics/docker-compose
docker-compose up -d
CH4:D
@chad_d_stud_twitter
May 05 2018 07:07
I have a simple hystrix method that just outputs a message when it is called and when it fails but I noticed that the fallback is called half of the time I hit the refresh button. Is this expected?
I didn’t do anything fancy with it. Just the basic from the gs guides
Oh that’s nit entirely true. The main method is using a feign client to call a remote service. It’s also a basic Endpoint that outputs data
MadeInChina
@MadeInChina
May 05 2018 08:31
@spencergibb does it a bug?
fixed by add ConfigurableCompositeMessageConverter mannually.
 @Bean
  public ConfigurableCompositeMessageConverter integrationArgumentResolverMessageConverter(
      CompositeMessageConverterFactory factory) {
    return new ConfigurableCompositeMessageConverter(factory.getMessageConverterForAllRegistered().getConverters());
  }
MadeInChina
@MadeInChina
May 05 2018 13:07

But i could only got ping from no any data

http://192.168.2.34:9000/actuator/hystrix.stream

after registerd

@Bean
  public ServletRegistrationBean servletRegistrationBean() {
    ServletRegistrationBean registration =
        new ServletRegistrationBean(new HystrixMetricsStreamServlet(), "/actuator/hystrix.stream");
    registration.setName("hystrixServlet");
    registration.setLoadOnStartup(1);
    return registration;
  }
D D
@dosdebug
May 05 2018 14:51
Config server with git repository will always clone the repository or is there a way, to not let it clone?
Also, how does refreshRate and force-pull impacts the performance of config server?
Marcos Barbero
@marcosbarbero
May 05 2018 14:57
Unless you are restarting or refreshing your apps in a way it should be done, these config props shouldn’t be a problem
When you say a way to not clone the repo, you mean not cloning in at sense, even when the app just starts? If that’s the case you can disable Config server at al, in the config client
MadeInChina
@MadeInChina
May 05 2018 15:47
anyboday knows how to enable hystrix.stream endpoint?
: Exposing 20 endpoint(s) beneath base path '/actuator'
Unknown Date
5/5/2018 11:45:26 PM2018-05-05 15:45:26.896  INFO 1 --- [           main] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Mapped "{[/actuator/archaius],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public org.reactivestreams.Publisher<org.springframework.http.ResponseEntity<java.lang.Object>> org.springframework.boot.actuate.endpoint.web.reactive.AbstractWebFluxEndpointHandlerMapping$ReadOperationHandler.handle(org.springframework.web.server.ServerWebExchange)
5/5/2018 11:45:26 PM2018-05-05 15:45:26.897  INFO 1 --- [           main] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Mapped "{[/actuator/auditevents],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public org.reactivestreams.Publisher<org.springframework.http.ResponseEntity<java.lang.Object>> org.springframework.boot.actuate.endpoint.web.reactive.AbstractWebFluxEndpointHandlerMapping$ReadOperationHandler.handle(org.springframework.web.server.ServerWebExchange)
5/5/2018 11:45:26 PM2018-05-05 15:45:26.898  INFO 1 --- [           main] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Mapped "{[/actuator/beans],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public org.reactivestreams.Publisher<org.springframework.http.ResponseEntity<java.lang.Object>> org.springframework.boot.actuate.endpoint.web.reactive.AbstractWebFluxEndpointHandlerMapping$ReadOperationHandler.handle(org.springframework.web.server.ServerWebExchange)
5/5/2018 11:45:26 PM2018-05-05 15:45:26.899  INFO 1 --- [           main] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public org.reactivestreams.Publisher<org.springframework.http.ResponseEntity<java.lang.Object>> org.springframework.boot.actuate.endpoint.web.reactive.AbstractWebFluxEndpointHandlerMapping$ReadOperationHandler.handle(org.springframework.web.server.ServerWebExchange)
5/5/2018 11:45:26 PM2018-05-05 15:45:26.900  INFO 1 --- [           main] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Mapped "{[/actuator/conditions],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public org.reactivestreams.Publisher<org.springframework.http.ResponseEntity<java.lang.Object>> org.springframework.boot.actuate.endpoint.web.reactive.AbstractWebFluxEndpointHandlerMapping$ReadOperationHandler.handle(org.springframework.web.server.ServerWebExchange)
5/5/2018 11:45:26 PM2018-05-05 15:45:26.901  INFO 1 --- [           main] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Mapped "{[/actuator/configprops],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public org.reactivestreams.Publisher<org.springframework.http.ResponseEntity<java.lang.Object>> org.springframework.boot.actuate.endpoint.web.reactive.AbstractWebFluxEndpointHandlerMapping$ReadOperationHandler.handle(org.springframework.web.server.ServerWebExchange)
5/5/2018 11:45:26 PM2018-05-05 15:45:26.901  INFO 1 --- [           main]
.b.a.e.w.r.WebFluxEndpointHandlerMapping : Mapped "{[/actuator/env],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public org.reactivestreams.Publisher<org.springframework.http.ResponseEntity<java.lang.Object>> org.springframework.boot.actuate.endpoint.web.reactive.AbstractWebFluxEndpointHandlerMapping$ReadOperationHandler.handle(org.springframework.web.server.ServerWebExchange)
5/5/2018 11:45:26 PM2018-05-05 15:45:26.902  INFO 1 --- [           main] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Mapped "{[/actuator/env/{toMatch}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public org.reactivestreams.Publisher<org.springframework.http.ResponseEntity<java.lang.Object>> org.springframework.boot.actuate.endpoint.
D D
@dosdebug
May 05 2018 19:19

When you say a way to not clone the repo, you mean not cloning in at sense, even when the app just starts? If that’s the case you can disable Config server at al, in the config client

@marcosbarbero I mean in a way, it never clones, not only on startup

Marcos Barbero
@marcosbarbero
May 05 2018 19:22
You can disable spring cloud condig
If I’m not wrong it’s spring.cloud.config.enabled=false, place it in your bootstrap.yml
Marcos Barbero
@marcosbarbero
May 05 2018 19:32
sorry for all the typos :D I was using my phone and it was set to portuguese