Disconnected received Connect: can't connect to amqp://guest@{rabbitTestHost:5672}:5672

ScalaBoy

I started RabbitMq on docker. This is the output of docker ps:

CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                                NAMES
93dcba1c9b74        rabbitmq:3          "docker-entrypoint.s…"   About a minute ago   Up 9 seconds        4369/tcp, 5671-5672/tcp, 25672/tcp   rabbitTestQueue

Then I used Scala code of op-rabbit with the following configuration in application.conf:

-rabbit {
  topic-exchange-name = "rabbitTestQueue"
  channel-dispatcher = "op-rabbit.default-channel-dispatcher"
  default-channel-dispatcher {
    type = Dispatcher

    executor = "fork-join-executor"

    fork-join-executor {
      parallelism-min = 2
      parallelism-factor = 2.0
      parallelism-max = 4
    }
    throughput = 100
  }
  connection {
    virtual-host = "/"
    hosts = ["rabbitTestHost"]
    #username = "guest"
    #password = "guest"
    port = 5672
    ssl = false
    connection-timeout = 3s
  }
}

This is my code:

import akka.actor.{ActorSystem, Props}
import com.spingo.op_rabbit._
import scala.concurrent.ExecutionContext
import play.api.libs.json._

case class Query(query: String)

object MainApp extends App {
  import PlayJsonSupport._
  implicit val actorSystem = ActorSystem("KaliumApp")
  implicit val dataFormat = Json.format[Query]

  val rabbitControl = actorSystem.actorOf(Props(new RabbitControl))
  implicit val recoveryStrategy = RecoveryStrategy.nack(false)
  import ExecutionContext.Implicits.global

  val queryQueue = Queue("rabbitTestQueue", durable = false, autoDelete = true)
  val subscription = Subscription.run(rabbitControl) {
    import Directives._
    channel(qos=3) {
      consume(queryQueue) {
        body(as[Query]) { queryObj =>
          println(s"received ${queryObj.query}")
          ack
        }
      }
    }
  }
}

When I run my code, I get the following error:

akka://MainApp/user/$a/connection in Disconnected received Connect: can't connect to amqp://guest@{rabbitTestHost:5672}:5672//, retrying in 10 seconds

How can I solve this issue? Should I change some configuration in application.conf?

Luke Bakken

The RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.


Based on this message:

Connect: can't connect to amqp://guest@{rabbitTestHost:5672}:5672//

It looks as though the value of ["rabbitTestHost"] is rabbitTestHost:5672 when it should be just rabbitTestHost. Notice that 5672 is duplicated in the connect message.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

切断された受信接続:amqp:// guest @ {rabbitTestHost:5672}:5672に接続できません

分類Dev

Django Celery-amqp://[email protected]:5672 //に接続できません

分類Dev

WSL:ERROR / MainProcess]コンシューマー:amqp:// guest:** @ 127.0.0.1:5672 //に接続できません:ソケットが閉じています

分類Dev

Can't connect to redis on heroku

分類Dev

actioncable can't connect to websocket

分類Dev

ADB can't connect to Nox

分類Dev

Ldapjs can't connect with a server

分類Dev

Can't connect to noVNC server

分類Dev

Wireless down and can't connect

分類Dev

Ubuntu One can't connect

分類Dev

Web service can connect in IE, but can't connect by Visual studio

分類Dev

Why can't I connect to VMWare guest ubuntu via Telnet nor SSH from host?

分類Dev

Mysql password expired. Can't connect

分類Dev

Spring rspec can't connect to the database

分類Dev

Can't connect to MariaDB on localhost using DBeaver

分類Dev

Can't connect to localhost MySQL server with PHP

分類Dev

Why can't pgAdmin III connect to Postgres?

分類Dev

Can't connect to server via SSH

分類Dev

Can't connect MongoDb via JNDI in java

分類Dev

Metricbeat kubernetes module can’t connect to kubelet

分類Dev

Can't connect to db from docker container

分類Dev

can't connect to mysql database on android KivyMD

分類Dev

Can't Connect to MongoDB using Mongoose

分類Dev

UdpClient can't receive after connect

分類Dev

Windows 10 can’t connect to intranet devices

分類Dev

Can't connect to internet on minimal Ubuntu

分類Dev

Can't connect to hostapd hotspot - Password Loop

分類Dev

QuickBlox WebRTC iOS: can't connect properly

分類Dev

Ubuntu Server 16.04.3 Can't Connect to Internet

Related 関連記事

  1. 1

    切断された受信接続:amqp:// guest @ {rabbitTestHost:5672}:5672に接続できません

  2. 2

    Django Celery-amqp://[email protected]:5672 //に接続できません

  3. 3

    WSL:ERROR / MainProcess]コンシューマー:amqp:// guest:** @ 127.0.0.1:5672 //に接続できません:ソケットが閉じています

  4. 4

    Can't connect to redis on heroku

  5. 5

    actioncable can't connect to websocket

  6. 6

    ADB can't connect to Nox

  7. 7

    Ldapjs can't connect with a server

  8. 8

    Can't connect to noVNC server

  9. 9

    Wireless down and can't connect

  10. 10

    Ubuntu One can't connect

  11. 11

    Web service can connect in IE, but can't connect by Visual studio

  12. 12

    Why can't I connect to VMWare guest ubuntu via Telnet nor SSH from host?

  13. 13

    Mysql password expired. Can't connect

  14. 14

    Spring rspec can't connect to the database

  15. 15

    Can't connect to MariaDB on localhost using DBeaver

  16. 16

    Can't connect to localhost MySQL server with PHP

  17. 17

    Why can't pgAdmin III connect to Postgres?

  18. 18

    Can't connect to server via SSH

  19. 19

    Can't connect MongoDb via JNDI in java

  20. 20

    Metricbeat kubernetes module can’t connect to kubelet

  21. 21

    Can't connect to db from docker container

  22. 22

    can't connect to mysql database on android KivyMD

  23. 23

    Can't Connect to MongoDB using Mongoose

  24. 24

    UdpClient can't receive after connect

  25. 25

    Windows 10 can’t connect to intranet devices

  26. 26

    Can't connect to internet on minimal Ubuntu

  27. 27

    Can't connect to hostapd hotspot - Password Loop

  28. 28

    QuickBlox WebRTC iOS: can't connect properly

  29. 29

    Ubuntu Server 16.04.3 Can't Connect to Internet

ホットタグ

アーカイブ