3

I am trying to connect Cubejs to MongoDB through MongoDB BI Connect.

My mongosqld command is as follows

./mongosqld --config mongosqld.conf -u useradmin -p xxxx --auth --sslMode requireSSL --sslPEMKeyFile mongo.pem 

I have created mongo.pem file by referring below link

Cube.js: Error: ssl is required when using cleartext authentication using MongoDB BI Connector

My Cube.js .ENV configuration is as follows

CUBEJS_DEV_MODE=true
CUBEJS_DB_TYPE=mongobi
CUBEJS_API_SECRET= xxxxxx
CUBEJS_EXTERNAL_DEFAULT=true
CUBEJS_SCHEDULED_REFRESH_DEFAULT=true
CUBEJS_WEB_SOCKETS=true
CUBEJS_DB_HOST=localhost
CUBEJS_DB_NAME=RDM
CUBEJS_DB_USER=useradmin
CUBEJS_DB_PASS=xxxx
CUBEJS_DB_SSL=true
CUBEJS_DB_SSL_REJECT_UNAUTHORIZED=false

After trying to connect Error shown in cubejs

Runtime Error
Cube.js was unable to connect to the specified database.
The database returned the following error:
>Database Error
Error: Error: 19488:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

And below error in mongosqld run on powershell

2021-10-12T17:15:06.045+0000 I NETWORK    [conn1] connection accepted from 127.0.0.1:61457 #1 (1 connection now open)
2021-10-12T17:15:06.056+0000 E NETWORK    [conn1] handshake error: ERROR 1043 (08S01): recv handshake response error: ERROR 1043 (08S01): ssl configuration error: UseCertificateChainFile: SSL errors: 906d06c:PEM routines:PEM_read_bio:no start line
140dc009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib
2021-10-12T17:15:06.057+0000 I NETWORK    [conn1] end connection 127.0.0.1:61457 (0 connections now open)

From the error I understand that the .pem file generated is not correct. Can someone please help me in this ?

user3863585
  • 53
  • 1
  • 1
  • 4

0 Answers0