Questions tagged [spring-cloud]

1

votes
0

answer
5

Views

Spring cloud sleuth not appending keys to Hibernate query logs

When I am using spring cloud sleuth, I am observing that it is appending application name and key details for all the application logs. But this is not happening for Hibernate logs or jpa queries. Is there any way to achieve this using sleuth
Async Code
1

votes
1

answer
1.5k

Views

Error using “condition paramter header” @StreamListener of new release Chelsea.RC1

I am trying to use the event filter to reduce the amount of topics the application uses using the new feature available in the new release of the spring cloud stream (Chelsea.RC1). The message is being created, with the correct header, however, inspecting the contents of the message in the queue, th...
Tiago Costa
1

votes
2

answer
4.6k

Views

FeignClient throws instead of returning ResponseEntity with error http status

As I'm using ResponseEntity as return value for my FeignClient method, I was expecting it to return a ResponseEntity with 400 status if it's what the server returns. But instead it throws a FeignException. How can I get a proper ResponseEntity instead of an Exception from FeignClient ? Here is my Fe...
ch4mp
1

votes
3

answer
719

Views

Migration netflix feign in Springboot 1.x to openfeign in Springboot 2.x

I try doing migration Springboot 1.x.y (Brussels-SR12) to 2.x.y. I use FeignClients I change Maven configuration: Finchley.RELEASE so org.springframework.cloud spring-cloud-openfeign 2.0.0.RELEASE I change all import: import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.spri...
sgrillon
1

votes
2

answer
377

Views

Is there another runtime model then one-jvm-per-module-instance in Spring Cloud Data Flow?

Currently, we are using Spring XD for data ingestion with many many streams (and modules). Unfortunately Spring XD is discontinued and we have to look around for an alternative. So, we had a look on Spring Cloud Data Flow, because we want to have the dynamic deployment of streams via the shell. Unfo...
Bernd
1

votes
1

answer
1.8k

Views

Spring OAuth2RestTemplate loses token when configured to use JWT

I have a series of microservice projects configured to use Spring Boot and Cloud OAuth2 SSO. It has the following components: Spring Boot 1.3.0 Spring Cloud Brixton.M3 auth server has Spring Boot 1.2.7 and Cloud Angel.SR4 Zuul Proxy (gateway) Auth server Resource Server UI Server Eureka Server The...
Tim Webster
1

votes
2

answer
512

Views

Spring Cloud config to java util Properties

I am using using spring cloud (with spring boot) to create some micro services. Now I have enabled quartz scheduling for one of the services. Following is the code snippet (trimmed): @Bean public SchedulerFactoryBean schedulerFactoryBean() { SchedulerFactoryBean factory = new SchedulerFactoryBean();...
Shashank Singhal
1

votes
1

answer
562

Views

Integrate Spring Cloud load balancing with KeycloakRestTemplate

I have a microservice landscape configured with Spring Cloud discovery so I'm able to access other service instances just using their id's: public class MyClass { @Autowired @LoadBalanced private RestTemplate restTemplate; public String doOtherStuff() { String results = restTemplate.getForObject('ht...
Xtreme Biker
1

votes
3

answer
301

Views

Bluemix Does Not Include instance_id in VCAP_APPLICATION

I ran cf env and noticed that Bluemix was not returning a value for instance_id in the returned JSON data for the VCAP_APPLICATION object. My application was running on Bluemix with multiple instances. Most of the other attributes including application_id and application_name were present. Accordin...
Dave L.
1

votes
2

answer
1.7k

Views

Cannot inject LoadBalanced annotated OAuth2RestTemplate

I am using Spring Cloud Angel.SR4. My Configuration class for creating an OAuth2RestTemplate bean is as follows: @Configuration public class OAuthClientConfiguration { @Autowired private MyClientCredentialsResourceDetails resource; public OAuthClientConfiguration() { } @Bean @Qualifier('MyOAuthRestT...
Armin Balalaie
1

votes
1

answer
1k

Views

How to setup Spring Cloud Zuul server as proxy server

I tried to use Spring Cloud Zuul server as proxy server, but when I access my default context it does not redirect to url destination. For example: @EnableZuulServer @SpringBootApplication public class ZuulServerApp { private static final Logger LOGGER = LoggerFactory.getLogger(ZuulServerApp.class);...
Carlos Alberto
1

votes
2

answer
2.4k

Views

Renews threshold and Renews (last min)

I am testing a spring-cloud eureka server and client. I have a simple question about the default configuration (server & client). On the server side, the renew threshold is equal to 3. On the client side, it sends a heartbeat every 30 seconds (a maximum of 2 per minute). When I look at the registry...
stéphane
1

votes
3

answer
1.6k

Views

Is there a way a spring cloud config client can decrypt cipher text fetched from a config server?

Our config server is relatively insecure and only a handful of clients need the encrypted properties. Ideally, we want the server to only have the public key and each client can use the private key for decryption. The trouble is that by default, the config server will always attempt to decrypt ciphe...
Greg Jenkins
1

votes
1

answer
1k

Views

How to config spring cloud oauth2 in docker container

I met some problems with micro-spring-docker , i think maybe the sso token-url is not correct. The demo https://github.com/keryhu/micro-oauth2-docker In local computer , sso service and auth-service works fine . But not in docker container , the problem is that redirecting to auth-server Timeout ....
Kery Hu
1

votes
1

answer
311

Views

Difference between Codec and MessageConverter in Spring Integration

Codec's were introduced in Spring Integration 4.2. However, the description in the docs doesn't really describe how a Codec is different from a MessageConverter or in which scenarios to use which abstraction? Basically what I want to know is: Why was the Codec abstraction introduced when it seems si...
Donovan Muller
1

votes
1

answer
927

Views

Zuul proxy with ribbon + listOfServers and logging requirement

Hi I have configured Zuul (spring-cloud-netflix) to work with ribbon. I was able to see which request is coming to zuul and what requests is being sent to related endpoint in the logs before adding the ribbon to it. At some point I have added ribbon & load balancing feature. Now I can not see outgo...
user1562166
1

votes
1

answer
1k

Views

Configuring the EurekaInstanceConfigBean for AWS in Spring-Cloud-Netflix (Brixton.RELEASE)

With the release of the Brixton Release Train, I have noticed that there has been an update to the EurekaInstanceConfigBean interface, specifically, the default constructor has been made private, and a new constructor has been introduced that takes in an instance of org.springframework.cloud.commons...
1

votes
2

answer
471

Views

Using Hystrix to get list of services from Eureka through the circuit breakers

I exploit spring-cloud. As far as I understand, when client of Eureka gets a list of services from Eureka server, it uses the Ribbon for load balancing. Does the client use Hystrix to get the list of services from Eureka through the circuit breakers?
slippery
1

votes
1

answer
958

Views

Spring Cloud dataflow Yarn integration with Spark

I'm trying to integrate Spring Cloud dataflow Yarn SPI with Spark running on Hortonworks sandbox 2.4. Does anyone have any samples on the configuration that we need to do? My Spark program is executing properly when I run it using spark-submit, but giving problems when I ran through Spring Cloud dat...
Pradeep
1

votes
1

answer
523

Views

spring cloud config versioning

I have all the common properties in application.properties file. version specific properties are in version1 and version2 folders in github. order-service(base folder) application.properties version1 app-dev.properties version2 app-dev.properties How can I set the config in application.yml file to e...
Punter Vicky
1

votes
1

answer
504

Views

How RefreshRemoteApplicationEvent is handled?

The documentation says that when spring cloud config server detects configuration chages it fires an RefreshRemoteApplicationEvent. But documentation said nothing about how that event is handled. So is it true that each application which receive such event shoud handle it by itself? E.g it is not re...
Cherry
1

votes
1

answer
69

Views

How to redirect input to the Shell?

I've tried java -jar shell.jar < commands.txt but that doesn't seem to work. One would think a shell would support redirection for use in scripts.
Remon Sinnema
1

votes
2

answer
2k

Views

Cannot connect to jhipster spring registry on docker via IDE

I'm running JHipster registry in a docker container. All applications running on docker can connect and register in registry endpoint (port 8761). But when I try to connect an application running on my IDEA, I receive a error when trying to connect to the registry endpoint: 2016-07-21 10:35:24.912...
1

votes
1

answer
619

Views

Spring Cloud Stream Kafka binder compression

How do you enable compression (e.g. GZIP) for producers using the Spring Cloud Stream Kafka Binder?
Cobra1117
1

votes
1

answer
1.4k

Views

Zuul Rewrites Host Name after Routing

Whenever a request hits Zuul, I got a 302 redirect to the host of the actual service to be called. So the url gets rewritten by Zuul. I want to prevent this. The user should only see the hostname of Zuul. I have a Spring Cloud Zuul that I use as a routing server. It has the following configs: zuul:...
J Freebird
1

votes
1

answer
360

Views

error on running spring cloud sleuth with mysql impl

I was trying out the implementation of spring cloud sleuth using the default mysql span store. (Modified based on question) I used Brixton.SR4 and spring boot 1.3.7 and Java 8 The service was simple @SpringBootApplication @EnableDiscoveryClient @EnableZipkinStreamServer public class TraceCollection...
EvilJinious1
1

votes
1

answer
554

Views

Eureka doesn't replicate its registry info to all servers

I deployed 3 Eureka servers. A peers with B, B peers with C, C peers with A. I also have a client with eureka.client.service-url.defaultZone=Eureka A's address. When I started my client, things were wired: Eureka A and B had my client's registry info, but server C got nothing. I waited for 5mins ser...
Neo
1

votes
1

answer
400

Views

SpringCloudStream - Failing on spring-core version

I started playing with Spring Cloud Stream/App Starters using spring boot. When I followed the instruction on Getting Started, I am getting the following error with mvn build: An invalid artifact was detected. This artifact might be in your project's POM, or it might have been included transitively...
Karthik Palanivelu
1

votes
1

answer
315

Views

how to configure logging directory

We are trying out spring-cloud-dataflow to deploy our microservices in a development environment. Each app logs to the /tmp directory and users the /tmp directory as the working directory. This blows out the woeful disk space we have available on the machine. Is there any way to configure this? I h...
stephen newman
1

votes
1

answer
325

Views

Placeholders resolution for client specific configuration

I am learning about Spring Cloud Config project capabilities. I wondered whether it is possible to use a placeholders for application specific configuration? For example: My application.yml file: server: port: 8888 spring: profiles: active: native cloud: config: server: native: search-locations: cl...
Maxim Kirilov
1

votes
2

answer
747

Views

How Spring Cloud Config Server PUSH plain text files to Config Client Application?

What I have implemented so far are: Spring Cloud Config Server with 'native' repo. spring.profiles.active: native spring.cloud.config.server.native.searchLocations: file:/path/to/config-repo Config Server is pushing notification to Config Client App through RabbitMQ, as http://cloud.spring.io/spring...
Zhanming Cui
1

votes
1

answer
1.9k

Views

Spring Cloud Sleuth error posting spans to Zipkin

Has anyone else encountered the following problem with using Zipkin & Spring Cloud Sleuth? Seems to be a problem posting out data to my localhost Zipkin server. Is there any need to configure proxy settings on Zipkin? 2016-11-17 12:13:59.270 DEBUG [myService,,,] 16588 --- [pool-1-thread-1] o.s.c.s...
Dean Roulston
1

votes
1

answer
262

Views

Which AWS services Netflix is using?

I started looking to some AWS training courses, and as I'm a Java Developer, I'm so interested with the Netflix OSS (Spring Cloud,..) and its own infrastructure. As AWS has many many services for various uses, I wish to know which services of AWS NetFlix is using and its use case. Thank you !
Jason Adam Bourne
1

votes
1

answer
225

Views

Spring Cloud Data Flow: task can't start on Kubernetes cluster

I've deployed Spring Cloud Data Flow server on a local Kubernetes cluster. All seems fine. Then I create an App of type Task, giving the URL of a Spring-Boot JAR. Then I create a task 'definition' and launch it. The task definition hangs in status 'launching'. Here are my findings: Looking at K...
Sylvain Charton
1

votes
1

answer
317

Views

Spring Cloud Contract with Jersey

I have a simple project Spring boot project. It contains one Jersey based Controller: @Path('persons') @Produces(MediaType.APPLICATION_JSON) public class PersonsController { @GET public Person get() { return new Person('James', 20); } } It returns json response as expected (url: http://localhost:POR...
Vytautas Arminas
1

votes
1

answer
2.3k

Views

Zuul routing : One endpoint with multiple microservices

I would like to setup zuul and the underlying microservices in a way that all services will be under the '/gateway' context. For example: Microservice 1 has : http://localhost:8081/api/hello Microservice 2 has : http://localhost:8082/api/bye I would want to be able to access the microservices via zu...
Rami Del Toro
1

votes
1

answer
1.1k

Views

Why do Spring Cloud Netflix applications deployed on Docker containers require explicitly setting eureka.instance.hostname?

A simple scenario: 2 eureka servers (http://archimedes1 http://archimedes2) 1 Config Server 1 Zull Gateway 1 Business Microservice Deployed on localhost everything works as expected. I dockerized them to run on individual containers for each app and tested on Docker over Windows. What I see after d...
codependent
1

votes
1

answer
494

Views

Programatically remove registered instance from Eureka Server

Is there a way to remove a registered instance from the Eureka Server without using REST operations? Which is the data structure that contains all the applications? (It's clear that I want to remove them writing code in the Eureka Server). Thanks, Nano
Nano
1

votes
2

answer
1.7k

Views

Running multiple instance microservice using spring cloud config

I am developing a microservice, using Spring Boot, that exposes REST Endpoint. To meet the scalability constrains, multiple instance of the [same] service will be deployed (basically scale up when needed and scale down when not needed). I am using the Spring Cloud Config Server to supply the confi...
Naveen Kumar
1

votes
1

answer
823

Views

Spring cloud netflix - Eureka - How to enable CORS

I'm trying to enable CORS within Spring Cloud Eureka server by following code, but it doesn't seem to work. @SpringBootApplication @EnableEurekaServer @EnableDiscoveryClient public class EurekaApplication { public static void main(String[] args) throws Exception { SpringApplication.run(EurekaApplic...
Ray

View additional questions