How to resolve RabbitMQ Server connection error in Spring-cloud-sleuth-zipkin (Edgware.SR5)











up vote
0
down vote

favorite












I need to send spans through RabbitMQ to Zipkin. I'm Using Spring-Cloud-Sleuth Edgware-SR5 version and SpringBoot 1.5.3.RELEASE versions.
With older Spring-cloud sleuth version (spring-cloud-stream-binder-rabbit - v1.1.4.RELEASE) it was working fine.



When I try to start the service, I'm getting " "AsyncReporter{RabbitMQSender{addresses=[localhost:5672], queue=zipkin}}. Unable to establish connection to RabbitMQ server" error.
I have gone through the documentations, but I could't able to resolve this issue.



Gradle Configuration:



dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:Edgware.SR5"
}
}

compile 'org.springframework.cloud:spring-cloud-starter-sleuth'
compile 'org.springframework.cloud:spring-cloud-starter-zipkin'
compile 'org.springframework.boot:spring-boot-starter-amqp'
compile 'org.springframework.amqp:spring-rabbit'


Application.yml:



spring:
sleuth:
enabled: true
async:
enabled: true
sampler:
percentage: 1.0
zipkin:
baseUrl:
sender:
type: rabbit


Exception StackTrace:



Exception in thread "AsyncReporter{RabbitMQSender{addresses=[localhost:5672], queue=zipkin}}" java.lang.IllegalStateException: Unable to establish connection to RabbitMQ server
at zipkin2.reporter.amqp.RabbitMQSender.get(RabbitMQSender.java:190)
at zipkin2.reporter.amqp.AutoValue_RabbitMQSender.get(AutoValue_RabbitMQSender.java:27)
at zipkin2.reporter.amqp.RabbitMQSender$1.initialValue(RabbitMQSender.java:211)
at zipkin2.reporter.amqp.RabbitMQSender$1.initialValue(RabbitMQSender.java:208)
at java.lang.ThreadLocal.setInitialValue(Unknown Source)
at java.lang.ThreadLocal.get(Unknown Source)
at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.publish(RabbitMQSender.java:231)
at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.doExecute(RabbitMQSender.java:226)
at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.doExecute(RabbitMQSender.java:218)
at zipkin2.Call$Base.execute(Call.java:379)
at zipkin2.reporter.AsyncReporter$BoundedAsyncReporter.flush(AsyncReporter.java:272)
at zipkin2.reporter.AsyncReporter$Builder$1.run(AsyncReporter.java:179)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:50)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:907)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:859)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:736)
at zipkin2.reporter.amqp.RabbitMQSender.get(RabbitMQSender.java:188)


Thanks and Regards
Suresh










share|improve this question




























    up vote
    0
    down vote

    favorite












    I need to send spans through RabbitMQ to Zipkin. I'm Using Spring-Cloud-Sleuth Edgware-SR5 version and SpringBoot 1.5.3.RELEASE versions.
    With older Spring-cloud sleuth version (spring-cloud-stream-binder-rabbit - v1.1.4.RELEASE) it was working fine.



    When I try to start the service, I'm getting " "AsyncReporter{RabbitMQSender{addresses=[localhost:5672], queue=zipkin}}. Unable to establish connection to RabbitMQ server" error.
    I have gone through the documentations, but I could't able to resolve this issue.



    Gradle Configuration:



    dependencyManagement {
    imports {
    mavenBom "org.springframework.cloud:spring-cloud-dependencies:Edgware.SR5"
    }
    }

    compile 'org.springframework.cloud:spring-cloud-starter-sleuth'
    compile 'org.springframework.cloud:spring-cloud-starter-zipkin'
    compile 'org.springframework.boot:spring-boot-starter-amqp'
    compile 'org.springframework.amqp:spring-rabbit'


    Application.yml:



    spring:
    sleuth:
    enabled: true
    async:
    enabled: true
    sampler:
    percentage: 1.0
    zipkin:
    baseUrl:
    sender:
    type: rabbit


    Exception StackTrace:



    Exception in thread "AsyncReporter{RabbitMQSender{addresses=[localhost:5672], queue=zipkin}}" java.lang.IllegalStateException: Unable to establish connection to RabbitMQ server
    at zipkin2.reporter.amqp.RabbitMQSender.get(RabbitMQSender.java:190)
    at zipkin2.reporter.amqp.AutoValue_RabbitMQSender.get(AutoValue_RabbitMQSender.java:27)
    at zipkin2.reporter.amqp.RabbitMQSender$1.initialValue(RabbitMQSender.java:211)
    at zipkin2.reporter.amqp.RabbitMQSender$1.initialValue(RabbitMQSender.java:208)
    at java.lang.ThreadLocal.setInitialValue(Unknown Source)
    at java.lang.ThreadLocal.get(Unknown Source)
    at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.publish(RabbitMQSender.java:231)
    at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.doExecute(RabbitMQSender.java:226)
    at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.doExecute(RabbitMQSender.java:218)
    at zipkin2.Call$Base.execute(Call.java:379)
    at zipkin2.reporter.AsyncReporter$BoundedAsyncReporter.flush(AsyncReporter.java:272)
    at zipkin2.reporter.AsyncReporter$Builder$1.run(AsyncReporter.java:179)
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:50)
    at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:907)
    at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:859)
    at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:736)
    at zipkin2.reporter.amqp.RabbitMQSender.get(RabbitMQSender.java:188)


    Thanks and Regards
    Suresh










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I need to send spans through RabbitMQ to Zipkin. I'm Using Spring-Cloud-Sleuth Edgware-SR5 version and SpringBoot 1.5.3.RELEASE versions.
      With older Spring-cloud sleuth version (spring-cloud-stream-binder-rabbit - v1.1.4.RELEASE) it was working fine.



      When I try to start the service, I'm getting " "AsyncReporter{RabbitMQSender{addresses=[localhost:5672], queue=zipkin}}. Unable to establish connection to RabbitMQ server" error.
      I have gone through the documentations, but I could't able to resolve this issue.



      Gradle Configuration:



      dependencyManagement {
      imports {
      mavenBom "org.springframework.cloud:spring-cloud-dependencies:Edgware.SR5"
      }
      }

      compile 'org.springframework.cloud:spring-cloud-starter-sleuth'
      compile 'org.springframework.cloud:spring-cloud-starter-zipkin'
      compile 'org.springframework.boot:spring-boot-starter-amqp'
      compile 'org.springframework.amqp:spring-rabbit'


      Application.yml:



      spring:
      sleuth:
      enabled: true
      async:
      enabled: true
      sampler:
      percentage: 1.0
      zipkin:
      baseUrl:
      sender:
      type: rabbit


      Exception StackTrace:



      Exception in thread "AsyncReporter{RabbitMQSender{addresses=[localhost:5672], queue=zipkin}}" java.lang.IllegalStateException: Unable to establish connection to RabbitMQ server
      at zipkin2.reporter.amqp.RabbitMQSender.get(RabbitMQSender.java:190)
      at zipkin2.reporter.amqp.AutoValue_RabbitMQSender.get(AutoValue_RabbitMQSender.java:27)
      at zipkin2.reporter.amqp.RabbitMQSender$1.initialValue(RabbitMQSender.java:211)
      at zipkin2.reporter.amqp.RabbitMQSender$1.initialValue(RabbitMQSender.java:208)
      at java.lang.ThreadLocal.setInitialValue(Unknown Source)
      at java.lang.ThreadLocal.get(Unknown Source)
      at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.publish(RabbitMQSender.java:231)
      at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.doExecute(RabbitMQSender.java:226)
      at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.doExecute(RabbitMQSender.java:218)
      at zipkin2.Call$Base.execute(Call.java:379)
      at zipkin2.reporter.AsyncReporter$BoundedAsyncReporter.flush(AsyncReporter.java:272)
      at zipkin2.reporter.AsyncReporter$Builder$1.run(AsyncReporter.java:179)
      Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
      at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:50)
      at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:907)
      at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:859)
      at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:736)
      at zipkin2.reporter.amqp.RabbitMQSender.get(RabbitMQSender.java:188)


      Thanks and Regards
      Suresh










      share|improve this question















      I need to send spans through RabbitMQ to Zipkin. I'm Using Spring-Cloud-Sleuth Edgware-SR5 version and SpringBoot 1.5.3.RELEASE versions.
      With older Spring-cloud sleuth version (spring-cloud-stream-binder-rabbit - v1.1.4.RELEASE) it was working fine.



      When I try to start the service, I'm getting " "AsyncReporter{RabbitMQSender{addresses=[localhost:5672], queue=zipkin}}. Unable to establish connection to RabbitMQ server" error.
      I have gone through the documentations, but I could't able to resolve this issue.



      Gradle Configuration:



      dependencyManagement {
      imports {
      mavenBom "org.springframework.cloud:spring-cloud-dependencies:Edgware.SR5"
      }
      }

      compile 'org.springframework.cloud:spring-cloud-starter-sleuth'
      compile 'org.springframework.cloud:spring-cloud-starter-zipkin'
      compile 'org.springframework.boot:spring-boot-starter-amqp'
      compile 'org.springframework.amqp:spring-rabbit'


      Application.yml:



      spring:
      sleuth:
      enabled: true
      async:
      enabled: true
      sampler:
      percentage: 1.0
      zipkin:
      baseUrl:
      sender:
      type: rabbit


      Exception StackTrace:



      Exception in thread "AsyncReporter{RabbitMQSender{addresses=[localhost:5672], queue=zipkin}}" java.lang.IllegalStateException: Unable to establish connection to RabbitMQ server
      at zipkin2.reporter.amqp.RabbitMQSender.get(RabbitMQSender.java:190)
      at zipkin2.reporter.amqp.AutoValue_RabbitMQSender.get(AutoValue_RabbitMQSender.java:27)
      at zipkin2.reporter.amqp.RabbitMQSender$1.initialValue(RabbitMQSender.java:211)
      at zipkin2.reporter.amqp.RabbitMQSender$1.initialValue(RabbitMQSender.java:208)
      at java.lang.ThreadLocal.setInitialValue(Unknown Source)
      at java.lang.ThreadLocal.get(Unknown Source)
      at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.publish(RabbitMQSender.java:231)
      at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.doExecute(RabbitMQSender.java:226)
      at zipkin2.reporter.amqp.RabbitMQSender$RabbitMQCall.doExecute(RabbitMQSender.java:218)
      at zipkin2.Call$Base.execute(Call.java:379)
      at zipkin2.reporter.AsyncReporter$BoundedAsyncReporter.flush(AsyncReporter.java:272)
      at zipkin2.reporter.AsyncReporter$Builder$1.run(AsyncReporter.java:179)
      Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
      at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:50)
      at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:907)
      at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:859)
      at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:736)
      at zipkin2.reporter.amqp.RabbitMQSender.get(RabbitMQSender.java:188)


      Thanks and Regards
      Suresh







      spring-rabbitmq spring-cloud-sleuth






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 8 at 13:46

























      asked Nov 8 at 13:19









      user1256795

      62




      62
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote














          Connection refused: connect




          Simply means that RabbitMQ is not running on localhost:5672 (which is the default if you don't provide a host/port, or addresses, for it in your application.yml).






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53208598%2fhow-to-resolve-rabbitmq-server-connection-error-in-spring-cloud-sleuth-zipkin-e%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote














            Connection refused: connect




            Simply means that RabbitMQ is not running on localhost:5672 (which is the default if you don't provide a host/port, or addresses, for it in your application.yml).






            share|improve this answer

























              up vote
              1
              down vote














              Connection refused: connect




              Simply means that RabbitMQ is not running on localhost:5672 (which is the default if you don't provide a host/port, or addresses, for it in your application.yml).






              share|improve this answer























                up vote
                1
                down vote










                up vote
                1
                down vote










                Connection refused: connect




                Simply means that RabbitMQ is not running on localhost:5672 (which is the default if you don't provide a host/port, or addresses, for it in your application.yml).






                share|improve this answer













                Connection refused: connect




                Simply means that RabbitMQ is not running on localhost:5672 (which is the default if you don't provide a host/port, or addresses, for it in your application.yml).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 8 at 14:31









                Gary Russell

                76.4k64166




                76.4k64166






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53208598%2fhow-to-resolve-rabbitmq-server-connection-error-in-spring-cloud-sleuth-zipkin-e%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Guess what letter conforming each word

                    Port of Spain

                    Run scheduled task as local user group (not BUILTIN)