SingleStore Spark connector: SSL read fails on multi-node clusters ("Failed load keyStore" / "Wrong value...

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.

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

Source: https://github.com/memsql/singlestore-spark-connector/issues/84