Closed volkmarbuehringer closed 8 months ago
the errormessage thrown by the thin connection:
:{"type":"Error","message":"NJS-500: connection to the Oracle Database was broken\nNJS-521: connection to host 10.96.2.9 port 1521 received end-of-file on communication channel. (CONNECTION_ID=8CA8lEDOYPT7wmlU1TTt2g==)","stack":"Error: NJS-500: connection to the Oracle Database was broken\nNJS-521: connection to host 10.96.2.9 port 1521 received end-of-file on communication channel. (CONNECTION_ID=8CA8lEDOYPT7wmlU1TTt2g==)\n at NTTCP.checkErr (/home/prounix/projekte/azur/lotterie/services/js/transporter/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:327:29)\n at NTTCP.receive (/home/prounix/projekte/azur/lotterie/services/js/transporter/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:463:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async NetworkSession._recvPacket (/home/prounix/projekte/azur/lotterie/services/js/transporter/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:378:22)\n at async NetworkSession.recvPacket (/home/prounix/projekte/azur/lotterie/services/js/transporter/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:443:12)\n at async ReadPacket.waitForPackets (/home/prounix/projekte/azur/lotterie/services/js/transporter/node_modules/oracledb/lib/thin/protocol/packet.js:293:20)\n at async Protocol._decodeMessage (/home/prounix/projekte/azur/lotterie/services/js/transporter/node_modules/oracledb/lib/thin/protocol/protocol.js:70:5)\n at async Protocol._processMessage (/home/prounix/projekte/azur/lotterie/services/js/transporter/node_modules/oracledb/lib/thin/protocol/protocol.js:153:9)\n at async ThinConnectionImpl.connect (/home/prounix/projekte/azur/lotterie/services/js/transporter/node_modules/oracledb/lib/thin/connection.js:682:9)\n at async ThinPoolImpl.bgThreadFunc (/home/prounix/projekte/azur/lotterie/services/js/transporter/node_modules/oracledb/lib/thin/pool.js:420:11)","code":"NJS-500"},"msg":"Fehler bei db connect"}
by adding two lines I switch to thick mode and it works fine:
const clientOpts = { libDir: process.env.LD_LIBRARY_PATH }; oracledb.initOracleClient(clientOpts);
Thank you for testing! Was the connection working for you in node-oracledb 6.1 Thin mode?
Are you using Node.js v20.8?
No, 6.1 did not work either yes Node 20.8 Node v18.18.1 delivers the same error
That is odd... What is your Oracle DB version? I assume you are using Linux x86_64 for your app. Please provide us with a simple runnable test case.
Apart from DB version, If this issue is in test environment (no sensitive data to dump ) .., Can you also share the packet traces dumped on console which is enabled with NODE_ORACLEDB_DEBUG_PACKETS env (export NODE_ORACLEDB_DEBUG_PACKETS=1)
@volkmarbuehringer Can you check if Native Network Encryption is enabled in your Oracle Database? Thin mode does not support this. A similar issue was reported in https://github.com/oracle/node-oracledb/discussions/1553
@volkmarbuehringer were you able to check if NNE is enabled in your Oracle Database? Please see @sreguna's comment
in sqlnet.ora I set:
SQLNET.CRYPTO_CHECKSUM_CLIENT = rejected
now I this error-message:
"level":50,"time":"2023-10-27T07:47:27.300Z","pid":13099,"hostname":"compi","err":{"type":"Error","message":"ORA-12660: Encryption or crypto-checksumming parameters incompatible","stack":"Error: ORA-12660: Encryption or crypto-checksumming parameters incompatible\n at async file:///home/prounix/projekte/azur/lotterie/services/js/transporter/conf/db.js:68:18","errorNum":12660,"offset":0,"code":"ORA-12660"},"msg":"Fehler bei db connect"}
I think this means that NNE is required and I have no way to disable it.
@volkmarbuehringer If NNE is required, the Thin mode does not support it yet. Please refer to the discussions section (#1553) .
Connection in thin mode does not work, but in thick mode it works fine.