MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  MQExplorer runwithtrace.cmd and javax.net.debug=ssl,handshake

    Posted 03/27/26 09:23 AM

    Hi Folks,

    this is driving me nuts...

    I'm trying to figure out the exact reason why the java client is failing the TLS handshake. The client is MQExplorer and I cannot, for the life of me, get ssl debug working .Any clues - or maybe it is working and it's in another file?

    I'm running MQExplorer using the runwithtrace.cmd that comes with it. I've altered the line below and added in -Djavax.net.debug=ssl,handshake (as usual for this sort of problem)

    set explorerCmd=%explorerCmd% %* -vmargs -Xmx512M %LTW_OPTIONS% "-Dcom.ibm.mq.commonservices=%MQPROPERTIES%"

     

    I can see the MQ trace coming out in the ~user local TEMP folder but I cannot see the usual ssl debug that I need in the mq jre trace file that's in that folder. Is it in a different file from the rest of the MQ trace (there are three files in here and none seem to have it)? It's not coming out on the command line so something's swallowing it (if it's being produced at all)

    any clues folks?

    fyi: It is the handshake that's failing with the usual can't verify the cert - which usually means either the jks is not available/passwd incorrect or no suitable cert in it. So, I need that trace !

    thanks for any help !

    john.



    ------------------------------
    John Hawkins
    Integration Consultant
    ------------------------------


  • 2.  RE: MQExplorer runwithtrace.cmd and javax.net.debug=ssl,handshake

    Posted 03/27/26 11:59 AM

    The output for -Djavax.net.debug should be going to either stdout or stderr. I do not work much with MQExplorer, but do you have a way to configure the java command line to make sure you are capturing both stdout/stderr to some output file?

    Ex.

    java YOUR_APP > output.log 2>&1



    ------------------------------
    Tim Zielke
    CICS/MQ Systems Programmer
    Alight Solutions
    Deerfield IL
    ------------------------------



  • 3.  RE: MQExplorer runwithtrace.cmd and javax.net.debug=ssl,handshake

    Posted 03/30/26 12:56 PM

    Hi Tim,

    This doesn't work with Explorer - which is run using an .exe from this file.

    It spits out a e.g. mqjavaclient_292.cl0.trc file. But, nothing (well, not what I expect to see) in that.  nor in the other files it's outputting e.g. AMQ20260330173628303.0.TRC

    Any more ideas folks - pretty sure this shouldn't be too hard to get working.

    I've set -D*** in the mqexplorer.ini, I've set it in the runwithtrace.cmd; I've set echo on in the .cmd file but nothing, no ssl trace in any of the various files.

    thanks !

    John.



    ------------------------------
    John Hawkins
    Integration Consultant
    ------------------------------



  • 4.  RE: MQExplorer runwithtrace.cmd and javax.net.debug=ssl,handshake

    Posted 03/31/26 08:55 AM

    Even if you are dealing with an exe, you can try finding the exe location and then launch it from a DOS prompt as follows:

    myprog.exe > c:\users\blah\output.txt 2>&1

    I tried a quick test doing that, and output.txt collected stdout from the exe.



    ------------------------------
    Tim Zielke
    CICS/MQ Systems Programmer
    Alight Solutions
    Deerfield IL
    ------------------------------



  • 5.  RE: MQExplorer runwithtrace.cmd and javax.net.debug=ssl,handshake

    Posted 03/31/26 10:20 AM

    Indeed, you can, but MQExplorer grabs  the stdio/err and, from what I can, see redirects them into its own jre trace files. These don't seem to contain the output from the javax.net.debug that I'm looking for :-( I'm looking for things like the jks file being opened, available certs, and the connection handshake - but, nothing in there :-(



    ------------------------------
    John Hawkins
    Integration Consultant
    ------------------------------



  • 6.  RE: MQExplorer runwithtrace.cmd and javax.net.debug=ssl,handshake

    Posted 03/31/26 10:30 AM

    From what I researched, a Windows GUI application will typically throw away stdout and stderr. If you have not tried it, I would give the following a suggestion a try and see if it works. It should be simple to try it out.

    "Even if you are dealing with an exe, you can try finding the exe location and then launch it from a DOS prompt as follows:

    myprog.exe > c:\users\blah\output.txt 2>&1"

    If that does not work, then you may need to use a tool like Systinternals Process Explorer to see what MQExplorer is really doing with stdout and stderr.



    ------------------------------
    Tim Zielke
    CICS/MQ Systems Programmer
    Alight Solutions
    Deerfield IL
    ------------------------------



  • 7.  RE: MQExplorer runwithtrace.cmd and javax.net.debug=ssl,handshake

    Posted 03/27/26 06:24 PM

    set explorerCmd=%explorerCmd% %* -vmargs -Xmx512M %LTW_OPTIONS% "-Dcom.ibm.mq.commonservices=%MQPROPERTIES%"
    It may not fix the issue, but you may need an underscore character between MQ and PROPERTIES
    https://www.ibm.com/docs/en/ibm-mq/9.4.x?topic=reference-setmqenv-set-mq-environment

    Did you test if connectivity works with something like curl or OpenSSL - if it works with them, it should work with MQExplorer 



    ------------------------------
    Mat Jung
    ------------------------------



  • 8.  RE: MQExplorer runwithtrace.cmd and javax.net.debug=ssl,handshake

    Posted 03/30/26 12:58 PM

    Hi Mat, it works fine with other QM on the same machine. It's just one QM that's messing me around. Just need to figure out the magic incantation to get MQExplorer let me see the javax trace !



    ------------------------------
    John Hawkins
    Integration Consultant
    ------------------------------



  • 9.  RE: MQExplorer runwithtrace.cmd and javax.net.debug=ssl,handshake

    Posted 03/31/26 10:57 AM

    I've given up and taken the plunge - I started explorer from the command line using java - and can now see my expected java.net.debug trace !
    for future reference (change for your levels of MQ, userid, etc. ->

    "C:\Program Files\IBM\MQ Explorer\jre\jre\bin\java.exe" -Djavax.net.debug=handshake -Xms256m -Xmx512m -jar "C:\Program Files\IBM\MQ Explorer\plugins\org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar" -os win32 -ws win32 -arch x86_64 -configuration "C:\Users\<user>\mqexplorer-config" -data "C:\Users\<user>\IBM\WebSphereMQ\workspace" -application com.ibm.mq.explorer.ui.rcp.RcpApplication -consoleLog -debug 2>&1



    ------------------------------
    John Hawkins
    Integration Consultant
    ------------------------------