2017-02-21 87 views
0
返回任何數據

我techstack包括以下春雲渦輪 - 從/turbine.stream

  • 尤里卡發現服務器的
  • Zuul網關
  • Spring配置服務器
  • 蝟儀表板
  • 我核心服務已啓用Hystrix流。

Hystrix儀表板工作正常,因爲我能夠使用hystrics.stream使用暴露出我的服務流。

然而,每當我試圖渦輪添加到這個堆棧中,僅/turbine.stream反覆返回data: {"type":"Ping"}在瀏覽器上,因此蝟儀表板顯示了Unable to connect to Command Metric Stream

可有人請幫助我找出我我錯了嗎?

這是我的關鍵配置渦輪機。 TurbineAppliation類僅僅是一個帶有@EnableTurbineStream的springboot應用程序,所以不會在下面列出。

POM依賴關係:

<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設置對於所有其他正在工作的組件都是相同的。

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

server: 
    port: 7980 

info: 
    component: Turbine App 

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

你從兔子MQ讀取透平流,你有錐流(即兔)或只是HTTP? – spencergibb

+0

是的我的hysterix流也使用兔子,它工作得很好 – Sayantan

+0

@spencergibb - 你有什麼想法錯誤? – Sayantan

回答

0

你好我處理使用Camden.SR6同樣的問題,使用渦輪應用。

在汽輪機服務的pom.xml添加以下後,我能夠在儀表板錐使用渦輪機流:

<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文件。

enter image description here

+0

感謝您的反饋意見 – Sayantan

0

隨着春季雲卡姆登SR5改名從springCloudHystrixStreamturbineStreamInput的RabbitMQ的隊列中的新版本。 作爲解決方法,您可以指定spring-cloud-stream的以前版本。

<dependency> 
     <groupId>org.springframework.cloud</groupId> 
     <artifactId>spring-cloud-stream</artifactId> 
     <version>1.1.0.RELEASE</version> 
    </dependency> 
+0

我當然可以試試,但渦輪流如何在我使用的這個新版本中工作? – Sayantan

+0

我不知道細節,這是一個錯誤。我注意到的問題是渦輪機正在監聽turbineStreamInput,但是hystrix正在發送到springCloudHystrixStream。 – Jeff

+0

謝謝,我們會嘗試一下並更新我每次得到一些時間。我轉向其他事情,因爲我無法獲得關於此的更多信息。 – Sayantan

0

POM

<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>