vertica / vertica-nodejs

Official native node.js client for the Vertica Analytics Database.
https://www.vertica.com/
Apache License 2.0
12 stars 14 forks source link

TLS connection example doc #107

Closed srikang85 closed 1 year ago

srikang85 commented 1 year ago

Could you please add some examples of client code when the Vertica server has TLS enabled

hulmgulm-at-work commented 1 year ago

I tried to open a TLS connection with the following connection options: image

The connection fails with this strange error message:

/home/hulmi/tmp/node_modules/v-protocol/dist/parser.js:344
        const message = name === 'notice' ? new messages_1.NoticeMessage(length, messageValue) : new messages_1.DatabaseError(messageValue, length, name);
                                                                                                 ^

error: Invalid startup packet layout: expected terminator as last byte
    at Parser.parseErrorMessage (/home/hulmi/tmp/node_modules/v-protocol/dist/parser.js:344:98)
    at Parser.handlePacket (/home/hulmi/tmp/node_modules/v-protocol/dist/parser.js:144:29)

Digging into the package received by vertica-nodejs I got the following: E�SFATALC08V01V3753MInvalid startup packet layout: expected terminator as last byteF/data/qb_workspaces/jenkins2/ReleaseBuilds/Hammermill/REL-10_1_1-x_hammermill/build/vertica/Session/ClientSession.cppL4865RProcessStartupPacket

Any idea how to get TLS to work?

DMickens commented 1 year ago

Will be giving this some priority shortly. Apologies for the holiday delay

DMickens commented 1 year ago

"expected null terminator" problem is an issue resolved by https://github.com/vertica/vertica-nodejs/pull/115.

Functionally TLS should be working fine. Will add documentation

srikang85 commented 1 year ago

"expected null terminator" problem is an issue resolved by #115.

Functionally TLS should be working fine. Will add documentation

Thank you @DMickens for fixing the issue. Is this fix not published yet?

DMickens commented 1 year ago

"expected null terminator" problem is an issue resolved by #115. Functionally TLS should be working fine. Will add documentation

Thank you @DMickens for fixing the issue. Is this fix not published yet?

Not yet, planning on publishing on 2/6 with updated documentation