admin管理员组文章数量:1025270
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
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
Share
Improve this question
asked Nov 18, 2024 at 12:21
morrrowgimorrrowgi
1701 gold badge5 silver badges11 bronze badges
2
- Try Thick mode node-oracledb. – Christopher Jones Commented Nov 18, 2024 at 22:22
- Using thick mode does fix the issue however I would prefer to be able to use thin mode as using thick mode means I need to include the oracle binaries with my node application and I am trying to avoid that if possible – morrrowgi Commented Dec 24, 2024 at 14:01
1 Answer
Reset to default 0Can you try adding the wallet by setting NODE_EXTRA_CA_CERTS. https://github/oracle/node-oracledb/issues/1593
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
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
Share
Improve this question
asked Nov 18, 2024 at 12:21
morrrowgimorrrowgi
1701 gold badge5 silver badges11 bronze badges
2
- Try Thick mode node-oracledb. – Christopher Jones Commented Nov 18, 2024 at 22:22
- Using thick mode does fix the issue however I would prefer to be able to use thin mode as using thick mode means I need to include the oracle binaries with my node application and I am trying to avoid that if possible – morrrowgi Commented Dec 24, 2024 at 14:01
1 Answer
Reset to default 0Can you try adding the wallet by setting NODE_EXTRA_CA_CERTS. https://github/oracle/node-oracledb/issues/1593
本文标签:
版权声明:本文标题:How to fix NJS-505: unable to initiate TLS connection. Please check if wallet credentials are valid in node-oracledb - Stack Ove 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745618763a2159448.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论