Closed kiranps closed 8 years ago
Unfortunately their is no easy answer for SSL support, I have never used SSL before, nor tested it before. Maybe someone in the community has been able to get it to work with SSL?
My suggestion would be to get one of the sample C programs that ships with IBM MQ working using SSL. Once we have that in place we can determine what special code is needed for the C api to work with SSL.
@reidmorrison Thank you, I will look in too it
@reidmorrison
when i checked AMQERR01.LOG i got the following error
The remote end of channel 'XXXXX.XXX.SVRCONN' on host 'XXXXXXX' 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.
In the following thread a user had a same issue when ssl is enabled. he forgot to define MQCD_VERSION in his C Program.
http://www.mqseries.net/phpBB2/viewtopic.php?t=56360&sid=dce302ecf5dc67a71b86f81a65742dd1
In my case the sample program for ssl (amqssslc.c) shipped with websphere works fine. In that program the following code sets the MQCD_VERSION. I'm using Websphere MQ 7.5
if (pCipherSpec != NULL)
{
/* SSL requires MQCD version 7 or later */
ClientConn.Version = MQCD_VERSION_7;
/* The MQCD must contain the SSL CipherSpec string */
strncpy(ClientConn.SSLCipherSpec,
pCipherSpec,
MQ_SSL_CIPHER_SPEC_LENGTH);
printf("Using SSL CipherSpec %s\n", pCipherSpec);
}
since we had same issue MQRC_SSL_INITIALIZATION_ERROR[2393]. I looked into wmq_queue_manager.c, but i didn't understood how rubywmq defines MQCD_VERSION_7
This change is a significant amount of effort, including having to setup MQ with SSL to test it. If you want to pay for this feature, we can add it for you. Or, if you add the capability yourself, please send a pull request.
The place to start is in wmq_queue_manager.c
and look for the MQSCO
. The current code does not support ssl_cipher_spec
, but if you search for key_repository
you will find the location where to specify ssl_cipher_spec
.
I got the same issue.
WMQ::QueueManager#initialize() Queue Manager:EBNGWQ WMQ::QueueManager#connect() Loading MQ Client Library:libmqic_r.so WMQ::QueueManager#connect() MQ Library:libmqic_r.so Loaded successfully WMQ::QueueManager#connect() MQ API's loaded successfully WMQ::QueueManager#connect() Connect to Queue Manager:EBNGWQ WMQ::QueueManager#connect() MQCONNX completed with reason:MQRC_SSL_INITIALIZATION_ERROR[2393], Handle:-1
Any progress on this issue?
As mentioned above, we need someone that is running a SSL setup to submit a PR so that we can fix this issue. Anyone want to help out?
As an alternative can we use jruby-jms with SSL setup ?
Yes, jruby-jms should work, but it requires JRuby.
JRuby is an excellent solution in enterprise environments since it can leverage the existing Java investment and it has real threads without global locks. Java can call JRuby directly to embed Ruby code in Java apps. With JRuby an entire Rails app can be deployed as a war file on existing Java App servers.
Thanks. If an existing Rails app is running with Ruby 2 and the requirement is to integrate the WebSphere MQ functionality with SSL setup in background job like Sidekiq then how the jruby jms will work?
For better scalability, batch performance, and priority based processing I recommend Rocket Job over Sidekiq. It directly supports both Ruby 2 and JRuby.
Ok thanks. In case we want to use Sidekiq, does it support both Ruby 2 and JRuby?
Closing since RubyWMQ does not support SSL connections.
Here is my code
Trace logs