we have added the following in .env file
CUBEJS_DB_HOST=
CUBEJS_DB_NAME=
CUBEJS_DB_PORT=1433
CUBEJS_DB_USER=
CUBEJS_DB_PASS=
CUBEJS_DB_DOMAIN=
CUBEJS_DB_TYPE=mssql
CUBEJS_API_SECRET=
after run " npm dev "
we are facing this error in " http://localhost:4000/#/schema"
Error while loading DB schema
ConnectionError: Server requires encryption, set 'encrypt' config option to true. at Connection.tedious.once.err (C:\Users\systemname\Desktop\mbvcubejs\node_modules\mssql\lib\tedious.js:244:17) at Object.onceWrapper (events.js:281:20) at Connection.emit (events.js:193:13) at Connection.processPreLoginResponse (C:\Users\systemname\Desktop\mbvcubejs\node_modules\tedious\lib\connection.js:1168:14) at Connection.message (C:\Users\systemname\Desktop\mbvcubejs\node_modules\tedious\lib\connection.js:1804:14) at Connection.dispatchEvent (C:\Users\systemname\Desktop\mbvcubejs\node_modules\tedious\lib\connection.js:1084:36) at MessageIO.messageIo.on (C:\Users\systemname\Desktop\mbvcubejs\node_modules\tedious\lib\connection.js:984:14) at MessageIO.emit (events.js:193:13) at Message.message.on (C:\Users\systemname\Desktop\mbvcubejs\node_modules\tedious\lib\message-io.js:32:14) at Message.emit (events.js:198:15)
I have been facing the similar issue. Any workaround to this ?
+1
@hegde89 @dtirtbyke @priyanka-shetty Did you have a chance to try set CUBEJS_DB_SSL=true option?
@hegde89 @dtirtbyke @priyanka-shetty Did you have a chance to try set
CUBEJS_DB_SSL=trueoption?
This one worked.
I didn't have luck with the above approach. I received an error saying that this version of windows does not accept windows logins (or something like that).
I was able to connect by updating the node_modules/@cubejs-backend/mssql-driver/driver/MSSqlDriver.js file. I replaced the this.config object to the following:
this.config = {
authentication: {
options: {
userName: process.env.CUBEJS_DB_USER,
password: process.env.CUBEJS_DB_PASS
},
type: "default"
},
server: process.env.CUBEJS_DB_HOST,
database: process.env.CUBEJS_DB_NAME,
options: {
database: process.env.CUBEJS_DB_NAME,
encrypt: true
},
pool: {
max: 8,
min: 0,
evictionRunIntervalMillis: 10000,
softIdleTimeoutMillis: 30000,
idleTimeoutMillis: 30000,
testOnBorrow: true,
acquireTimeoutMillis: 20000
},
...config
}
Most helpful comment
I didn't have luck with the above approach. I received an error saying that this version of windows does not accept windows logins (or something like that).
I was able to connect by updating the node_modules/@cubejs-backend/mssql-driver/driver/MSSqlDriver.js file. I replaced the this.config object to the following:
this.config = {
authentication: {
options: {
userName: process.env.CUBEJS_DB_USER,
password: process.env.CUBEJS_DB_PASS
},
type: "default"
},
server: process.env.CUBEJS_DB_HOST,
database: process.env.CUBEJS_DB_NAME,
options: {
database: process.env.CUBEJS_DB_NAME,
encrypt: true
},
pool: {
max: 8,
min: 0,
evictionRunIntervalMillis: 10000,
softIdleTimeoutMillis: 30000,
idleTimeoutMillis: 30000,
testOnBorrow: true,
acquireTimeoutMillis: 20000
},
...config
}