首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >弹簧云涡轮机-没有从/turbine.stream返回的数据

弹簧云涡轮机-没有从/turbine.stream返回的数据
EN

Stack Overflow用户
提问于 2017-02-21 23:15:06
回答 3查看 1.4K关注 0票数 0

我的技术堆栈包括以下内容

  • 尤里卡发现服务器
  • Zuul网关
  • 服务器
  • 透明仪表板
  • 启用Hystrix流的核心服务。

Hystrix仪表板运行良好,因为我能够使用从服务中公开的hystrics.stream流。

但是,每当我试图将涡轮机添加到这个堆栈时,/turbine.stream只在浏览器上重复返回data: {"type":"Ping"},因此Hystrix仪表板显示Unable to connect to Command Metric Stream

有人能帮我找出我哪里出了问题吗?

这是我的涡轮机的关键配置。TurbineAppliation类只是一个带有@EnableTurbineStream的listing引导应用程序,所以不要在下面列出它。

pom依赖关系:

代码语言:javascript
复制
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.1.RELEASE</version>
</parent>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Camden.SR5</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-config-client</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-turbine-stream</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
    </dependency>

</dependencies>

bootstrap.yml:(如果不重要的话,请忽略eureka特定的配置,因为我没有亲自对它们进行调优)。配置服务器和eureka设置对于工作正常的所有其他组件都是相同的。

代码语言:javascript
复制
spring:
  application:
    name: Turbine
  cloud:
    config:
      enabled: true
      discovery:
        enabled: true
        serviceId: ConfigServer

management:
  security:
    enabled: false

eureka:
  instance:
    leaseRenewalIntervalInSeconds: 10
#    leaseExpirationDurationInSeconds: 2
    preferIpAddress: true
    ipAddress: 127.0.0.1
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/discovery/eureka/ ---discovery is my eureka context root required for my app

application.yml

代码语言:javascript
复制
server:
  port: 7980

info:
  component: Turbine App

turbine:
  aggregator:
    clusterConfig: MY-SERVICE
  appConfig: MY-SERVICE
  clusterNameExpression: new String('default')
  InstanceMonitor:
    eventStream:
      skipLineLogic:
        enabled: false
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2017-04-21 12:53:34

嗨,我正在用Camden.SR6处理同样的问题。

在透平服务pom.xml中添加以下内容之后,我能够在hystrix仪表板中使用透平流:

代码语言:javascript
复制
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-netflix-hystrix-amqp</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-bus-amqp</artifactId>
    </dependency>

我还添加了:Spring.rabbitmq.Address=兔子-mq:5672到bootstrap.properties文件。

票数 0
EN

Stack Overflow用户

发布于 2017-02-23 16:35:08

使用Spring SR5的新版本,将rabbitMQ队列从springCloudHystrixStream重命名为turbineStreamInput。作为一种解决办法,您可以指定spring-cloud-stream的前一个版本。

代码语言:javascript
复制
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream</artifactId>
        <version>1.1.0.RELEASE</version>
    </dependency>
票数 0
EN

Stack Overflow用户

发布于 2017-03-22 13:24:49

在pom中使用涡轮机应用程序

代码语言:javascript
复制
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-netflix</artifactId>
            <version>1.3.0.M1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42379802

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档