Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to connect to IBm MQ using Springboot with SSl #105

Open
rmohan17 opened this issue Jan 3, 2024 · 4 comments
Open

Not able to connect to IBm MQ using Springboot with SSl #105

rmohan17 opened this issue Jan 3, 2024 · 4 comments

Comments

@rmohan17
Copy link

rmohan17 commented Jan 3, 2024

Please include the following information in your ticket.

  • ibmmq-jms-spring version(s) that are affected by this issue: ==> 3.0.3
  • Java version (including vendor and platform). ==> 17
  • A small code sample that demonstrates the issue.
    -Although i can connect from main method by directly setting property.

here is the code

Maven FIle:


4.0.0

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


com.optum.eems
eems-ibm-mq-app
0.0.1-SNAPSHOT
eems-ibm-mq-app
eems-ibm-mq-app

<java.version>17</java.version>



org.springframework.boot
spring-boot-starter-web

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>com.ibm.mq</groupId>
        <artifactId>mq-jms-spring-boot-starter</artifactId>
        <version>3.0.3</version>
    </dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>
  1. Application Code.
    package com.optum.eems.eemsibmmqapp;

import com.ibm.mq.jakarta.jms.MQConnectionFactory;
import com.ibm.mq.spring.boot.MQConnectionFactoryCustomizer;
import jakarta.jms.Message;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.jms.connection.JmsTransactionManager;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.Date;

@SpringBootApplication
@EnableJms
@EnableTransactionManagement
public class EemsIbmMqAppApplication {

static final String qName1 = "EBILL.POST_PROCESS_NRT_REQ"; // A queue from the default MQ Developer container config
static final String qName2 = "EBILL.POST_PROCESS_NRT_REQ"; // Another queue from the default MQ Developer container config

@Bean
public MQConnectionFactoryCustomizer myCustomizer() {
    MQConnectionFactoryCustomizer c = new MQConnectionFactoryCustomizer() {
        @Override
        public void customize(MQConnectionFactory factory) {
            System.out.println(">> In a customizer method that can modify class " + factory.getClass().getName());
        }
    };
    return c;

}

public static void main(String[] args) {

    // Launch the application
    ConfigurableApplicationContext context = SpringApplication.run(EemsIbmMqAppApplication.class, args);

    // Create a transaction manager object that will be used to control commit/rollback of operations.
    JmsTransactionManager tm = new JmsTransactionManager();

    printStarted();

    // Create the JMS Template object to control connections and sessions.
    JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class);

    // Associate the connection factory with the transaction manager
    tm.setConnectionFactory(jmsTemplate.getConnectionFactory());

    // This starts a new transaction scope. "null" can be used to get a default transaction model
    TransactionStatus status = tm.getTransaction(null);

    // Create a single message with a timestamp
    String outMsg = "Hello from IBM MQ at " + new Date();

    // The default SimpleMessageConverter class will be called and turn a String
    // into a JMS TextMessage which we send to qName1. This operation will be made
    // part of the transaction that we initiated.
    jmsTemplate.convertAndSend(qName1, outMsg);

    // Commit the transaction so the message is now visible
    tm.commit(status);

    // But now we're going to start a new transaction to hold multiple operations.
    status = tm.getTransaction(null);
    // Read it from the queue where we just put it, and then send it straight on to
    // a different queue
    Message inMsg = jmsTemplate.receive(qName1);
    jmsTemplate.convertAndSend(qName2, inMsg);
    // This time we decide to rollback the transaction so the receive() and send() are
    // reverted. We end up with the message still on qName1.
    tm.rollback(status);

    System.out.println("Done.");
}

static void printStarted() {
    System.out.println();
    System.out.println("====================================================");
    System.out.println("MQ JMS Transaction Sample with JMS3 and TLS started.");
    System.out.println("====================================================");
}

}

  1. Props:
  2. ibm.mq.queueManager=WMQS102
    ibm.mq.channel=GW_SECCLNT
    ibm.mq.connName=wmqrt0013.uhc.com(50001)
    ibm.mq.user=eeemqtst
    ibm.mq.password=afsafs
    ibm.mq.sslCipherSpec=ANY_TLS12_OR_HIGHER
    ibm.mq.sslBundle=ibmmq
    spring.jms.cache.enabled=true
    spring.ssl.bundle.jks.ibmmq.truststore.location=./certs/standard_trusts.jks
    spring.ssl.bundle.jks.ibmmq.truststore.password=asffs
    spring.ssl.bundle.jks.ibmmq.truststore.type=JKS
    spring.ssl.bundle.jks.ibmmq.keystore.location=./certs/eee_key.jks
    spring.ssl.bundle.jks.ibmmq.keystore.password=dhjasdh
    spring.ssl.bundle.jks.ibmmq.keystore.type=JKS

Error i am getting.
2024-01-03T16:50:28.768-05:00 INFO 8024 --- [ main] c.o.e.e.EemsIbmMqAppApplication : Starting EemsIbmMqAppApplication using Java 21.0.1 with PID 8024 (/Users/rmohan30/Desktop/github/cp/mq/eems-ibm-mq-app/target/classes started by rmohan30 in /Users/rmohan30/Desktop/github/cp/mq/eems-ibm-mq-app)
2024-01-03T16:50:28.769-05:00 INFO 8024 --- [ main] c.o.e.e.EemsIbmMqAppApplication : No active profile set, falling back to 1 default profile: "default"
2024-01-03T16:50:29.185-05:00 INFO 8024 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
2024-01-03T16:50:29.189-05:00 INFO 8024 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2024-01-03T16:50:29.189-05:00 INFO 8024 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.17]
2024-01-03T16:50:29.211-05:00 INFO 8024 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2024-01-03T16:50:29.211-05:00 INFO 8024 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 422 ms

In a customizer method that can modify class com.ibm.mq.jakarta.jms.MQConnectionFactory
2024-01-03T16:50:29.455-05:00 INFO 8024 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path ''
2024-01-03T16:50:29.460-05:00 INFO 8024 --- [ main] c.o.e.e.EemsIbmMqAppApplication : Started EemsIbmMqAppApplication in 0.853 seconds (process running for 1.114)

====================================================
MQ JMS Transaction Sample with JMS3 and TLS started.

Exception in thread "main" org.springframework.transaction.CannotCreateTransactionException: Could not create JMS transaction
at org.springframework.jms.connection.JmsTransactionManager.doBegin(JmsTransactionManager.java:255)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.startTransaction(AbstractPlatformTransactionManager.java:531)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:405)
at com.optum.eems.eemsibmmqapp.EemsIbmMqAppApplication.main(EemsIbmMqAppApplication.java:56)
Caused by: com.ibm.msg.client.jakarta.jms.DetailedJMSException: JMSWMQ0018: Failed to connect to queue manager 'WMQS102' with connection mode 'Client' and host name 'Client'.
Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.
at com.ibm.msg.client.jakarta.wmq.common.internal.Reason.reasonToException(Reason.java:595)
at com.ibm.msg.client.jakarta.wmq.common.internal.Reason.createException(Reason.java:215)
at com.ibm.msg.client.jakarta.wmq.internal.WMQConnection.(WMQConnection.java:458)
at com.ibm.msg.client.jakarta.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:8683)
at com.ibm.msg.client.jakarta.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:8023)
at com.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:322)
at com.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:242)
at com.ibm.mq.jakarta.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6026)
at com.ibm.mq.jakarta.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:6055)
at org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:452)
at org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:414)
at org.springframework.jms.connection.SingleConnectionFactory.getConnection(SingleConnectionFactory.java:328)
at org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:243)
at org.springframework.jms.connection.JmsTransactionManager.createConnection(JmsTransactionManager.java:330)
at org.springframework.jms.connection.JmsTransactionManager.doBegin(JmsTransactionManager.java:223)
... 3 more
Caused by: com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2397' ('MQRC_JSSE_ERROR').
at com.ibm.msg.client.jakarta.wmq.common.internal.Reason.createException(Reason.java:203)
... 16 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9204: Connection to host 'wmqrt0013.uhc.com(50001)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2397;AMQ9771: SSL handshake failed. [1=javax.net.ssl.SSLHandshakeException[PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target],3=wmqrt0013.uhc.com/10.86.36.32:50001 (wmqrt0013.uhc.com),4=SSLSocket.startHandshake,5=default]],3=wmqrt0013.uhc.com(50001),4=,5=RemoteTCPConnection.protocolConnect]
at com.ibm.mq.jmqi.remote.api.RemoteFAP$Connector.jmqiConnect(RemoteFAP.java:13670)
at com.ibm.mq.jmqi.remote.api.RemoteFAP$Connector.access$100(RemoteFAP.java:13202)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1451)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1392)
at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiConnect(InterceptedJmqiImpl.java:377)
at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiConnect(ESEJMQI.java:562)
at com.ibm.msg.client.jakarta.wmq.internal.WMQConnection.(WMQConnection.java:391)
... 15 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9771: SSL handshake failed. [1=javax.net.ssl.SSLHandshakeException[PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target],3=wmqrt0013.uhc.com/10.86.36.32:50001 (wmqrt0013.uhc.com),4=SSLSocket.startHandshake,5=default]
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1585)
at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect(RemoteConnection.java:1013)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getNewConnection(RemoteConnectionSpecification.java:691)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSessionFromNewConnection(RemoteConnectionSpecification.java:283)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSession(RemoteConnectionSpecification.java:170)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession(RemoteConnectionPool.java:128)
at com.ibm.mq.jmqi.remote.api.RemoteFAP$Connector.jmqiConnect(RemoteFAP.java:13402)
... 21 more
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:130)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:378)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:316)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1318)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1195)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1138)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:393)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:476)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:447)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:201)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1506)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1421)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$6.run(RemoteTCPConnection.java:1552)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$6.run(RemoteTCPConnection.java:1544)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1544)
... 27 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:388)
at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:271)
at java.base/sun.security.validator.Validator.validate(Validator.java:256)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:230)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1302)
... 42 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:148)
at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:129)
at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:383)
... 47 more

@ibmmqmet
Copy link
Collaborator

ibmmqmet commented Jan 4, 2024

You are trying to use SSLBundle capability while specifying use of 3.0.2 Spring Boot, but that was only introduced in the 3.1.2 version of this package,

@rmohan17
Copy link
Author

rmohan17 commented Jan 4, 2024

@ibmmqmet We have changed spring boot version to 3.0.2 now i am getting this error, can you please advise urgently .

====================================================
MQ JMS Transaction Sample with JMS3 and TLS started.

Exception in thread "main" org.springframework.transaction.CannotCreateTransactionException: Could not create JMS transaction
at org.springframework.jms.connection.JmsTransactionManager.doBegin(JmsTransactionManager.java:255)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.startTransaction(AbstractPlatformTransactionManager.java:400)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at com.optum.eems.eemsibmmqapp.EemsIbmMqAppApplication.main(EemsIbmMqAppApplication.java:56)
Caused by: com.ibm.msg.client.jakarta.jms.DetailedJMSException: JMSWMQ0018: Failed to connect to queue manager 'WMQS102' with connection mode 'Client' and host name 'Client'.
Check the queue manager is started and if running in client mode, check there is a listener running. Please see the linked exception for more information.
at com.ibm.msg.client.jakarta.wmq.common.internal.Reason.reasonToException(Reason.java:595)
at com.ibm.msg.client.jakarta.wmq.common.internal.Reason.createException(Reason.java:215)
at com.ibm.msg.client.jakarta.wmq.internal.WMQConnection.(WMQConnection.java:458)
at com.ibm.msg.client.jakarta.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:8683)
at com.ibm.msg.client.jakarta.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:8023)
at com.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:322)
at com.ibm.msg.client.jakarta.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:242)
at com.ibm.mq.jakarta.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6026)
at com.ibm.mq.jakarta.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:6055)
at org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:409)
at org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:349)
at org.springframework.jms.connection.SingleConnectionFactory.getConnection(SingleConnectionFactory.java:327)
at org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:242)
at org.springframework.jms.connection.JmsTransactionManager.createConnection(JmsTransactionManager.java:330)
at org.springframework.jms.connection.JmsTransactionManager.doBegin(JmsTransactionManager.java:223)
... 3 more
Caused by: com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2397' ('MQRC_JSSE_ERROR').
at com.ibm.msg.client.jakarta.wmq.common.internal.Reason.createException(Reason.java:203)
... 16 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9204: Connection to host 'wmqrt0013.uhc.com(50001)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2397;AMQ9771: SSL handshake failed. [1=javax.net.ssl.SSLHandshakeException[PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target],3=wmqrt0013.uhc.com/10.86.36.32:50001 (wmqrt0013.uhc.com),4=SSLSocket.startHandshake,5=default]],3=wmqrt0013.uhc.com(50001),4=,5=RemoteTCPConnection.protocolConnect]
at com.ibm.mq.jmqi.remote.api.RemoteFAP$Connector.jmqiConnect(RemoteFAP.java:13670)
at com.ibm.mq.jmqi.remote.api.RemoteFAP$Connector.access$100(RemoteFAP.java:13202)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1451)
at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1392)
at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiConnect(InterceptedJmqiImpl.java:377)
at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiConnect(ESEJMQI.java:562)
at com.ibm.msg.client.jakarta.wmq.internal.WMQConnection.(WMQConnection.java:391)
... 15 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9771: SSL handshake failed. [1=javax.net.ssl.SSLHandshakeException[PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target],3=wmqrt0013.uhc.com/10.86.36.32:50001 (wmqrt0013.uhc.com),4=SSLSocket.startHandshake,5=default]
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1585)
at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect(RemoteConnection.java:1013)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getNewConnection(RemoteConnectionSpecification.java:691)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSessionFromNewConnection(RemoteConnectionSpecification.java:283)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSession(RemoteConnectionSpecification.java:170)
at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession(RemoteConnectionPool.java:128)
at com.ibm.mq.jmqi.remote.api.RemoteFAP$Connector.jmqiConnect(RemoteFAP.java:13402)
... 21 more
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:130)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:378)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:316)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1318)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1195)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1138)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:393)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:476)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:447)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:201)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1506)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1421)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$6.run(RemoteTCPConnection.java:1552)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$6.run(RemoteTCPConnection.java:1544)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1544)
... 27 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:388)
at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:271)
at java.base/sun.security.validator.Validator.validate(Validator.java:256)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:230)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1302)
... 42 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:148)
at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:129)
at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:383)
... 47 more

@rmohan17
Copy link
Author

rmohan17 commented Jan 5, 2024

@ibmmqmet , can you please provide updates on this.

@skdhitman
Copy link

Was this resolved @rmohan17 ? what was the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants