Solace jms spring boot starter has started failing eureka health check after april 2024

Hi All,

We are using dependency of solace-jms-spring-boot-starter (1.0.0) version and spring boot version is 2.7.13. Till April 2024 we didnt face any issue. But yesterday when we deployed our application in production we got an unexpected exception of Connection refused and application was up and running but was deregistered from eureka. Is thery any compatibility related issue

After setting health check of jms as false. It started running again and then was register in eureka as well. I have tried all the possible ways. Kindly help in resolving this issue so we don’t need to disable the health check of solace.

Flag Used

management.health.jms.enabled=false

Dependency

org.springframework.boot spring-boot-starter-parent

2.7.13

com.solace.spring.boot

solace-jms-spring-boot-starter

1.0.0

Exception Message

com.solace.spring.boot

solace-jms-spring-boot-starter

1.0.0

2.7.13 - 4.0.0

2024-07-09 09:36:38.660 INFO [DiscoveryClient-InstanceInfoReplicator-0] NettyTransportExecutorService - Epoll is enabled; Netty 4.1.94.Final

2024-07-09 09:36:38.676 INFO [DiscoveryClient-InstanceInfoReplicator-0] LogWrapper - Client-1597: Connecting to host ‘orig=tcp://localhost, scheme=tcp://, host=localhost’ (host 1 of 1, smfclient 1597, attempt 1 of 1, this_host_attempt: 1 of 1)

2024-07-09 09:36:38.689 INFO [DiscoveryClient-InstanceInfoReplicator-0] LogWrapper - Client-1597: Connection attempt failed to host ‘localhost’ ConnectException com.solacesystems.jcsmp.JCSMPTransportException: (Client name: XXXXXXXXXXXXXXXXXXXXXXX ) - Error communicating with the router. cause: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(…) failed: Connection refused: localhost/127.0.0.1:55555 ((Client name: XXXXXXXXXXXXXXXXXXXXXXX ) - )

2024-07-09 09:36:41.690 INFO [DiscoveryClient-InstanceInfoReplicator-0] LogWrapper - Client-1597: Channel Closed (smfclient 1597)

2024-07-09 09:36:41.690 INFO [DiscoveryClient-InstanceInfoReplicator-0] LogWrapper - Client-1597: Channel Closed (smfclient 1597)

2024-07-09 09:36:41.692 WARN [DiscoveryClient-InstanceInfoReplicator-0] AbstractHealthIndicator - JMS health check failed

javax.jms.JMSException: Error creating connection - transport error ((Client name: XXXXXXXXXXXXXXXXXXXXXXX ) - Error communicating with the router.)

at sun.reflect.GeneratedConstructorAccessor186.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at com.solacesystems.jms.impl.JMSExceptionValue.newInstance(JMSExceptionValue.java:36)

at com.solacesystems.jms.impl.JCSMPExceptionMapper$ArrayListMapper.get(JCSMPExceptionMapper.java:32)

at com.solacesystems.jms.impl.JCSMPExceptionMapper.get(JCSMPExceptionMapper.java:95)

at com.solacesystems.jms.impl.Validator.createJMSException(Validator.java:590)

at com.solacesystems.jms.SolConnection.(SolConnection.java:180)

at com.solacesystems.jms.SolConnection.(SolConnection.java:91)

at com.solacesystems.jms.SolConnectionFactoryImpl.createConnection(SolConnectionFactoryImpl.java:112)

at brave.jms.TracingConnectionFactory.createConnection(TracingConnectionFactory.java:64)

at org.springframework.cloud.sleuth.brave.instrument.messaging.LazyConnectionFactory.createConnection(TracingConnectionFactoryBeanPostProcessor.java:226)

at org.springframework.cloud.sleuth.brave.instrument.messaging.LazyTopicConnectionFactory.createConnection(TracingConnectionFactoryBeanPostProcessor.java:171)

Hi @Mansi1908 ,
Interesting. Did the Eureka version change? It would be weird if it started giving a different result without anything changing.

I don’t believe Solace is providing a specific HealthIndicator with our JMS starter so it should just be using whatever Spring provides by default.

Can you make sure you aren’t overriding or excluding the creation of the jmsHealthIndicator or jmsHealthContributor beans? By default Spring auto configures them here if missing:

Hope that helps!

Also from your post it looks like it is failing to connect to the message broker. That is separate than the health indicators. So if your app can’t connect to the message broker then I would expect the HealthIndicator to report down which might be what makes it fail on the Eureka side. I’m not familiar with Eureka so I can’t know for certain.

You might also consider upgrading to a newer version of the Solace JMS starter. v1 is from 2018. Many newer version here:
https://mvnrepository.com/artifact/com.solace.spring.boot/solace-jms-spring-boot-starter