Comments (4)
The environment variable to use is MQSSLKEYR. See docs here
MQS_KEYSTORE_CONF is used for Advanced Message Security configuration. It's a config file that in turn points at keystores and other values.
The gskit libraries underpinning this package only deal with KDB formats. Some of the command line tools will process JKS stores for convenience, but it's not been enabled for the C library runtime.
from mq-mqi-nodejs.
Thanks @ibmmqmet, I'm using the MQSSLKEYR
to refer to the KDB path in the correct manner (defining the path without extension). I have both the kdb
and sth
files in the same directory and using the same base file name. I'm getting an error message saying MQRC_KEY_REPOSITORY_ERROR [2381]
even though I'm able to use the mq client cli tools to connect successfully using these files.
I'm wondering if this has something to do with the KeyRepository
configuration as it mentions it in the documentation. Is there an example on how to set this value using this module?
EDIT:
After a bit of digging, I've tried to:
var sco = new mq.MQSCO();
sco.KeyRepository = "/my/path/to/kdb";
var cno = new mq.MQCNO();
cno.SSLConfig = sco;
...
mq.Connx(qMgr, cno, function(err, hConn) {
...
});
But I'm still getting the same error message.
from mq-mqi-nodejs.
Assuming you have mykey.kdb, .rdb and .sth along with the CCDT, then you should be able to run with no code changes at all. The kdb must include the signing information for the qmgrs cert to validate that, and - if the SSLCAUTH setting on the svrconn requires it - the client's certificate with an appropriate label. See here for a lot more detail on that.
And of course make sure the CLNTCONN definition matches the SVRCONN definition for cipherspec.
Error log entries from both the queue manager and the client can give much more information than the simple MQRC value.
I do have a sample that I need to tidy up for doing TLS completely programmatically where the CD, SCO and CNO structures are involved but you don't need that when you use the CCDT.
export MQ_CONNECT_TYPE=CLIENT # This may not be needed but it forces client connections
export MQSSLKEYR=`pwd`/mykey # Assume things are all in current directory
export MQCHLLIB=`pwd`
export MQCHLTAB=AMQCLCHL.TAB
node amqsput
I will often run programs under strace just to check that the correct files are being successfully opened; it's the quickest way to verify some of the environment variables are taking effect. And MQ trace would be more detailed debug.
from mq-mqi-nodejs.
The latest update (0.8.0) includes a new sample amqsconntls to show how to programmatically work with TLS configurations.
from mq-mqi-nodejs.
Related Issues (20)
- Getting MQRC_HCONN_ERROR [2018] ERROR while calling Disc() HOT 6
- mqput js string with NewLine HOT 4
- Cannot find MQ C library : Error loading shared library /opt/mqm/lib/libmqm_r.so HOT 4
- ConnxSync is not a function error HOT 2
- Deployment to Cf is failing on ubuntu:jammy HOT 3
- MQRC_CONNECTION_BROKEN [2009] error HOT 7
- [ibmmq] npm install error: 403 Forbidden HOT 6
- Facing issue while setting up MQ Redist Client package on API running on Node js 18 version HOT 5
- Found CONNX: MQCC = MQCC_FAILED [2] MQRC = MQRC_HOST_NOT_AVAILABLE [2538] ERROR in our Production only. HOT 6
- Using SYNCPOINT with the ibmmq v2 NodeJS client HOT 8
- 403 Forbidden for the MQ C library HOT 2
- SSL Initialization Error with same Config HOT 1
- errorCode=2539, reason=MQRC_CHANNEL_CONFIG_ERROR HOT 1
- MQRC_CONNECTION_BROKEN error is not received in get callback HOT 3
- Not seeing full error message when reconnect fails HOT 4
- Receiving and sending segmented messages by IBM MQ HOT 4
- Support for .npmrc is missing HOT 2
- Put message not writing same message to MQ side , it writing ......&)) HOT 2
- NestJS - mq.Get() callback not being executed HOT 3
- Getting MQRC_HCONN_ASYNC_ACTIVE in response logic in request / response code. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mq-mqi-nodejs.