Reputation: 170
I have created an oracle wallet using orapki and imported truststore certificates into it. I have an RDS oracle database in AWS and when trying to connect to it using the oracle wallet I get this error:
[2024-11-07T13:31:04.692] [ERROR] oracleDBWrapper - Error: NJS-505: unable to initiate TLS connection. Please check if wallet credentials are valid
at Object.throwErr (/home/node/node_modules/oracledb/lib/errors.js:603:10)
at NTTCP.connect (/home/node/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:237:18)
at async NetworkSession.transportConnect (/home/node/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:173:5)
at async NetworkSession.connect2 (/home/node/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:211:7)
at async NetworkSession.connect1 (/home/node/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:314:23)
at async NetworkSession.connect (/home/node/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:530:5)
at async ThinConnectionImpl.connect (/home/node/node_modules/oracledb/lib/thin/connection.js:628:5)
at async ThinPoolImpl.bgThreadFunc (/home/node/node_modules/oracledb/lib/thin/pool.js:420:11) {
code: 'NJS-505'
}
However using this same wallet and sqlplus I can connect fine so it seems the wallet is fine. On my local machine I added in some logging to ntTcp.js
and checked the exact error is:
Error: error:0909006C:PEM routines:get_name:no start line
at setKey (node:internal/tls/secure-context:92:11)
at configSecureContext (node:internal/tls/secure-context:174:7)
at Object.createSecureContext (node:_tls_common:121:3)
at NTTCP.connect
Upvotes: 0
Views: 99
Reputation: 11
Can you try adding the wallet by setting NODE_EXTRA_CA_CERTS. https://github.com/oracle/node-oracledb/issues/1593
Upvotes: 0