Search code examples
ibm-mq

AMQ9641: Remote CipherSpec error for channel IBM WebSphere MQ client 8.0.0.9


I am running below command from (commandline only not web client) Webspere MQ client v 8.0.0.9 and i am not able to connect MQ server

/opt/mqm/samp/bin/amqsgetc Q-name Q-manager

i am exporting

export MQCHLTAB=xxx.TAB                   ---------xxx.TAB under /var/mqm
export MQCHLLIB=/var/mqm
export MQSSLKEYR=/var/mqm/ssl/cms/cert     -------- cert.kdb under cms dir using
export MQSERVER=channel-name/TCP/'xx.xx.xx.xx(xxx)'

Error i am getting is

07/04/2018 09:22:20 AM - Process(6024.1) User(username) Program(amqsgetc)
                    Host(hostname) Installation(Installation1)
                    VRMF(8.0.0.9) QMgr(.)

AMQ9641: Remote CipherSpec error for channel 'ch-name' to host
'MQ-server-ip(port)'.

EXPLANATION:
The remote end of channel 'ch-name' on host 'MQ-server-ip(port)' has had
a CipherSpec error. The channel did not start.
ACTION:
Review the error logs on the remote system to discover the problem with the
CipherSpec.
----- cmqxrfpt.c : 573 --------------------------------------------------------

Solution

  • The short answer is to remove the MQSERVER environment variable. For further details and references read below.


    If you specify the MQSERVER environment variable MQ will only use this information and ignore the the CCDT environment variables (MQCHLLIB and MQCHLTAB).

    This is referenced in the IBM MQ Knowledge Center page Configuring > Configuring connections between the server and clients > Using IBM MQ environment variables > MQSERVER > Using MQSERVER.

    If you use the MQSERVER environment variable to define the channel between your IBM® MQ MQI client machine and a server machine, this is the only channel available to your application, and no reference is made to the client channel definition table (CCDT).


    Further information on how MQ application will determine connection details is referenced in the IBM MQ Knowledge Center page Developing applications > Developing MQI applications with IBM MQ > Writing client procedural applications > Running applications in the IBM MQ MQI client environment > Connecting IBM MQ MQI client applications to queue managers

    When an application running in an IBM MQ client environment issues an MQCONN or MQCONNX call, the client identifies how it is to make the connection. When an MQCONNX call is issued by an application on an IBM MQ client, the MQI client library searches for the client channel information in the following order:

    1. Using the contents of the ClientConnOffset or ClientConnPtr fields of the MQCNO structure (if supplied). These fields identify the channel definition structure (MQCD) to be used as the definition of the client connection channel. Connection details can be overridden by using a pre-connect exit. For more information, see Referencing connection definitions using a pre-connect exit from a repository.
    2. If the MQSERVER environment variable is set, the channel it defines is used.
    3. If an mqclient.ini file is defined and contains a ServerConnectionParms, the channel that it defines is used. For more information, see Configuring a client using a configuration file and CHANNELS stanza of the client configuration file.
    4. If the MQCHLLIB and MQCHLTAB environment variables are set, the client channel definition table they point to is used.
    5. If an mqclient.ini file is defined and contains ChannelDefinitionDirectory and ChannelDefinitionFile attributes, these attributes are used to locate the client channel definition table. For more information, see Configuring a client using a configuration file and CHANNELS stanza of the client configuration file.
    6. Finally, if the environment variables are not set, the client searches for a client channel definition table with a path and name that are established from the DefaultPrefix in the mqs.ini file. If the search for a client definition table fails, the client uses the following paths:

      • UNIX and Linux systems: /var/mqm/AMQCLCHL.TAB
      • Windows: C:\Program Files\IBM\WebSphere MQ\amqclchl.tab
      • IBM i: /QIBM/UserData/mqm/@ipcc
      • IBM MQ Appliance: _AMQCLCHL.TAB. They appear under the mqbackup:// URI.

    You cannot specify Cipherspec using the MQSERVER environment variable. This is referenced in the IBM MQ Knowledge Center page Configuring > Configuring connections between the server and clients > Using IBM MQ environment variables > MQSERVER

    MQSERVER environment variable is used to define a minimal channel. MQSERVER specifies the location of the IBM® MQ server and the communication method to be used.

    You cannot use MQSERVER to define an SSL channel or a channel with channel exits. For details of how to define an SSL channel, see Protecting channels with SSL.