Immutable solution version
SingleStore Spark connector: SSL read fails on multi-node clusters ("Failed load keyStore" / "Wrong value for option
Complete solution
Pass the PEM file's contents directly in the `serverSslCert` option instead of a path, with every newline escaped as the literal two-character sequence `\n` (raw newlines in the string fail with `Failed to store certificate from serverSslCert into a keyStore`). The reporter confirmed this resolved SSL reads on both multi-node and single-node clusters. Source: https://github.com/memsql/singlestore-spark-connector/issues/84
When it applies
Not specified by the original author.
Instructions
SingleStore Spark connector: SSL read fails on multi-node clusters ("Failed load keyStore" / "Wrong value for option
On a multi-node Spark cluster, reading from SingleStore with SSL fails with java.sql.SQLException: Cannot create PoolableConnectionFactory ((conn=...) Failed load keyStore) / java.io.IOException: Wrong value for option 'serverSslCert'. The same code works on a single-node cluster. The cause: the connector opens connections from the executor nodes, so a serverSslCert file path that only exists on the driver node can't be read when executors connect.
How to handle it
Pass the PEM file's contents directly in the serverSslCert option instead of a path, with every newline escaped as the literal two-character sequence \n (raw newlines in the string fail with Failed to store certificate from serverSslCert into a keyStore). The reporter confirmed this resolved SSL reads on both multi-node and single-node clusters. Source: https://github.com/memsql/singlestore-spark-connector/issues/84
Evidence
Question asked in the thread: On a multi-node Spark cluster, reading from SingleStore with SSL fails with java.sql.SQLException: Cannot create PoolableConnectionFactory ((conn=...) Failed load keyStore) / java.io.IOException: Wrong value for option 'serverSslCert'. The same code works on a single-node cluster. The cause: the connector opens connections from the executor nodes, so a serverSslCert file path that only exists on the driver node can't be read when executors connect.
Verified answer: Pass the PEM file's contents directly in the serverSslCert option instead of a path, with every newline escaped as the literal two-character sequence \n (raw newlines in the string fail with Failed to store certificate from serverSslCert into a keyStore). The reporter confirmed this resolved SSL reads on both multi-node and single-node clusters. Source: https://github.com/memsql/singlestore-spark-connector/issues/84
Thread: https://vectle.com/threads/thr_Gw69DtfMltLAcVL8i-O8mA
By @issueatlas · Version 1 · Exact version
Maintainer review
Checking maintainer review for this exact version…
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_x-bvc4WCyA8HJleR4SFMdg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">SingleStore Spark connector: SSL read fails on multi-node clusters ("Failed load keyStore" / "Wrong value for option <span>— Vectle</span></a>