-
Notifications
You must be signed in to change notification settings - Fork 1.1k
NJS-505: unable to initiate TLS connection. #1767
Copy link
Copy link
Open
Labels
Description
- What versions are you using?
node-oracledb:6.10.0
- Describe the problem
I am facing an issue establishing a connection to the Oracle DB through node-oracledb, while the connection works successfully using tools like SQL Developer and JetBrains DataGrip with the same walletLocation.
[Nest] 36856 - 20/02/2026, 12:20:52 pm ERROR [TypeOrmModule] Unable to connect to the database (oracleConnection). Retrying (1)...
Error: NJS-505: unable to initiate TLS connection. Please check if wallet credentials are valid
error:1C800064:Provider routines::bad decrypt
at Object.throwErr (root\node_modules\oracledb\lib\errors.js:776:10)
at NTTCP.connect (root\node_modules\oracledb\lib\thin\sqlnet\ntTcp.js:246:18)
at async NetworkSession.transportConnect (root\node_modules\oracledb\lib\thin\sqlnet\networkSession.js:182:5)
at async NetworkSession.connect2 (root\node_modules\oracledb\lib\thin\sqlnet\networkSession.js:222:7)
at async NetworkSession.connect1 (root\node_modules\oracledb\lib\thin\sqlnet\networkSession.js:336:23)
at async NetworkSession.connect (root\node_modules\oracledb\lib\thin\sqlnet\networkSession.js:623:5)
at async ThinConnectionImpl.connect (root\node_modules\oracledb\lib\thin\connection.js:859:5)
at async ThinPoolImpl.bgThreadFunc (root\node_modules\oracledb\lib\thin\pool.js:470:11)
- Include a runnable Node.js script that shows the problem.
TypeOrmModule.forRootAsync({
name: 'oracleConnection',
imports: [ConfigModule],
useFactory: (configService: ConfigService) => {
const walletLocation = path.resolve(configService.getOrThrow<string>('ORACLE_WALLET_LOCATION'));
return {
type: 'oracle',
username: configService.getOrThrow('ORACLE_DB_USERNAME'),
password: configService.getOrThrow('ORACLE_DB_PASSWORD'),
connectString: configService.getOrThrow('ORACLE_DB_TNS_ALIAS'),
extra: {
configDir: walletLocation,
walletLocation: walletLocation,
queueTimeout: 120000,
},
logging: true,
} as OracleConnectionOptions;
},
inject: [ConfigService],
})
Reactions are currently unavailable