2017-12-05 11 views
15

में एकत्रीकरण के लिए लोड नहीं हो रहा है मैं वसंत एमवीसी और वसंत बूट ढांचे का उपयोग कर वसंत क्लाउड माइक्रोस्कोप विकसित करने की कोशिश कर रहा हूं। और यूरेका सर्वर, जुउल, रिबन, हाइस्ट्रिक्स और टरबाइन वसंत बादल के लिए उपयोग कर रहे हैं। मैंने पहले से ही एक माइक्रोस्कोप विकसित किया है और केवल हाइस्ट्रिक्स डैशबोर्ड लागू किया है। मैं hystrix डैशबोर्ड लेने में सक्षम हूँ। अब मैं और सेवाएं लागू कर रहा हूं। तो मैंने निगरानी के एकत्रीकरण के लिए टरबाइन का चयन किया। लेकिन यह डैशबोर्ड नहीं मिला। मैंने अलग वसंत बूट परियोजना में टरबाइन लागू किया।टर्बाइन डैशबोर्ड स्प्रिंग क्लाउड माइक्रोस्कोस

मेरे pom.xml युक्त,

<dependency> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-actuator</artifactId> 
</dependency> 
<dependency> 
    <groupId>org.springframework.cloud</groupId> 
    <artifactId>spring-cloud-starter-hystrix</artifactId> 
</dependency> 
<dependency> 
    <groupId>org.springframework.cloud</groupId> 
    <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId> 
</dependency> 
<dependency> 
    <groupId>org.springframework.cloud</groupId> 
    <artifactId>spring-cloud-starter-turbine</artifactId> 
</dependency> 

और मेरा मुख्य क्लास वाली,

@SpringBootApplication 
@EnableHystrixDashboard 
@EnableCircuitBreaker 
@EnableTurbine 

public class ZTurbineClientApplication { 

    public static void main(String[] args) { 
    SpringApplication.run(ZTurbineClientApplication.class, args); 
    } 
} 

और मेरे टर्बाइन परियोजना युक्त फ़ाइल application.properties,

server.port=8085 
spring.application.name=espace-Turbine 
eureka.client.serviceUrl.defaultZone=http://localhost:8071/eureka/ 
eureka.client.register-with-eureka=true 
eureka.client.fetch-registry=true 
turbine: 
aggregator: 
    clusterConfig: APPCLUSTER 
app-config: espaceService1,espaceService2 
instanceUrlSuffix.APPCLUSTER: /hystrix.stream 

और मेरे पिछले पहली सेवाओं की application.properties फ़ाइल

eureka.client.serviceUrl.defaultZone=http://localhost:8071/eureka/ 
eureka.client.register-with-eureka=true 
eureka.client.fetch-registry=true 
spring.application.name=espaceService1 
server.port=8080 
eureka: 
    instance: 
    prefer-ip-address: true 
    leaseRenewalIntervalInSeconds: 3 
    leaseExpirationDurationInSeconds: 3 
    metadata-map: 
     cluster: APPCLUSTER 

और दूसरा सेवा के आवेदन संपत्ति फ़ाइल है,

eureka.client.serviceUrl.defaultZone=http://localhost:8071/eureka/ 
eureka.client.register-with-eureka=true 
eureka.client.fetch-registry=true 
spring.application.name=espaceService2 
server.port=8081 
eureka: 
    instance: 
    prefer-ip-address: true 
    leaseRenewalIntervalInSeconds: 3 
    leaseExpirationDurationInSeconds: 3 
    metadata-map: 
     cluster: APPCLUSTER 

ये मेरे कार्यान्वयन विवरण हैं।

यूआरएल "http://localhost:8085/hystrix.dashboard" यूआरएल लेने के बाद। और चिपकाया "http://localhost:8085/turbine.stream?cluster=APPCLUSTER"। लेकिन "कमांड मेट्रिक स्ट्रीम से कनेक्ट करने में असमर्थ" जैसी त्रुटि प्राप्त हो रही है। नीचे स्क्रीनशॉट जोड़ना।

enter image description here

enter image description here

+0

आप कर रहे हैं टर्बाइन को एक hystrix.stream पर इंगित करना? क्या कोड पथ है जिसमें सर्किट ब्रेकर का उपयोग किया गया है? – spencergibb

+0

मैंने पहले से ही अपनी सेवा को हाइस्ट्रिक्स के साथ कार्यान्वित किया है। इसके बाद मैं टर्बाइन का उपयोग करके निगरानी को एकत्रित करने की कोशिश कर रहा हूं। इसलिए हाइस्ट्रिक्स डैशबोर्ड पेज में मैं turbine.stream..service और टरबाइन प्रोजेक्ट अलग करने की कोशिश कर रहा हूं। और सेवा में मैंने सर्किट ब्रेकर – Jacob

उत्तर

0

आप अंतरिक्ष हटाने की जरूरत अल्पविराम सेवा के नाम अलग से

turbine.aggregator.cluster-config=espace-Second_Microservice,espaceFirst_Microservice 

आप समेकित रूप नहीं अलग क्लस्टर के नाम से नदियों, या तो दोनों स्पास-Second_Microservice में एक क्लस्टर नाम का उपयोग कर सकते और espace-First_Microservice या क्लस्टर का उपयोग न करें।

To define one cluster name use below config 

    eureka: 
     instance: 
     prefer-ip-address: true 
     leaseRenewalIntervalInSeconds: 3 
     leaseExpirationDurationInSeconds: 3 
     metadata-map: 
      cluster: APPCLUSTER 

उपयोग नीचे टरबाइन के लिए config उल्लेख

turbine: 
    aggregator: 
    clusterConfig: APPCLUSTER 
    app-config: espace-Second_Microservice,espace-First_Microservice 
    instanceUrlSuffix.APPCLUSTER: /hystrix.stream 

http उपयोग: // {टरबाइन मेजबान}: {टरबाइन पोर्ट} /turbine.stream?cluster=APPCLUSTER Hystrix डैशबोर्ड में

+0

लागू किया। हाँ। मैंने ऊपर के अनुसार संशोधित किया है। लेकिन अभी भी स्क्रीन में त्रुटि हो रही है कि "कमांड मेट्रिक स्ट्रीम से कनेक्ट करने में असमर्थ"। और देर से जवाब के लिए भी खेद है। मैं कोड संशोधित कर रहा हूं। क्या आप कृपया – Jacob

+0

पर देख सकते हैं आप yaml फ़ाइल और गुण फ़ाइल के लिए कॉन्फ़िगरेशन मिश्रण कर रहे हैं। यदि आप .properties फ़ाइल –

+0

eureka.instance.preferIpAddress = true eureka.instance.leaseRenewalIntervalInSeconds = 3 eureka.instance का उपयोग कर रहे हैं, तो आपको गुण फ़ाइल प्रारूप में कॉन्फ़िगरेशन को परिभाषित करने की आवश्यकता है।leaseExpirationDurationInSeconds = 3 eureka.instance.metadataMap.cluster = APPCLUSTER –

संबंधित मुद्दे