Skip to content
Documentation
Updated 10 minutes to read
Markdown

FAQ - IBM MQ SSL Certificate Configuration

Section titled “FAQ - IBM MQ SSL Certificate Configuration”

Configure secure SSL/TLS connections between Nodinite IBM MQ Monitoring Agent and IBM MQ Queue Managers with proper certificate setup. This FAQ covers TLS certificates, certificate conversion, SSL handshake errors, and version-specific behavior for Microsoft.NET Framework and Microsoft.NET 10 based agents.

IBM MQ SSL/TLS authentication uses different certificate storage mechanisms depending on agent version and IBM MQ version. This FAQ addresses common certificate configuration challenges for both legacy and modern deployments.

  • Certificate Storage by Version - Where certificates are stored (.kdb files vs Windows Certificate Store)
  • Certificate Requirements - Server Auth vs Client Auth EKU requirements
  • Conversion Procedures - How to convert Windows certificates to IBM MQ Key Database format
  • Common SSL Errors - Troubleshooting handshake failures and configuration issues
  • CipherSpec Compatibility - Matching cipher suites between Queue Manager and agent

Legacy Agent (.NET Framework 4.8 targeting IBM MQ ≤ 9.3)

Section titled “Legacy Agent (.NET Framework 4.8 targeting IBM MQ ≤ 9.3)”

IBM MQ Key Database files (.kdb)

  • Location: File system path (e.g., C:\MQ\KeyDB\key.kdb)
  • Management Tools: runmqakm or ikeycmd utilities
  • Does NOT use: Windows Certificate Store
  • Configuration: SSL Key Repository Path in agent configuration points to .kdb file path without extension
SSL Key Repository Path: C:\MQ\KeyDB\key
(Note: Path excludes .kdb extension - IBM MQ adds it automatically)

Modern Agent (.NET 9/10 targeting IBM MQ ≥ 9.5)

Section titled “Modern Agent (.NET 9/10 targeting IBM MQ ≥ 9.5)”

Windows Certificate Store OR IBM MQ Key Database files (.kdb)

  • Primary: Windows Certificate Store (CertStoreLocation)
  • Backward Compatibility: Still supports .kdb files for migration scenarios
  • Management: Windows Certificate Manager (certmgr.msc) or PowerShell
  • Configuration: Can point to Windows Certificate Store or .kdb file path
Example Configuration (Windows Certificate Store)
Section titled “Example Configuration (Windows Certificate Store)”
SSL Key Repository Path: *SYSTEM
CipherSpec: TLS_RSA_WITH_AES_128_CBC_SHA256
Certificate Label: ibmwebspheremq<qmgr_name> (lowercase)

Requirement Value Notes
EKU Server Authentication (1.3.6.1.5.5.7.3.1) Authenticates Queue Manager to connecting clients
Key Usage DigitalSignature, KeyEncipherment Required for SSL/TLS handshake
Certificate Store IBM MQ Key Database on Queue Manager server Configured in Queue Manager SSL configuration
Certificate Label ibmwebspheremq<qmgr_name> Must match Queue Manager name (case-sensitive, usually lowercase)

Client-Side (Nodinite IBM MQ Monitoring Agent)

Section titled “Client-Side (Nodinite IBM MQ Monitoring Agent)”
Requirement Value Notes
EKU Client Authentication (1.3.6.1.5.5.7.3.2) Authenticates agent to Queue Manager (mutual TLS)
Key Usage DigitalSignature Client certificates only need to sign authentication challenges
Certificate Store .kdb files (legacy) OR Windows Certificate Store (modern) Version-dependent (see above)
Certificate Label Custom label or default Specified in agent SSL configuration

Converting Windows Certificates to IBM MQ Key Database

Section titled “ Converting Windows Certificates to IBM MQ Key Database”
  • IBM MQ client libraries installed (includes runmqakm or ikeycmd)
  • Windows certificate exported as .pfx (PKCS#12) with private key
  • Administrative privileges

Step 1: Export Certificate from Windows Certificate Store

Section titled “Step 1: Export Certificate from Windows Certificate Store”
  1. Open Certificate Manager → Personal → Certificates
  2. Right-click certificate → All Tasks → Export
  3. Choose Yes, export the private key
  4. Select Personal Information Exchange - PKCS #12 (.PFX)
  5. Set password and save (e.g., client-cert.pfx)
Terminal window
# Export certificate with private key
$cert = Get-ChildItem Cert:\LocalMachine\My\<thumbprint>
$password = ConvertTo-SecureString -String "YourPassword" -Force -AsPlainText
Export-PfxCertificate -Cert $cert -FilePath "C:\Temp\client-cert.pfx" -Password $password
Section titled “Using runmqakm (recommended for IBM MQ 9.0+)”
Terminal window
:: Create new Key Database
runmqakm -keydb -create -db "C:\MQ\KeyDB\key.kdb" -pw YourKdbPassword -type cms -stash
:: Import certificate from PFX
runmqakm -cert -import -file "C:\Temp\client-cert.pfx" -pw YourPfxPassword ^
-target "C:\MQ\KeyDB\key.kdb" -target_pw YourKdbPassword -target_type cms ^
-label "nodiniteclient"
:: List certificates (verify import)
runmqakm -cert -list -db "C:\MQ\KeyDB\key.kdb" -pw YourKdbPassword -type cms
Using ikeycmd (legacy tool for older IBM MQ)
Section titled “Using ikeycmd (legacy tool for older IBM MQ)”
Terminal window
:: Create new Key Database
ikeycmd -keydb -create -db "C:\MQ\KeyDB\key.kdb" -pw YourKdbPassword -type cms -stash
:: Import certificate from PFX
ikeycmd -cert -import -file "C:\Temp\client-cert.pfx" -pw YourPfxPassword ^
-target "C:\MQ\KeyDB\key.kdb" -target_pw YourKdbPassword -target_type cms ^
-label "nodiniteclient"

Step 3: Import CA Certificate Chain (if needed)

Section titled “Step 3: Import CA Certificate Chain (if needed)”
Terminal window
:: Import root CA certificate
runmqakm -cert -add -file "C:\Temp\root-ca.cer" -db "C:\MQ\KeyDB\key.kdb" ^
-pw YourKdbPassword -type cms -label "RootCA"
:: Import intermediate CA certificate
runmqakm -cert -add -file "C:\Temp\intermediate-ca.cer" -db "C:\MQ\KeyDB\key.kdb" ^
-pw YourKdbPassword -type cms -label "IntermediateCA"

In Nodinite IBM MQ Agent Configuration:

SSL Key Repository Path: C:\MQ\KeyDB\key
(Note: Omit .kdb extension)
SSL Certificate Label: nodiniteclient
CipherSpec: TLS_RSA_WITH_AES_128_CBC_SHA256
SSL Peer Name Property: CN=<QueueManagerHost>

CipherSpec Security Level TLS Version Notes
TLS_RSA_WITH_AES_256_GCM_SHA384 High TLS 1.2 Recommended for IBM MQ 9.1+
TLS_RSA_WITH_AES_128_CBC_SHA256 Medium TLS 1.2 Good balance of security and compatibility
TLS_RSA_WITH_AES_256_CBC_SHA256 High TLS 1.2 Strong encryption, widely supported
ECDHE_RSA_AES_128_CBC_SHA256 High TLS 1.2 Forward secrecy, requires EC certificates
TLS_AES_256_GCM_SHA384 High TLS 1.3 IBM MQ 9.2+ only
Terminal window
echo "DISPLAY CHANNEL(<ChannelName>)"|runmqsc <QueueManagerName>

Look for SSLCIPH attribute in output.


Error: MQRC_SSL_INITIALIZATION_ERROR (2393)

Section titled “Error: MQRC_SSL_INITIALIZATION_ERROR (2393)”

Agent cannot access certificate or Key Database file.

  • Legacy Agent (.NET Framework 4.8):

    • Verify .kdb file exists at specified path
    • Ensure .sth (stash) file exists alongside .kdb file
    • Check file permissions - agent service account needs read access
    • Verify SSL Key Repository Path excludes .kdb extension
  • Modern Agent (.NET 9/10):

    • Verify certificate exists in Windows Certificate Store (Cert:\LocalMachine\My)
    • Ensure agent service account has read permissions on private key
    • Check that certificate has proper EKU (Client Authentication)

Queue Manager certificate Distinguished Name doesn't match SSL Peer Name Property.

  1. Check Queue Manager certificate DN:

    Terminal window
    runmqakm -cert -details -db "C:\MQ\QMGR\KeyDB\key.kdb" -pw password -label ibmwebspheremqqmgr1
  2. Update SSL Peer Name Property in agent configuration to match:

    CN=qmgr.example.com,O=YourOrg,C=US
  3. Or use wildcard pattern:

    CN=*.example.com,O=YourOrg

SSL handshake failed - usually CipherSpec mismatch or certificate validation failure.

  1. Verify CipherSpec Match:

    Terminal window
    :: Check Queue Manager channel CipherSpec
    echo "DISPLAY CHANNEL(<ChannelName>)" | runmqsc <QMgrName>

    Ensure agent CipherSpec matches Queue Manager channel SSLCIPH value.

  2. Verify Certificate Chain:

    • Agent must trust Queue Manager's CA certificate
    • Queue Manager must trust agent's CA certificate (mutual TLS)
    • Import CA certificates into both Key Databases
  3. Check Certificate Expiration:

    Terminal window
    runmqakm -cert -list -db "C:\MQ\KeyDB\key.kdb" -pw password -type cms

SSL handshake succeeded, but Queue Manager rejected connection due to authorization.

  1. Verify Certificate DN Mapping:

    • Queue Manager maps certificate DN to MQ user
    • Check SSLPEER and SSLCAUTH on channel definition
  2. Grant Permissions:

    Terminal window
    :: Allow connection for certificate DN
    setmqaut -m <QMgrName> -t qmgr -p <UserMappedFromDN> +connect +inq

Terminal window
:: Test SSL connection (replace placeholders)
amqsputc <QueueName> <QMgrName>

Set environment variables before testing:

Terminal window
set MQSSLKEYR=C:\MQ\KeyDB\key
set MQSSLRESET=0
set MQSAMP_USER_ID=<username>
Terminal window
:: Enable SSL tracing
strmqtrc -m <QMgrName> -t ssl
:: Reproduce issue
:: Stop tracing
endmqtrc -m <QMgrName>
:: View trace
dmpmqtrc <TraceFile>

Enable Debug logging in agent configuration and review agent log files for SSL handshake details.


  • IBM MQ Key Database (.kdb) created with runmqakm/ikeycmd
  • Stash file (.sth) exists alongside .kdb file
  • Client certificate with Client Authentication EKU imported
  • CA certificate chain imported (if using CA-signed certs)
  • SSL Key Repository Path configured without .kdb extension
  • SSL Certificate Label matches imported certificate label
  • CipherSpec matches Queue Manager channel configuration
  • SSL Peer Name Property matches Queue Manager certificate DN
  • Agent service account has read permissions on .kdb and .sth files
  • Certificate with Client Authentication EKU in Windows Certificate Store
  • Private key accessible to agent service account
  • CA certificate chain trusted (Trusted Root Certification Authorities)
  • SSL Key Repository Path configured (*SYSTEM or .kdb path)
  • SSL Certificate Label matches certificate label
  • CipherSpec matches Queue Manager channel configuration
  • SSL Peer Name Property matches Queue Manager certificate DN
  • Queue Manager certificate with Server Authentication EKU
  • Certificate label matches ibmwebspheremq<qmgr_name> (lowercase)
  • Channel has SSLCIPH defined
  • Channel has SSLCAUTH set appropriately (REQUIRED for mutual TLS)
  • Channel has SSLPEER configured to accept agent certificate DN
  • Agent's CA certificate imported (if using mutual TLS)
  • Proper permissions granted to mapped user (CONNECT, INQ)

Q: Can I use the same certificate for multiple Queue Managers?
A: Not recommended. Best practice is one client certificate per agent instance. However, if using the same certificate, ensure the certificate's DN is authorized on all Queue Managers.

Q: Do I need mutual TLS (both server and client certificates)?
A: Depends on Queue Manager channel configuration. If SSLCAUTH is set to REQUIRED, mutual TLS is mandatory. If set to OPTIONAL, only server certificate is required.

Q: Can I migrate from .kdb files to Windows Certificate Store?
A: Yes, with modern agent (.NET 9/10). Export certificate from .kdb, import into Windows Certificate Store, update agent configuration to use *SYSTEM for SSL Key Repository Path.

Q: How do I troubleshoot "Certificate not found" errors? A:

  • Legacy Agent: Verify .kdb file path is correct and certificate label exists: runmqakm -cert -list -db path\key.kdb -pw password
  • Modern Agent: Verify certificate in Cert:\LocalMachine\My and label matches configuration

Q: What happens if certificates expire?
A: SSL connections fail immediately with handshake errors. Monitor certificate expiration dates and renew before expiration. Use Nodinite Certificate Monitoring to track Queue Manager certificate expiration.


IBM MQ Agent Configuration – Configure SSL/TLS settings for the monitoring agent
IBM MQ Troubleshooting – Return to the troubleshooting hub for related guidance

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...