As soon as cassandra starts a compaction on one of the nodes, we see our application is not able to connect to that node. what i noticed is that when compaction starts in one of the nodes, that node CPU load becomes 100% and as the compaction progresses and cpu load becomes low, our application is able to connect back to cassandra.
We are running both our java application and cassandra on the same node using m3.xlarge Amazon EC2 instance.
Both our application and cassandra has the following jvm settings -Xms2G -Xmx2G -Xmn512M. Cassandra has hardly 300MB of data, but still we see so many compaction happening.
Here is how our one of cassandra column family settings looks like , we have around 20 column family with pretty much same settings. each column family has one secondary index.
bloom_filter_fp_chance=0.010000 AND
caching='ROWS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
index_interval=128 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
default_time_to_live=0 AND
speculative_retry='99.0PERCENTILE' AND
memtable_flush_period_in_ms=0 AND
compaction={'min_threshold': '6', 'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'LZ4Compressor'};
We are running cassandra community version 2.0.5 and data mapping library https://github.com/valchkou/cassandra-driver-mapping.
I looked around ,didn't see anyone facing this sort of issue. Any help would be greatly appreciated.
Error Stacktrace
2015-07-29 18:22:50.341 DEBUG 29056 --- [New I/O worker #5] com.datastax.driver.core.Connection 234 : [] [] [] Defuncting connection to /172.31.22.125:9042
com.datastax.driver.core.TransportException: [/172.31.22.125:9042] Channel has been closed
at com.datastax.driver.core.Connection$Dispatcher.channelClosed(Connection.java:636) [cassandra-driver-core-2.1.0.jar!/:na]
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:88) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:88) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.close(AbstractNioWorker.java:375) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:93) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [netty-3.9.0.Final.jar!/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
2015-07-29 18:22:50.341 DEBUG 29056 --- [New I/O worker #5] com.datastax.driver.core.Cluster 1370 : [] [] [] Host /172.31.22.125:9042 is Suspected
2015-07-29 18:22:50.342 DEBUG 29056 --- [New I/O worker #5] com.datastax.driver.core.Connection 385 : [] [] [] [/172.31.22.125:9042-171] closing connection
2015-07-29 18:22:50.342 DEBUG 29056 --- [New I/O worker #5] com.datastax.driver.core.Connection 385 : [] [] [] [/172.31.22.125:9042-172] closing connection
2015-07-29 18:22:50.342 DEBUG 29056 --- [Cassandra Java Driver worker-36] com.datastax.driver.core.Connection 103 : [] [] [] [/172.31.22.125:9042-173] Error connecting to /172.31.22.125:9042 (Connection refused: /172.31.22.125:9042)
2015-07-29 18:22:50.342 DEBUG 29056 --- [New I/O worker #6] com.datastax.driver.core.Connection 385 : [] [] [] [/172.31.22.125:9042-173] closing connection
2015-07-29 18:22:50.343 DEBUG 29056 --- [New I/O boss #9] com.datastax.driver.core.Connection 608 : [] [] [] [/172.31.22.125:9042-173] connection error
java.net.ConnectException: Connection refused: /172.31.22.125:9042
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_75]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_75]
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150) ~[netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) ~[netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) ~[netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.9.0.Final.jar!/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
2015-07-29 18:22:50.343 DEBUG 29056 --- [Cassandra Java Driver worker-36] com.datastax.driver.core.Connection 234 : [] [] [] Defuncting connection to /172.31.22.125:9042
com.datastax.driver.core.TransportException: [/172.31.22.125:9042] Cannot connect
at com.datastax.driver.core.Connection.<init>(Connection.java:104) [cassandra-driver-core-2.1.0.jar!/:na]
at com.datastax.driver.core.Connection$Factory.open(Connection.java:445) [cassandra-driver-core-2.1.0.jar!/:na]
at com.datastax.driver.core.Cluster$Manager$4.runMayThrow(Cluster.java:1405) [cassandra-driver-core-2.1.0.jar!/:na]
at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) [cassandra-driver-core-2.1.0.jar!/:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_75]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
Caused by: java.net.ConnectException: Connection refused: /172.31.22.125:9042
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_75]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_75]
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150) ~[netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) ~[netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) ~[netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[netty-3.9.0.Final.jar!/:na]
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.9.0.Final.jar!/:na]
... 3 common frames omitted
2015-07-29 18:22:50.343 DEBUG 29056 --- [Cassandra Java Driver worker-36] com.datastax.driver.core.Cluster 1428 : [] [] [] Host /172.31.22.125:9042 is DOWN
2015-07-29 18:22:50.343 DEBUG 29056 --- [Cassandra Java Driver worker-36] c.d.driver.core.ControlConnection 592 : [] [] [] [Control connection] /172.31.22.125:9042 is down, currently connected to /172.31.27.168:9042
2015-07-29 18:22:50.343 DEBUG 29056 --- [Cassandra Java Driver worker-37] com.datastax.driver.core.Cluster 1428 : [] [] [] Host /172.31.22.125:9042 is DOWN
2015-07-29 18:22:50.344 DEBUG 29056 --- [Cassandra Java Driver worker-36] com.datastax.driver.core.Cluster 1473 : [] [] [] /172.31.22.125:9042 is down, scheduling connection retries
2015-07-29 18:22:50.344 DEBUG 29056 --- [Cassandra Java Driver worker-37] c.d.driver.core.ControlConnection 592 : [] [] [] [Control connection] /172.31.22.125:9042 is down, currently connected to /172.31.27.168:9042
2015-07-29 18:22:50.344 DEBUG 29056 --- [Cassandra Java Driver worker-36] c.d.d.core.AbstractReconnectionHandler 60 : [] [] [] First reconnection scheduled in 1000ms
2015-07-29 18:22:50.344 DEBUG 29056 --- [Cassandra Java Driver worker-37] com.datastax.driver.core.Cluster 1473 : [] [] [] /172.31.22.125:9042 is down, scheduling connection retries
2015-07-29 18:22:50.344 DEBUG 29056 --- [Cassandra Java Driver worker-37] c.d.d.core.AbstractReconnectionHandler 60 : [] [] [] First reconnection scheduled in 1000ms
2015-07-29 18:22:51.345 DEBUG 29056 --- [Reconnection-0] com.datastax.driver.core.Connection 103 : [] [] [] [/172.31.22.125:9042-174] Error connecting to /172.31.22.125:9042 (Connection refused: /172.31.22.125:9042)
2015-07-29 18:22:51.345 DEBUG 29056 --- [New I/O worker #7] com.datastax.driver.core.Connection 385 : [] [] [] [/172.31.22.125:9042-174] closing connection
2015-07-29 18:22:51.346 DEBUG 29056 --- [New I/O boss #9] com.datastax.driver.core.Connection 608 : [] [] [] [/172.31.22.125:9042-174] connection error
java.net.ConnectException: Connection refused: /172.31.22.125:9042
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_75]
First make sure your system firewall is on or off .
Cassandra service is up or down .
put same jar version as cassandra and as well as cassandra-mapping jar .
Related
I have created a sample spring application that has mongoDB dependency added in pom.xml. I haven't added any code apart from the dependencies but I get the following error when I try running it. I have tried multiple approaches and workaround but I still see the same error.
2022-09-07 14:55:21.496 INFO 6932 --- [ main] com.sensor.metrics.MetricsApplication : Starting MetricsApplication using Java 13.0.2 on DESKTOP-GO61V4S with PID 6932 (D:\Java Project\metrics2\metrics\target\classes started by prate in D:\Java Project\metrics2\metrics)
2022-09-07 14:55:21.499 INFO 6932 --- [ main] com.sensor.metrics.MetricsApplication : The following 1 profile is active: "local"
2022-09-07 14:55:22.106 INFO 6932 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Reactive MongoDB repositories in DEFAULT mode.
2022-09-07 14:55:22.117 INFO 6932 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 6 ms. Found 0 Reactive MongoDB repository interfaces.
2022-09-07 14:55:24.118 INFO 6932 --- [ main] org.mongodb.driver.client : MongoClient with metadata {"driver": {"name": "mongo-java-driver|reactive-streams|spring-boot", "version": "4.6.1"}, "os": {"type": "Windows", "name": "Windows 10", "architecture": "amd64", "version": "10.0"}, "platform": "Java/Oracle Corporation/13.0.2+8"} created with settings MongoClientSettings{readPreference=primary, writeConcern=WriteConcern{w=null, wTimeout=null ms, journal=null}, retryWrites=true, retryReads=true, readConcern=ReadConcern{level=null}, credential=null, streamFactoryFactory=NettyStreamFactoryFactory{eventLoopGroup=io.netty.channel.nio.NioEventLoopGroup#3c79088e, socketChannelClass=class io.netty.channel.socket.nio.NioSocketChannel, allocator=PooledByteBufAllocator(directByDefault: true), sslContext=null}, commandListeners=[], codecRegistry=ProvidersCodecRegistry{codecProviders=[ValueCodecProvider{}, BsonValueCodecProvider{}, DBRefCodecProvider{}, DBObjectCodecProvider{}, DocumentCodecProvider{}, IterableCodecProvider{}, MapCodecProvider{}, GeoJsonCodecProvider{}, GridFSFileCodecProvider{}, Jsr310CodecProvider{}, JsonObjectCodecProvider{}, BsonCodecProvider{}, EnumCodecProvider{}, com.mongodb.Jep395RecordCodecProvider#4a37191a]}, clusterSettings={hosts=[localhost:27017], srvServiceName=mongodb, mode=SINGLE, requiredClusterType=UNKNOWN, requiredReplicaSetName='null', serverSelector='null', clusterListeners='[]', serverSelectionTimeout='30000 ms', localThreshold='30000 ms'}, socketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=0, receiveBufferSize=0, sendBufferSize=0}, heartbeatSocketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=10000, receiveBufferSize=0, sendBufferSize=0}, connectionPoolSettings=ConnectionPoolSettings{maxSize=100, minSize=0, maxWaitTimeMS=120000, maxConnectionLifeTimeMS=0, maxConnectionIdleTimeMS=0, maintenanceInitialDelayMS=0, maintenanceFrequencyMS=60000, connectionPoolListeners=[], maxConnecting=2}, serverSettings=ServerSettings{heartbeatFrequencyMS=10000, minHeartbeatFrequencyMS=500, serverListeners='[]', serverMonitorListeners='[]'}, sslSettings=SslSettings{enabled=false, invalidHostNameAllowed=false, context=null}, applicationName='null', compressorList=[], uuidRepresentation=JAVA_LEGACY, serverApi=null, autoEncryptionSettings=null, contextProvider=null}
2022-09-07 14:55:25.226 INFO 6932 --- [ main] o.s.b.web.embedded.netty.NettyWebServer : Netty started on port 8080
2022-09-07 14:55:25.246 INFO 6932 --- [ main] com.sensor.metrics.MetricsApplication : Started MetricsApplication in 4.192 seconds (JVM running for 4.615)
2022-09-07 14:55:29.317 INFO 6932 --- [localhost:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server localhost:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
at com.mongodb.connection.netty.NettyStream$OpenChannelFutureListener.operationComplete(NettyStream.java:520) ~[mongodb-driver-core-4.6.1.jar:na]
at com.mongodb.connection.netty.NettyStream$OpenChannelFutureListener.operationComplete(NettyStream.java:488) ~[mongodb-driver-core-4.6.1.jar:na]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:609) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:321) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:337) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na]
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: localhost/0:0:0:0:0:0:0:1:27017
Caused by: java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:579) ~[na:na]
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:820) ~[na:na]
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
at java.base/java.lang.Thread.run(Thread.java:830) ~[na:na]
I have a spring boot project that uses Spring AMPQ, no issues with hosting, I just want to disable the infinite retry connection locally or at least increase the time between retry attempts.
2022-08-16 13:56:42.849 INFO 40008 --- [ main] o.s.c.s.binder.DefaultBinderFactory : Creating binder: rabbit
2022-08-16 13:56:43.165 INFO 40008 --- [ main] o.s.c.s.binder.DefaultBinderFactory : Caching the binder: rabbit
2022-08-16 13:56:43.165 INFO 40008 --- [ main] o.s.c.s.binder.DefaultBinderFactory : Retrieving cached binder: rabbit
2022-08-16 13:56:43.271 INFO 40008 --- [ main] c.s.b.r.p.RabbitExchangeQueueProvisioner : declaring queue for inbound: springCloudBus.anonymous.4IzJRJtxT1afyh0KS7yI5w, bound to: springCloudBus
2022-08-16 13:56:43.274 INFO 40008 --- [ main] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:56:47.371 INFO 40008 --- [ main] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:56:51.460 INFO 40008 --- [ main] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:56:55.627 INFO 40008 --- [ main] o.s.c.stream.binder.BinderErrorChannel : Channel 'springCloudBus.anonymous.4IzJRJtxT1afyh0KS7yI5w.errors' has 1 subscriber(s).
2022-08-16 13:56:55.628 INFO 40008 --- [ main] o.s.c.stream.binder.BinderErrorChannel : Channel 'springCloudBus.anonymous.4IzJRJtxT1afyh0KS7yI5w.errors' has 2 subscriber(s).
2022-08-16 13:56:55.630 INFO 40008 --- [ main] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:56:59.673 INFO 40008 --- [ main] o.s.a.r.l.SimpleMessageListenerContainer : Broker not available; cannot force queue declarations during start: java.net.ConnectException: Connection refused: connect
2022-08-16 13:56:59.679 INFO 40008 --- [1afyh0KS7yI5w-1] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:57:03.931 INFO 40008 --- [ main] o.s.i.a.i.AmqpInboundChannelAdapter : started bean 'inbound.springCloudBus.anonymous.4IzJRJtxT1afyh0KS7yI5w'
2022-08-16 13:57:04.059 INFO 40008 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2022-08-16 13:57:05.110 INFO 40008 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed
2022-08-16 13:57:05.140 INFO 40008 --- [ main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s)
2022-08-16 13:57:05.255 INFO 40008 --- [ main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references
2022-08-16 13:57:05.362 INFO 40008 --- [ main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: getApplicationFeedbackUsingGET_1
2022-08-16 13:57:05.404 INFO 40008 --- [ main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: getListUsingGET_1
2022-08-16 13:57:05.760 INFO 40008 --- [ main] o.s.i.monitor.IntegrationMBeanExporter : Registering MessageChannel springCloudBus.anonymous.4IzJRJtxT1afyh0KS7yI5w.errors
2022-08-16 13:57:06.992 INFO 40008 --- [22)-19.3.148.44] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:57:07.156 INFO 40008 --- [21)-19.3.148.44] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-08-16 13:57:07.156 INFO 40008 --- [21)-19.3.148.44] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2022-08-16 13:57:07.159 INFO 40008 --- [21)-19.3.148.44] o.s.web.servlet.DispatcherServlet : Completed initialization in 3 ms
2022-08-16 13:57:09.206 WARN 40008 --- [1afyh0KS7yI5w-1] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect
2022-08-16 13:57:09.209 INFO 40008 --- [1afyh0KS7yI5w-1] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#1727d525: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 13:57:11.086 INFO 40008 --- [1afyh0KS7yI5w-2] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:57:11.125 WARN 40008 --- [22)-19.3.148.44] o.s.b.a.amqp.RabbitHealthIndicator : Rabbit health check failed
org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect
at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:61) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:602) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:724) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:252) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2163) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2136) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2116) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.boot.actuate.amqp.RabbitHealthIndicator.getVersion(RabbitHealthIndicator.java:49) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.amqp.RabbitHealthIndicator.doHealthCheck(RabbitHealthIndicator.java:44) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:82) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthIndicator.getHealth(HealthIndicator.java:37) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpoint.getHealth(HealthEndpoint.java:71) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpoint.getHealth(HealthEndpoint.java:39) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getContribution(HealthEndpointSupport.java:99) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getAggregateHealth(HealthEndpointSupport.java:110) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getContribution(HealthEndpointSupport.java:96) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getHealth(HealthEndpointSupport.java:74) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getHealth(HealthEndpointSupport.java:61) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpoint.health(HealthEndpoint.java:65) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpoint.health(HealthEndpoint.java:55) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282) ~[spring-core-5.3.10.jar:5.3.10]
at org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker.invoke(ReflectiveOperationInvoker.java:74) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation.invoke(AbstractDiscoveredOperation.java:60) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.endpoint.jmx.EndpointMBean.invoke(EndpointMBean.java:121) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.endpoint.jmx.EndpointMBean.invoke(EndpointMBean.java:96) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809) ~[na:na]
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) ~[na:na]
at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466) ~[na:na]
at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307) ~[na:na]
at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399) ~[na:na]
at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:827) ~[na:na]
at java.base/jdk.internal.reflect.GeneratedMethodAccessor157.invoke(Unknown Source) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359) ~[na:na]
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) ~[na:na]
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197) ~[na:na]
at java.base/java.security.AccessController.doPrivileged(Native Method) ~[na:na]
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[na:na]
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562) ~[na:na]
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796) ~[na:na]
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677) ~[na:na]
at java.base/java.security.AccessController.doPrivileged(Native Method) ~[na:na]
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: java.net.ConnectException: Connection refused: connect
at java.base/java.net.PlainSocketImpl.waitForConnect(Native Method) ~[na:na]
at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:107) ~[na:na]
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[na:na]
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[na:na]
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[na:na]
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:609) ~[na:na]
at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:60) ~[amqp-client-5.12.0.jar:5.12.0]
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1220) ~[amqp-client-5.12.0.jar:5.12.0]
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1170) ~[amqp-client-5.12.0.jar:5.12.0]
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connectAddresses(AbstractConnectionFactory.java:640) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connect(AbstractConnectionFactory.java:615) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:565) ~[spring-rabbit-2.3.10.jar:2.3.10]
... 49 common frames omitted
2022-08-16 13:57:15.193 INFO 40008 --- [22)-19.3.148.44] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:57:19.294 WARN 40008 --- [22)-19.3.148.44] o.s.b.a.amqp.RabbitHealthIndicator : Rabbit health check failed
org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect
at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:61) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:602) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:724) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:252) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2163) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2136) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2116) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.boot.actuate.amqp.RabbitHealthIndicator.getVersion(RabbitHealthIndicator.java:49) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.amqp.RabbitHealthIndicator.doHealthCheck(RabbitHealthIndicator.java:44) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:82) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthIndicator.getHealth(HealthIndicator.java:37) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpoint.getHealth(HealthEndpoint.java:71) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpoint.getHealth(HealthEndpoint.java:39) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getContribution(HealthEndpointSupport.java:99) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getAggregateHealth(HealthEndpointSupport.java:110) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getContribution(HealthEndpointSupport.java:96) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getAggregateHealth(HealthEndpointSupport.java:110) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getContribution(HealthEndpointSupport.java:96) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getHealth(HealthEndpointSupport.java:74) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpointSupport.getHealth(HealthEndpointSupport.java:61) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpoint.health(HealthEndpoint.java:65) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.health.HealthEndpoint.health(HealthEndpoint.java:55) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282) ~[spring-core-5.3.10.jar:5.3.10]
at org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker.invoke(ReflectiveOperationInvoker.java:74) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation.invoke(AbstractDiscoveredOperation.java:60) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.endpoint.jmx.EndpointMBean.invoke(EndpointMBean.java:121) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at org.springframework.boot.actuate.endpoint.jmx.EndpointMBean.invoke(EndpointMBean.java:96) ~[spring-boot-actuator-2.5.5.jar:2.5.5]
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809) ~[na:na]
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) ~[na:na]
at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466) ~[na:na]
at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307) ~[na:na]
at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399) ~[na:na]
at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:827) ~[na:na]
at java.base/jdk.internal.reflect.GeneratedMethodAccessor157.invoke(Unknown Source) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359) ~[na:na]
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) ~[na:na]
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197) ~[na:na]
at java.base/java.security.AccessController.doPrivileged(Native Method) ~[na:na]
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[na:na]
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562) ~[na:na]
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796) ~[na:na]
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677) ~[na:na]
at java.base/java.security.AccessController.doPrivileged(Native Method) ~[na:na]
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: java.net.ConnectException: Connection refused: connect
at java.base/java.net.PlainSocketImpl.waitForConnect(Native Method) ~[na:na]
at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:107) ~[na:na]
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[na:na]
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[na:na]
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[na:na]
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:609) ~[na:na]
at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:60) ~[amqp-client-5.12.0.jar:5.12.0]
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1220) ~[amqp-client-5.12.0.jar:5.12.0]
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1170) ~[amqp-client-5.12.0.jar:5.12.0]
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connectAddresses(AbstractConnectionFactory.java:640) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connect(AbstractConnectionFactory.java:615) ~[spring-rabbit-2.3.10.jar:2.3.10]
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:565) ~[spring-rabbit-2.3.10.jar:2.3.10]
... 51 common frames omitted
2022-08-16 13:57:20.269 WARN 40008 --- [1afyh0KS7yI5w-2] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect
2022-08-16 13:57:20.269 INFO 40008 --- [1afyh0KS7yI5w-2] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#92cb521: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 13:57:20.270 INFO 40008 --- [1afyh0KS7yI5w-3] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:57:29.439 WARN 40008 --- [1afyh0KS7yI5w-3] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect
2022-08-16 13:57:29.439 INFO 40008 --- [1afyh0KS7yI5w-3] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#3fa71956: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 13:57:29.440 INFO 40008 --- [1afyh0KS7yI5w-4] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 13:57:38.593 WARN 40008 --- [1afyh0KS7yI5w-4] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect
2022-08-16 13:57:38.593 INFO 40008 --- [1afyh0KS7yI5w-4] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#54a50d69: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 13:57:38.593 INFO 40008 --- [1afyh0KS7yI5w-5] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
Trying to increase the back off interval doesn't seem to do anything.
#Configuration
#EnableRabbit
#Profile("!cloud")
public class LocalConfiguration
{
#Bean
public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory(ConnectionFactory connectionFactory)
{
SimpleRabbitListenerContainerFactory simpleRabbitListenerContainerFactory = new SimpleRabbitListenerContainerFactory();
simpleRabbitListenerContainerFactory.setConnectionFactory(connectionFactory);
ExponentialBackOff exponentialBackOff = new ExponentialBackOff(100, 3.0);
simpleRabbitListenerContainerFactory.setRecoveryBackOff(exponentialBackOff);
return simpleRabbitListenerContainerFactory;
}
}
Is there a way to increase the timeout or disable the constant retries?
I just copied your factory and it works exactly as expected:
2022-08-16 14:03:06.012 WARN 97694 --- [ 127.0.0.1:5672] c.r.c.impl.ForgivingExceptionHandler : An unexpected connection driver error occurred (Exception message: Connection reset)
2022-08-16 14:03:06.499 INFO 97694 --- [ntContainer#0-1] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#30c31dd7: tags=[[amq.ctag-v4isXkIaMAAe_NHmUnHMzg]], channel=Cached Rabbit Channel: AMQChannel(amqp://guest#127.0.0.1:5672/,1), conn: Proxy#24be2d9c Shared Rabbit Connection: SimpleConnection#41200e0c [delegate=amqp://guest#127.0.0.1:5672/, localPort= 61142], acknowledgeMode=AUTO local queue size=0
2022-08-16 14:03:06.502 INFO 97694 --- [ntContainer#0-2] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 14:03:06.712 WARN 97694 --- [ntContainer#0-2] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
2022-08-16 14:03:06.712 INFO 97694 --- [ntContainer#0-2] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#2a884e96: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 14:03:06.714 INFO 97694 --- [ntContainer#0-3] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 14:03:07.125 WARN 97694 --- [ntContainer#0-3] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
2022-08-16 14:03:07.126 INFO 97694 --- [ntContainer#0-3] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#28a5e291: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 14:03:07.170 INFO 97694 --- [ntContainer#0-4] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 14:03:08.186 WARN 97694 --- [ntContainer#0-4] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
2022-08-16 14:03:08.186 INFO 97694 --- [ntContainer#0-4] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#7e1e240: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 14:03:08.187 INFO 97694 --- [ntContainer#0-5] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 14:03:11.022 WARN 97694 --- [ntContainer#0-5] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
2022-08-16 14:03:11.023 INFO 97694 --- [ntContainer#0-5] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#5285c94: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 14:03:11.025 INFO 97694 --- [ntContainer#0-6] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 14:03:19.328 WARN 97694 --- [ntContainer#0-6] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
2022-08-16 14:03:19.329 INFO 97694 --- [ntContainer#0-6] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#7500ff90: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 14:03:19.330 INFO 97694 --- [ntContainer#0-7] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 14:03:43.661 WARN 97694 --- [ntContainer#0-7] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
2022-08-16 14:03:43.662 INFO 97694 --- [ntContainer#0-7] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#70a5660e: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 14:03:43.664 INFO 97694 --- [ntContainer#0-8] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
2022-08-16 14:04:13.679 WARN 97694 --- [ntContainer#0-8] o.s.a.r.l.SimpleMessageListenerContainer : Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
2022-08-16 14:04:13.680 INFO 97694 --- [ntContainer#0-8] o.s.a.r.l.SimpleMessageListenerContainer : Restarting Consumer#a7d0a48: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
2022-08-16 14:04:13.682 INFO 97694 --- [ntContainer#0-9] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
The last retry is 30 seconds apart (which is the default max for an ExponentialBackOff (100ms, 300ms, 900ms, 2.7s, 8s, 24s, 30s).
Some retries have nothing to do with the listener container, it is the RabbitHealthIndicator that is trying to connect.
Your container retries appear to be a FixedBackOff of 9 seconds so something doesn't add up.
I'm running a spring cloud stream app for twitter source.
The docker image starts successfully and after 10Secs it fails by throwing org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
See the full stack trace,
2017-11-16 06:41:33,293 INFO main o.a.k.c.u.AppInfoParser:83 - Kafka version : 0.10.1.1
2017-11-16 06:41:33,294 INFO main o.a.k.c.u.AppInfoParser:84 - Kafka commitId : f10ef2720b03b247
2017-11-16 06:51:39,822 ERROR main o.s.c.s.b.k.p.KafkaTopicProvisioner:253 - Cannot initialize Binder
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
2017-11-16 06:51:39,822 WARN main o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext:550 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'outputBindingLifecycle'; nested exception is org.springframework.cloud.stream.binder.BinderException: Cannot initialize binder:
2017-11-16 06:51:39,825 INFO main o.s.i.m.IntegrationMBeanExporter:449 - Unregistering JMX-exposed beans on shutdown
2017-11-16 06:51:39,825 INFO main o.s.i.m.IntegrationMBeanExporter:241 - Unregistering JMX-exposed beans
2017-11-16 06:51:39,825 INFO main o.s.i.m.IntegrationMBeanExporter:375 - Summary on shutdown: output
2017-11-16 06:51:39,825 INFO main o.s.i.m.IntegrationMBeanExporter:375 - Summary on shutdown: nullChannel
2017-11-16 06:51:39,825 INFO main o.s.i.m.IntegrationMBeanExporter:375 - Summary on shutdown: errorChannel
2017-11-16 06:51:39,825 INFO main o.s.i.m.IntegrationMBeanExporter:378 - Summary on shutdown: _org.springframework.integration.errorLogger.handler
2017-11-16 06:51:39,826 INFO main o.s.j.e.a.AnnotationMBeanExporter:449 - Unregistering JMX-exposed beans on shutdown
2017-11-16 06:51:39,826 INFO main o.s.j.e.a.AnnotationMBeanExporter:241 - Unregistering JMX-exposed beans
2017-11-16 06:51:39,827 INFO main o.s.s.c.ThreadPoolTaskScheduler:203 - Shutting down ExecutorService 'taskScheduler'
2017-11-16 06:51:39,827 INFO main o.s.c.a.AnnotationConfigApplicationContext:987 - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext#ba1f559: startup date [Thu Nov 16 06:41:26 GMT 2017]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#131276c2
2017-11-16 06:51:39,829 INFO main o.a.c.c.StandardService:179 - Stopping service Tomcat
2017-11-16 06:51:39,993 INFO main o.s.b.a.l.AutoConfigurationReportLoggingInitializer:101 -
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-11-16 06:51:40,172 ERROR main o.s.b.SpringApplication:815 - Application startup failed
org.springframework.context.ApplicationContextException: Failed to start bean 'outputBindingLifecycle'; nested exception is org.springframework.cloud.stream.binder.BinderException: Cannot initialize binder:
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:348) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:151) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:114) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144) ~[spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]
at org.springframework.cloud.stream.app.twitterstream.source.kafka.TwitterstreamSourceKafka10Application.main(TwitterstreamSourceKafka10Application.java:29) [classes!/:1.2.0.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_74]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_74]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_74]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_74]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [twitterstream-source-kafka-10.jar:1.2.0.RELEASE]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [twitterstream-source-kafka-10.jar:1.2.0.RELEASE]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [twitterstream-source-kafka-10.jar:1.2.0.RELEASE]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [twitterstream-source-kafka-10.jar:1.2.0.RELEASE]
Caused by: org.springframework.cloud.stream.binder.BinderException: Cannot initialize binder:
at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.getPartitionsForTopic(KafkaTopicProvisioner.java:254) ~[spring-cloud-stream-binder-kafka-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]
at org.springframework.cloud.stream.binder.kafka.KafkaMessageChannelBinder.createProducerMessageHandler(KafkaMessageChannelBinder.java:148) ~[spring-cloud-stream-binder-kafka-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]
at org.springframework.cloud.stream.binder.kafka.KafkaMessageChannelBinder.createProducerMessageHandler(KafkaMessageChannelBinder.java:87) ~[spring-cloud-stream-binder-kafka-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]
at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindProducer(AbstractMessageChannelBinder.java:109) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE]
at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindProducer(AbstractMessageChannelBinder.java:55) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE]
at org.springframework.cloud.stream.binder.AbstractBinder.bindProducer(AbstractBinder.java:152) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE]
at org.springframework.cloud.stream.binding.BindingService.bindProducer(BindingService.java:125) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE]
at org.springframework.cloud.stream.binding.BindableProxyFactory.bindOutputs(BindableProxyFactory.java:238) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE]
at org.springframework.cloud.stream.binding.OutputBindingLifecycle.start(OutputBindingLifecycle.java:57) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:175) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
... 22 common frames omitted
Caused by: org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
kafka version: kafka_2.10-0.10.1.0
Also I'm using kafka-10 compatible docker image.
The issue got resolved. It was a connection issue with kafka.
My listener configuration was listeners=PLAINTEXT://localhost:9092
and I was trying to connect from other node. When I replaced the listener configuration to listeners=PLAINTEXT://<hostname>:9092 the error gone.
But I'm not sure why the spring cloud stream app doesn't throw the exception on the startup.!!!
I am new to Jhipster. I have tried to run mvnw but request execution error of Connection refused: connect is occurred.
2017-07-14 10:36:17.411 INFO 19864 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1500008777411, current=UP, previous=STARTING]
2017-07-14 10:36:17.946 INFO 19864 --- [ restartedMain] com.lxisoft.diviso.DivisoApp : Started DivisoApp in 27.953 seconds (JVM running for 29.457)
2017-07-14 10:36:17.961 INFO 19864 --- [ restartedMain] com.lxisoft.diviso.DivisoApp :
----------------------------------------------------------
Application 'diviso' is running! Access URLs:
Local: http://localhost:8080
External: http://192.168.43.43:8080
Profile(s): [swagger, dev]
----------------------------------------------------------
2017-07-14 10:36:17.978 INFO 19864 --- [ restartedMain] com.lxisoft.diviso.DivisoApp :
----------------------------------------------------------
Config Server: Not found or not setup for this application
----------------------------------------------------------
2017-07-14 10:36:18.463 WARN 19864 --- [nfoReplicator-0] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8761/config/diviso/dev/master": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
2017-07-14 10:36:18.467 INFO 19864 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_DIVISO/diviso:44489811627d5f65d0e44a2af1489c68: registering service...
2017-07-14 10:36:20.480 ERROR 19864 --- [nfoReplicator-0] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.register(AbstractJerseyEurekaHttpClient.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:119)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:798)
at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104)
at com.netflix.discovery.InstanceInfoReplicator$1.run(InstanceInfoReplicator.java:88)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 30 common frames omitted
Could not locate PropertySource: I/O error on GET request for "http://localhost:8761/config/diviso/dev/master": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused
This warning message means that your application could not connect to its spring cloud config server: JHipster Registry.
In dev profile, this is just a warning that you can ignore as your application can run with local application properties in sc/main/resources/config.
In prod profile, this would be an error and your application would not start. The registry must be started before your app because this is where your app gets its application properties from and registers itself as an Eureka client.
So in dev, you can ignore this warning or if it annoys you, you can start a registry.
If your app is a monolith application and not a microservice application, you can opt out the discovery client question, it'll be simpler to deploy if you don't need horizontal scaling.
The same issue happened with me, although I have already generated and modified my project before.
In case you are using MySql, go to phpMyAdmin page and type in your credentials. Worked for me.
I'm running JHipster registry in a docker container.
All applications running on docker can connect and register in registry endpoint (port 8761).
But when I try to connect an application running on my IDEA, I receive a error when trying to connect to the registry endpoint:
2016-07-21 10:35:24.912 INFO 1455 --- [ restartedMain] a.b.p.App2App : Started App2App in 14.944 seconds (JVM running for 15.912)
2016-07-21 10:35:24.913 INFO 1455 --- [ restartedMain] a.b.p.App2App :
----------------------------------------------------------
Application 'app2' is running! Access URLs:
Local: http://127.0.0.1:8081
External: http://192.168.1.104:8081
----------------------------------------------------------
2016-07-21 10:35:24.913 INFO 1455 --- [ restartedMain] a.b.p.App2App :
----------------------------------------------------------
Config Server: Connected to the JHipster Registry running in Docker
----------------------------------------------------------
2016-07-21 10:35:24.915 DEBUG 1455 --- [nfoReplicator-0] s.n.www.protocol.http.HttpURLConnection : sun.net.www.MessageHeader#33e72d406 pairs: {GET /config/application/prod/master HTTP/1.1: null}{Accept: application/json, application/*+json}{Authorization: Basic YWRtaW46YWRtaW4=}{User-Agent: Java/1.8.0_65}{Host: localhost:8761}{Connection: keep-alive}
2016-07-21 10:35:25.057 DEBUG 1455 --- [nfoReplicator-0] s.n.www.protocol.http.HttpURLConnection : sun.net.www.MessageHeader#d6320d811 pairs: {null: HTTP/1.1 200 OK}{Server: Apache-Coyote/1.1}{X-Content-Type-Options: nosniff}{X-XSS-Protection: 1; mode=block}{Cache-Control: no-cache, no-store, max-age=0, must-revalidate}{Pragma: no-cache}{Expires: 0}{X-Application-Context: jhipster-registry:dev,native:8761}{Content-Type: application/json;charset=UTF-8}{Transfer-Encoding: chunked}{Date: Thu, 21 Jul 2016 13:35:24 GMT}
2016-07-21 10:35:25.058 INFO 1455 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_APP2/app2:cddc722884843f95abdcf09d4996623d: registering service...
2016-07-21 10:35:25.059 ERROR 1455 --- [nfoReplicator-0] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error
com.sun.jersey.api.client.ClientHandlerException: java.net.UnknownHostException: registry
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187)
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123)
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27)
at com.sun.jersey.api.client.Client.handle(Client.java:652)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570)
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.register(AbstractJerseyEurekaHttpClient.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:119)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:810)
at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:103)
at com.netflix.discovery.InstanceInfoReplicator$1.run(InstanceInfoReplicator.java:87)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.UnknownHostException: registry
at java.net.InetAddress.getAllByName0(InetAddress.java:1280)
at java.net.InetAddress.getAllByName(InetAddress.java:1192)
at java.net.InetAddress.getAllByName(InetAddress.java:1126)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:259)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:159)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:117)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173)
... 30 common frames omitted
2016-07-21 10:35:25.059 WARN 1455 --- [nfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failure
2016-07-21 10:35:25.060 WARN 1455 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_APP2/app2:cddc722884843f95abdcf09d4996623d - registration failed Cannot execute request on any known server
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:810)
at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:103)
at com.netflix.discovery.InstanceInfoReplicator$1.run(InstanceInfoReplicator.java:87)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2016-07-21 10:35:25.060 WARN 1455 --- [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator : There was a problem with the instance info replicator
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:111)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:810)
at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:103)
at com.netflix.discovery.InstanceInfoReplicator$1.run(InstanceInfoReplicator.java:87)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
The application connects to Register (see it in logs), but after that I receive the error:
UnknownHostException: registry
Did anyone know how can I connect to a registry running in docker?
My spring application.yml is:
eureka:
instance:
prefer-ip-address: true
client:
enabled: true
healthcheck:
enabled: true
registerWithEureka: true
fetchRegistry: true
serviceUrl:
defaultZone: http://admin:admin#localhost:8761/eureka/
The default zone in jhipster-registry is http://user:pass#register:8761/eureka.
If I change to localhost, like this:
eureka:
client:
serviceUrl:
defaultZone: http://admin:admin#localhost:8761/eureka/
It works, but in this case the services running in docker can't access the registry (reverse problem).
Thanks!
I had a similar issue. In 3.5.0, I was able to successfully start the docker based registry, and then start up non docker versions of a microservice and a gateway. With 3.5.1, I was no longer able to do that, getting the same error you are getting. I think it's related to https://github.com/jhipster/generator-jhipster/pull/3848. In any case, I just added an entry in my /etc/hosts file, pointing "registry" to 127.0.0.1, and it worked.
The localhost on docker which running microservice is not the same localhost on docker which running registry. I changed the localhost to the host's Intranet Address, It's work for me.
eureka:
instance:
prefer-ip-address: true
client:
service-url:
defaultZone: http://admin:${jhipster.registry.password}#10.31.224.228:8761/eureka/