Exception thrown from thin mode connection finalizer #1748
-
I'm seeing an issue with version 6.8+ when a thin mode connection attempt fails. When the subsequent finalizer runs, an exception is thrown. My service implementation will try connecting with thick mode when the connection fails. The thick mode connection is successful but the service is left in an potentially unstable state due to the thin mode connection finalizer exception. Has anyone else seen this? finalizer from connection.js exception that is thrown... C:\iv\oracle-connect\node_modules\oracledb\lib\thin\sqlnet\networkSession.js:640 TypeError: Cannot read properties of null (reading 'err') reason for connection failure Error: NJS-533: Advanced Networking Option service negotiation failed. Native Network Encryption and DataIntegrity only supported in node-oracledb thick mode. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Some additional info. The issue does not reproduce in version 6.7.0. The connection failure error in 6.7.0 is ... NJS-521: connection to host 10.96.156.16 port 1521 received end-of-file on communication channel. (CONNECTION_ID=HZz1bdALU4Mei+lWakiOmA==) The difference in behavior between 6.7.0 and 6.8.0 that results in the exception is that in 6.7.0 when the finalizer calls networkSession.disconnect the this.connected conditional is false. In 6.8.0 the this.connected conditional is true. In both cases type and this.ntAdapter are undefined/null. disconnect(type) { |
Beta Was this translation helpful? Give feedback.
-
Hi |
Beta Was this translation helpful? Give feedback.
-
@gcowan-ot Thanks for analysis, I think the state
We need to adjust this state to correctly indicate Accept/ANO failures..
We will valuate the proper fix and would address this issue. With 6.8.0, You would get this error NJS-533 when the DB has NNE enabled where earlier the error was not informative.. Since finalizer triggered in middle, it caused above issue.. |
Beta Was this translation helpful? Give feedback.
@gcowan-ot Thanks for analysis, I think the state
this.connected = true;
is incorrectly marked as true without completing ANO (Advanced Networking Options)const buf = NAContext.sendPacket();
We need to adjust this state to correctly indicate Accept/ANO failures..