spring-cloud

Vault error while writing

久未见 提交于 2020-01-22 11:36:08
问题 I wanted to test Spring Cloud Vault configuration. I installed a Vault server locally and when i try to write some key-values its failing and asking me to use vault kv put command. While the example of Spring Cloud Config in this link shows the usage of vault write command This is the error i get is $ vault write secret/my-app foo=bar Error writing data to secret/my-app: Error making API request. URL: PUT http://127.0.0.1:8200/v1/secret/my-app Code: 404. Errors: WARNING! The following

spring-cloud-eureka-基础搭建

杀马特。学长 韩版系。学妹 提交于 2020-01-18 03:08:23
1 介绍 Eureka 是 Netflix 开发的,一个基于 REST 服务的,服务注册与发现的组件 它主要包括两个组件:Eureka Server 和 Eureka Client Eureka Client:一个Java客户端,用于简化与 Eureka Server 的交互(通常就是微服务中的客户端和服务端) Eureka Server:提供服务注册和发现的能力(通常就是微服务中的注册中心) 各个微服务启动时,会通过 Eureka Client 向 Eureka Server 注册自己,Eureka Server 会存储该服务的信息 同步:每个 Eureka Server 同时也是 Eureka Client(逻辑上的)    多个 Eureka Server 之间通过复制的方式完成服务注册表的同步,形成 Eureka 的高可用 识别:Eureka Client 会缓存 Eureka Server 中的信息    即使所有 Eureka Server 节点都宕掉,服务消费者仍可使用缓存中的信息找到服务提供者(笔者已亲测) 续约:微服务会周期性(默认30s)地向 Eureka Server 发送心跳以Renew(续约)信息(类似于heartbeat) 续期:Eureka Server 会定期(默认60s)执行一次失效服务检测功能    它会检查超过一定时间(默认90s

LoadBalancing Spring cloud data flow server

不打扰是莪最后的温柔 提交于 2020-01-17 06:52:34
问题 In spring cloud dataflow, as per my understanding each stream is a microservice but the dataflow server is not. Am I right? Is it possible to have multiple instances of spring cloud dataflow(SCDF) server? How to loadbalance the dataflow server? I am planning to deploy it in AWS.The official documentation didn't mention anything about loadbalancing of dataflow server. If it is possible how do Dashboard, shell works? 回答1: The SCDF-server is a regular Spring MVC + Spring Boot application that

Cannot enable /monitor endpoint for spring-cloud-bus for push notifications

拈花ヽ惹草 提交于 2020-01-17 03:34:14
问题 I have configured spring cloud config to read properties from a git repository.With the current implementation if there is a change in the configuration, if post to /refresh on my client I am able to see the updated properties. Now, I would like to use the spring-cloud-bus-monitor to detect changes in my git repo and automatically refresh the properties in my client endpoints. Even after adding spring-cloud-config-monitor in the dependencies - the /monitor endpoint is not enabled, and

How to use “Kafka Streams Binder” with “Functional Style” and DI?

徘徊边缘 提交于 2020-01-16 18:20:14
问题 https://cloud.spring.io/spring-cloud-static/spring-cloud-stream-binder-kafka/3.0.0.M3/reference/html/spring-cloud-stream-binder-kafka.html#_programming_model shows an example where the input topic can be set using the property spring.cloud.stream.bindings.process_in.destination . Now I want to use dependency injection, e.g. @Bean public java.util.function.Consumer<KStream<Object, String>> process(JavaMailSender mailSender) {...} When starting the application (based on Spring Boot) the

11.Spring-Cloud-Hystrix之熔断监控Turbine

夙愿已清 提交于 2020-01-15 09:27:02
上篇博文中学到了Hystrix Board监控单个应用,除此之外还有一个Turbine提供的监控点/trubine.stream是对集群的监控使用。在复杂的分布式系统中,相同服务的节点经常需要部署上百甚至上千个,很多时候,运维人员希望能够把相同服务的节点状态以一个整体集群的形式展现出来,这样可以更好的把握整个系统的状态。 为此,Netflix提供了一个开源项目(Turbine)来提供把多个hystrix.stream的内容聚合为一个数据源供Dashboard展示。 一:构建Turbine项目 1.pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>8.spring-cloud-turbine</groupId> <artifactId>turbine</artifactId> <packaging>jar</packaging>

7.Spring-Cloud服务容错保护之Hystrix初探

霸气de小男生 提交于 2020-01-15 09:23:30
在微服务架构中,存在着多个服务单元,若一个单元出现故障,就很容易因依赖关系而出现故障的蔓延,最终导致整个系统的瘫痪,这样的架构相较传统的架构更加不稳定,为了解决这样的问题,产生了断路器等一系列的服务保护机制。 "断路器"本身是一种开关装置,用于在电路上保护线路过载,当线路中有电器发生短路,"断路器"能够及时切断故障电路,防止发生过载、发热甚至起火等严重后果。 分布式架构中,断路器模式的作用也是类似的,当某个服务单元发生故障(类似于用电器发生短路)之后,通过断路器的故障监控(l类似熔断器保险丝),向调用方返回一个错误响应,而不是长时间的等待。这样就不会使得线程因调用故障服务被长时间占用不释放,避免了故障在分布式系统的蔓延。 针对上述问题,SpringCloudHystrix实现了断路器、线程隔离等一系列服务保护功能。它也是基于Netflix的开源框架Hystrix实现的,该框架的目标在于通过控制那些访问远程系统、服务和第三方库的节点,从而对延迟和故障提供强大的容错能力。Hystrix具备服务降级、服务熔断、线程和信号隔离、请求缓存合并以及服务监控等强大的功能。 -----来自《SpringCloud微服务实战》 ​ 上图为正常的微服务调用 ​ 当某个服务出现故障Hystrix回退防止级联故障,较低级别的服务中的服务故障可能导致用户级联故障。当对特定服务的检测达到一定阈值时

Spring cloud config server not loading the properties files

半腔热情 提交于 2020-01-15 07:26:09
问题 I'm trying to use this sample spring cloud config server application https://github.com/spring-cloud-samples/configserver but it is not working as expected in my local "windows 7" machine. When I try to access http://localhost:8888/foo/development I'm getting an result as below without any properties { "name": "foo", "profiles": [ "development" ], "label": "master", "propertySources": [ ] } Below are some of the logs related to the property file loading 2015-04-13 17:46:03.381 DEBUG 6684 ---

springCloud如果遇到网关问题Consider defining a bean of type 'org.springframework.http.codec.ServerCodec

瘦欲@ 提交于 2020-01-14 23:17:08
把 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifactId> <dependency> 修改成 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </exclusion> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </exclusion> </exclusions> </dependency> 即排除这两个即可 来源: CSDN 作者: 哆啦A豪 链接: https://blog.csdn.net/wenhao24725/article