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
Add a comment  | 

1 Answer 1

Reset to default 0

Can 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
Add a comment  | 

1 Answer 1

Reset to default 0

Can you try adding the wallet by setting NODE_EXTRA_CA_CERTS. https://github/oracle/node-oracledb/issues/1593

本文标签: