-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected message type error connecting to Oracle 12c DB in thin mode #1589
Comments
Thanks for the report. |
@GeorgeDewar Is this issue consistently reproducible with your 12.2.0.1 database? |
@GeorgeDewar , Thanks for debug information. I see there is a server side piggyback , message type 23 during Authentication phase. Is it possible to share only the packet dump after this message type i.e at offset 304 on wards . Example: Below this is the raw packet dump after offset 337 partial raw packet data from 336 offset onwards:
Entire packet 12 raw data
|
Thank you both for responding. @sharadraju it seems to be consistent, it has never behaved differently and it's doing the same this morning. I should mention that I've had no trouble with version 5.x using Instant Client. I've just tried with 6.0.2 and I get the same error, but without the helpful extra debugging info you added in 6.0.3. @sudarshan12s sure. Here it is (offsets are in hex). 304 is 0x130, the second line of the output below, but I have included the line above because the last byte of that is the value (0x17 or 23) that it read as the message type. I think that might be a small bug in the error message - when it says "at position <n>" it's using
|
@GeorgeDewar , Thanks for sharing the trace. I think you need this patch to make it work. We will check and do a proper fix. Is it possible for you to verify with this small change in lib/thin/protocol/messages/base.js and confirm if it works.
|
Thank you @sudarshan12s! I've tried your patch, and now I get a different error:
I think this error is legit, so it means the patch solves the original problem, am I right? It looks like the same thing as this StackOverflow issue. Would you say it's a won't fix and we need to change the DB settings? |
@GeorgeDewar for the password verifier error, please see my final comment in Issue #1584 . Yes, you would need to change the DB setting to use 11G or higher password verifiers. Node-oracledb's Thin mode supports 11G and higher password verifiers, which are more secure. We are updating this in the documentation as well, FYI. |
Yes @GeorgeDewar , I can see the patch worked in your case . Can you update the password verifier as 0x939 is based on DES, pretty old one and see with new verifier it works? |
Hi @sudarshan12s, sorry for the delay. I can confirm that connecting works with updated password verifier settings (our DBA created a new test account with the 10G, 11G and 12C versions enabled). I hugely appreciate your help on this issue! |
Hi @cjbj, although I said the patch worked, as far as I can tell it hasn't been applied to this repo yet. @sharadraju said in a message above he will "do a proper fix". Should this issue be kept open until that has happened? |
Sure! |
diff --git a/lib/thin/protocol/messages/base.js b/lib/thin/protocol/messages/base.js
index 8495794a..d45fd5bb 100644
--- a/lib/thin/protocol/messages/base.js
+++ b/lib/thin/protocol/messages/base.js
@@ -236,7 +236,7 @@ class Message {
buf.skipUB1(); // skip queue
const num_bytes = buf.readUB4(); // skip replay context
if (num_bytes > 0) {
- buf.skipBytes(num_bytes);
+ buf.skipBytesChunked();
}
} else if (opcode === constants.TNS_SERVER_PIGGYBACK_SESS_RET) {
buf.skipUB2(); The fix for this issue is now available as a patch on this GitHub repo. See the patch above. |
This is now fixed in the 6.1 release. |
I am using Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production.
process.platform: darwin
process.version: v16.20.0
process.arch: x64
require('oracledb').versionString: 6.0.3
require('oracledb').oracleClientVersionString: NJS-089: getting the Oracle Client version is not supported by node-oracledb in Thin mode
It's an error.
oracle_error.js:
I did a little bit of debugging by adding console.log statements to node-oracledb locally, with the following results:
I have a packet trace and can provide details if needed, but won't share the whole thing here in case I inadvertently reveal something sensitive. Here's a screenshot though that shows Wireshark's interpretation of the packet in question, decoded as TNS:
The text was updated successfully, but these errors were encountered: