Questions tagged [spring-cloud]

0

votes
1

answer
11

Views

How does Spring Kafka/Spring Cloud Stream guarantee the transactionality / atomicity involving a Database and Kafka?

Spring Kafka, and thus Spring Cloud Stream, allow us to create transactional Producers and Processors. We can see that functionality in action in one of the sample projects: https://github.com/spring-cloud/spring-cloud-stream-samples/tree/master/transaction-kafka-samples: @Transactional @StreamListe...
codependent
1

votes
1

answer
681

Views

How to log MDC with Spring Sleuth 2.0?

referring to quesition/answer in How to log MDC with Spring Sleuth? I think this has/will change(d) with spring-cloud 2.0 as there is no SpanLogger or Slf4jSpanLogger anymore (or I don't find it) Wouldn't it be nice if application properties spring.sleuth.baggage-keys and spring.sleuth.propagation-k...
Dirk Hoffmann
1

votes
1

answer
196

Views

Spring Cloud Stream @SendTo Annotation not working

I'm using Spring Cloud Stream with Spring Boot. My application is very simple: ExampleService.class: @EnableBinding(Processor1.class) @Service public class ExampleService { @StreamListener(Processor1.INPUT) @SendTo(Processor1.OUTPUT) public String dequeue(String message){ System.out.println('New mes...
italktothewind
1

votes
2

answer
162

Views

ZuulException (SendErrorFilter) at first call

I am building an application by Spring Cloud ,Spring Boot and Docker. Entire application is working fine. I have couple of micro-services. Each of the project is running on Docker. When I try to consume my micro-services through Zuul API Gateway I am getting an error for the 1st call. But if I refre...
Nick
1

votes
1

answer
1.1k

Views

Spring Cloud Config- Decryption of properties is not working on Client Side

I have a basic setup for a config client and config server( exactly as in the tutorial here- https://spring.io/guides/gs/centralized-configuration/ My issue is I can decrypt properties on the server side and send them over as plain text but cannot decrypt properties on the client side rather than th...
Indraneel Bende
1

votes
1

answer
3.1k

Views

Config-Server Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured

I am trying to get database configurations from a github repository that contains all application properties. The diagram below illustrates the structure of the service which i have: When i access my config server microservice everything works fine and even when i test it in post man i get the conf...
Erent
1

votes
2

answer
152

Views

Spring Boot Upgrade to Latest

Getting this below exception while upgrading the springBoot starter parent 2.1.1.Release. java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.([Ljava/lang/Object;)V at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(Bootstra...
Thiru
1

votes
1

answer
224

Views

Spring Cloud Config server - Logback error

I am creating a client. I use a remote server. The bootstrap file is: spring.application.name=myApp spring.profiles.active=dev spring.cloud.config.uri=https://url.config.server spring.cloud.config.username=user spring.cloud.config.password=pass logging.config=${spring.cloud.config.uri}/${spring.appl...
Xavier
1

votes
0

answer
78

Views

Can Spring Cloud Task application can run on embedded tomcat

I have a simple webapp with @EnableTask annotation at main class. My Application is running on embedded tomcat. Is it is possible to run SpringBoot WebApp wrapped with @EnableTask annotation in embedded tomcat. Is yes can i have a simple example for that? Thanks
Jagadheeswaran Mohan
1

votes
1

answer
1.3k

Views

spring-cloud-config server - org.springframework.cloud.config.server.environment.NoSuchRepositoryException | Cannot clone or checkout repository:?

I'm working with Spring Cloud, and using Config-server to externalize properties for micro-services. following is the config-server's manifest file server: port: 8888 spring: cloud: config: server: git: uri: https://github.com/Girdhars/config-server.git application: name: config-server management:...
1

votes
0

answer
314

Views

Using Spring Eureka Discovery Client with SSL

I have a problem using a spring eureka discovery client (Service A) in combination with an non spring eureka client (Service B). When i try to get Service B from Service A i get an empty list. Both clients register themself successfully to eureka server. I have configured ssl and therefore disabled...
Benjamin Schüller
1

votes
0

answer
95

Views

Linking up multiple Eureka networks through their own respective Zuul gateways

I have a group of microservices built using Spring Boot and each registered to a Eureka instance. I also have a Zuul gateway built which does authentication / authorization layer for external requests coming into my microservices. External consumers are not allowed to consume my microservices direct...
feicipet
1

votes
0

answer
163

Views

Spring cloud config shared property between microservices

cloud-config src main java resources config microservice.yml tons of microservices here.. application.yml File application.yml contains property databaseIp=10.20.30.40 File microservice.yml contains property spring.data.mongodb.host=${databaseIp}:27017 My problem is databaseIp doesn't change to 10...
Tomasz Panek
1

votes
0

answer
36

Views

How to create Apis on Spring, that are using up to date environment values

I want to create API, which takes part of its input from environment (urls etc..). Basically a Jar file. I also wan't the values being auto updated when application.properties changes. When there is change, this is called: org.springframework.cloud.endpoint.RefreshEndpoint#refresh However, I conside...
user690954
1

votes
2

answer
132

Views

Turbine stream double port binding issue

I'm using Spring Boot 1.5.4 and Spring Cloud Dalston SR4 to stand up a Turbine server on Cloud Foundry and aggregate my application Hystrix streams. In addition I want to add Spring Boot Actuator monitoring and management to the Turbine server. I realize there is ample documentation on how to do thi...
Codesnooper
1

votes
0

answer
358

Views

Update application.yml in Spring

I have a tiny spring-boot app. I want to be able to update beans configuration via http endpoint. Going to do this via beans setters. I mean update injected via @Value or @ConfigurationProperties fields via java code. Nothing special here. But I want to store updated properties back to application....
Vladimir Filipchenko
1

votes
1

answer
158

Views

Spring Boot Cloud + RabbitMQ

I'm new to Spring, Spring Boot and RabbitMQ. However I'm an okay programmer/problem solver. Recently I started go through this book Learning Spring Boot 2.0 - Second Edition, code for this can be found here https://github.com/learning-spring-boot/learning-spring-boot-2nd-edition-code. I think that t...
1

votes
0

answer
251

Views

How do I specify a policy in spring vault 1.1.1?

I have a policy configured on the vault server only for reading the key from my/secret_key_path/here with the configuration class annotated @VaultPropertySource('my/secret_key_path/here') and I get this error on startup not being able to retrieve the key's value: org.springframework.vault.VaultExce...
osmingo
1

votes
0

answer
100

Views

how to use spring gateway in a cloudfoundry routing service

We would like to use Spring Cloud Gateway to implement a CloudFoundry Route Service. In short: every request coming in to the 'Route Service' needs to be forwarded to a url defined as a Request Header (X-CF-Forwarded-Url). The request can be modified/blocked by the 'Route Service' id required. From...
domi
1

votes
2

answer
256

Views

What version of spring-cloud-stream-binder-kstream is compatible with Kafka 1.0.0

When trying to run a slightly adapted version of word-count example, I am having an error that says 'No qualifying bean of type'org.apache.kafka.streams.kstream.KStreamBuilder''. In my POM, I am using spring-cloud-stream-dependencies:Elmhurst.M3 to import dependencies, which imported spring-cloud-s...
HL'REB
1

votes
0

answer
629

Views

Spring cloud config server using multi repository but client could not read

Recently, I build a spring cloud config server for company business, the config server configuration like flw: spring: application: name: config-server cloud: config: label: master server: git: uri: http://gitlab.ugirls.com:9999/commonconfig.git search-paths: db,redis force-pull: true default-label:...
user1685190
1

votes
1

answer
318

Views

How to automatically scale up and scale down of micro services instances built using Spring Boot and Spring cloud?

How to automatically scale up and scale down of micro services instances built using Spring Boot and Spring cloud? I didn't find much info about this on web. please help in understanding the possible approaches
Riding Cave
1

votes
0

answer
284

Views

Spring cloud config load client bootstrap.properties from AWS S3

At the moment I have setup a cloud config server, and client applications get properties from this one central properties. When changes are pushed to GIT, the cloud config server through rabbitmq pushes these config changes to clients and it works perfectly. However, I would like that all client app...
Mez
1

votes
0

answer
4.3k

Views

Could not locate PropertySource: I/O error on GET request

I have created a simple new project intellij with Spring Initilizer using start.spring.io and i added DevTools Acuator Config Client and Web as the configurations. Here is my POM file 4.0.0 com.in28minutes.microservices limits-service 0.0.1-SNAPSHOT jar limits-service Demo project for Spring Boot or...
Madu
1

votes
0

answer
280

Views

Is it possible for Netflix Ribbon to show log which server was chosen

I'm creating a microservices system and I have Zuul server where I use Ribbon which connects to Eureka(which returns me the available service instances) and perform load-balancing. Everything works great, however I would like to see in the logs which particular instance was chosen by Ribbon. I know...
user2455862
1

votes
1

answer
544

Views

Disable autoconfiguration for Spring Cloud Config in a test class of a Spring Boot application

I have a test class annotated with @DataJpaTest which autoconfigures Cloud Config. I want to stop that for that one test class. I cannot use the spring.cloud.config.enabled=false application property, because that would disable it for all tests. Any suggestions?
slorinc
1

votes
1

answer
633

Views

Spring Boot 2 integrate Brave MySQL-Integration into Zipkin

I am trying to integrate the Brave MySql Instrumentation into my Spring Boot 2.x service to automatically let its interceptor enrich my traces with spans concerning MySql-Queries. The current Gradle-Dependencies are the following compile 'io.zipkin.zipkin2:zipkin:2.4.5' compile('io.zipkin.reporter2:...
angrybobcat
1

votes
1

answer
191

Views

Issues encountered switching from RabbitMQ to Kafka

The code below can also be found in the answer to How can @MessagingGateway be configured with Spring Cloud Stream MessageChannels? When attempting to switch from RabbitMQ to Kafka, I'm encountering the following exception: org.springframework.messaging.MessageHandlingException: Missing header 'foo'...
Keith Bennett
1

votes
1

answer
231

Views

Spring Cloud: InstanceAlreadyExistsException when /refresh is triggered

I'm building a sample application which utilises JdbcEnvironmentRepository. I have provided a BootstrapConfiguration class: @EnableAutoConfiguration @AutoConfigureAfter(JdbcTemplateAutoConfiguration.class) public class CloudBootstrapConfiguration { } which is then be specified in spring.factories: o...
Rashidi Zin
1

votes
1

answer
189

Views

Whether spring cloud config cache/store config data from backend

In my project, I am planning to use multiple backend to store different data in my spring cloud conifg server setup: use git backend to store un-sensitive data, and use vault to store sensitive data like password/token. This is simiar to what https://content.pivotal.io/blog/spring-cloud-services-sup...
pkuneal
1

votes
0

answer
299

Views

Spring Cloud Consul auto register of HTTP check not working

According to section 3.2 of the Spring Cloud Consul manual: An HTTP Check is created by default that Consul hits the /health endpoint every 10 seconds. However, the log of my application reveals that this health check is missing. The property http should have a valid url and interval should have 10...
Erwin de Gier
1

votes
0

answer
314

Views

Not able to inject the DataSource using with @RefreshScope of spring cloud config

I am trying to connect to mysql for the same requirement using RefreshScope and it throws the following error Could not obtain connection to query metadata : Error creating bean with name 'scopedTarget.userDataSource' defined in class path resource [com/concretepage/UserConfig.class]: Bean instantia...
rajesh reddy SR
1

votes
1

answer
108

Views

Spring-Cloud-Config not getting properties

I cannot Create properties as I get this error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configClient': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'user.role' in valu...
Ed Diaz
1

votes
1

answer
766

Views

Testing Hystrix fallback through Feign API: com.netflix.client.ClientException: Load balancer does not have available server for client

When testing the Hystrix fallback behavior of my Feign API, I get an error, when I expect it to succeed. Feign interface: This is the api to the external service. @FeignClient(name = 'book', fallback = BookAPI.BookAPIFallback.class) public interface BookAPI { @RequestMapping('/') Map getBook(); @Com...
Eric Turley
1

votes
0

answer
57

Views

what are the states of consul watcher

I want to watch the status of my sprintboot applications health through consul. I referred this . The watch part of my consul config file: 'watches': [ { 'type': 'checks', 'state': 'critical', 'handler': '/opt/consul_handler.sh' }] I have few questions: 1. The state 'critical' works, but it cannot...
Narka Buru
1

votes
0

answer
204

Views

How does the Spring Boot Actuator work together with the Netflix Servo?

There are Spring Boot project that uses a Netflix Servo to collect metrics and send to Graphite. I want to send metrics with the Spring Boot Actuator on Graphite, such as number request per every endpoint and time of response for every request, instead of creating custom metric. But I ran into the...
Roman
1

votes
0

answer
38

Views

Spring Cloud Eureka library for perl

Are there any library for adding perl service(s) to eureka server similar to how we have eureka-js-client module for nodejs?
anil.mavila
1

votes
0

answer
149

Views

spring cloud config server crashed when called /health endpoint frequently

I deployed a spring cloud config server on cloud Foundry. To get its health status in real time, I called its /health endpoint every minute. But after a few days later, config server crashed(out of memory). The chart of memory usage shows that the percentage of memory usage increased stably until it...
zhu0516123
1

votes
0

answer
315

Views

java.lang.RuntimeException: Authorization token is missing

Please, can someone please help me. I am working on a micro-service application using jwt token. I have been able to make the first post request via postman to get the token, but I am having challenge to get the GET request. @RestController @RequestMapping('/users') public class UserController { @Au...
Kunle Ajiboye
1

votes
0

answer
211

Views

spring cloud config client load plain text from server

As the title, I wonder if there is some way to get rendered plain text from config server. I found a way from How Spring Cloud Config Server PUSH plain text files to Config Client Application?. restTemplate.getForObject('http://localhost:8080/application/default/master/testing-dev.json',String.clas...
赵浩翔

View additional questions