herokuには1つのサービスが導入されています。私のサービスはクラウドメッセージサービスとしてcloudamqpを使用します。私のローカルenv私の接続で実行されている私のサービスが成功し、私はこのエラーが見つかりませんでした。春のブートherokuに展開したときのcloudmaqpエラーへのバインド
私はherokuに私のサービスを配備するとき、私はこのエラーを持っています。
2017-10-30T06:03:05.231416+00:00 app[web.1]: 2017-10-30 06:03:05.231 INFO 4 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : Getting all instance registry info from the eureka server
2017-10-30T06:03:05.256787+00:00 app[web.1]: 2017-10-30 06:03:05.256 INFO 4 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : The response status is 200
2017-10-30T06:03:07.002922+00:00 app[web.1]: 2017-10-30 06:03:07.002 WARN 4 --- [nfoReplicator-0] o.s.b.a.health.RabbitHealthIndicator : Health check failed
2017-10-30T06:03:07.002970+00:00 app[web.1]:
2017-10-30T06:03:07.002971+00:00 app[web.1]: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
2017-10-30T06:03:07.002972+00:00 app[web.1]: at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:62)
2017-10-30T06:03:07.002972+00:00 app[web.1]: at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:368)
2017-10-30T06:03:07.002973+00:00 app[web.1]: at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:573)
2017-10-30T06:03:07.002974+00:00 app[web.1]: at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:1430)
2017-10-30T06:03:07.002974+00:00 app[web.1]: at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1411)
2017-10-30T06:03:07.002975+00:00 app[web.1]: at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1387)
2017-10-30T06:03:07.002976+00:00 app[web.1]: at org.springframework.boot.actuate.health.RabbitHealthIndicator.getVersion(RabbitHealthIndicator.java:49)
2017-10-30T06:03:07.002976+00:00 app[web.1]: at org.springframework.boot.actuate.health.RabbitHealthIndicator.doHealthCheck(RabbitHealthIndicator.java:45)
2017-10-30T06:03:07.002977+00:00 app[web.1]: at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:43)
2017-10-30T06:03:07.002977+00:00 app[web.1]: at org.springframework.boot.actuate.health.CompositeHealthIndicator.health(CompositeHealthIndicator.java:68)
2017-10-30T06:03:07.002978+00:00 app[web.1]: at org.springframework.cloud.netflix.eureka.EurekaHealthCheckHandler.getHealthStatus(EurekaHealthCheckHandler.java:103)
2017-10-30T06:03:07.002978+00:00 app[web.1]: at org.springframework.cloud.netflix.eureka.EurekaHealthCheckHandler.getStatus(EurekaHealthCheckHandler.java:99)
2017-10-30T06:03:07.002978+00:00 app[web.1]: at com.netflix.discovery.DiscoveryClient.refreshInstanceInfo(DiscoveryClient.java:1362)
2017-10-30T06:03:07.002979+00:00 app[web.1]: at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:100)
2017-10-30T06:03:07.002980+00:00 app[web.1]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2017-10-30T06:03:07.002980+00:00 app[web.1]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2017-10-30T06:03:07.002981+00:00 app[web.1]: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
2017-10-30T06:03:07.002981+00:00 app[web.1]: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
2017-10-30T06:03:07.002982+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
2017-10-30T06:03:07.002983+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
2017-10-30T06:03:07.002983+00:00 app[web.1]: at java.lang.Thread.run(Thread.java:748)
2017-10-30T06:03:07.002984+00:00 app[web.1]: Caused by: java.net.ConnectException: Connection refused (Connection refused)
2017-10-30T06:03:07.002985+00:00 app[web.1]: at java.net.PlainSocketImpl.socketConnect(Native Method)
2017-10-30T06:03:07.002985+00:00 app[web.1]: at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
2017-10-30T06:03:07.002986+00:00 app[web.1]: at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
2017-10-30T06:03:07.002987+00:00 app[web.1]: at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
2017-10-30T06:03:07.002987+00:00 app[web.1]: at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
2017-10-30T06:03:07.002988+00:00 app[web.1]: at java.net.Socket.connect(Socket.java:589)
2017-10-30T06:03:07.002989+00:00 app[web.1]: at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:50)
2017-10-30T06:03:07.002989+00:00 app[web.1]: at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:907)
2017-10-30T06:03:07.002990+00:00 app[web.1]: at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:859)
2017-10-30T06:03:07.002990+00:00 app[web.1]: at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:799)
2017-10-30T06:03:07.002991+00:00 app[web.1]: at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:352)
2017-10-30T06:03:07.002992+00:00 app[web.1]: ... 19 common frames omitted
2017-10-30T06:03:07.002993+00:00 app[web.1]:
私のrabbitmq管理ページが表示されたら、私のサービスは正常に私のcloudamqp rabbitmqサーバに接続します。
spring:
application:
name: filehandler
jackson:
serialization.write_dates_as_timestamps: false
jpa:
open-in-view: false
hibernate:
ddl-auto: update
naming:
physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
messages:
basename: i18n/messages
mvc:
favicon:
enabled: false
thymeleaf:
mode: XHTML
cloud:
stream:
bindings:
fileOutput:
destination: file
binder: rabbitmqserver
contentType: application/x-java-serialized-object
indexInput:
destination: index
binder: rabbitmqserver
contentType: application/x-java-serialized-object
binders:
rabbitmqserver:
type: rabbit
environment:
spring:
rabbitmq:
addresses: elephant.rmq.cloudamqp.com
username: username
password: password
virtual-host: virtualhost
は、誰かがこの問題で私を助けることができる。これ
これは私のサービスの私application.ymlであるように示します。
rabbitmqサーバーの場所の設定がないようです。 –
私はapplication.ymlでspring.cloud.bindersプロパティを持っています – ismailzakky
申し訳ありません。それを逃した。私には大丈夫です。アイデアはありません、申し訳ありません。 –