0

I use the mssql package and connect to database like this:

const sql = require('mssql')
const config = {
    user: 'sa',
    password: 'xxxxxx',
    server: 'xxx.xxx.xxx.xxx',
    database: 'zorgo',
    options : {
        enableArithAbort: false,
        cryptoCredentialsDetails: {
            minVersion: 'TLSv1'
        }
    }
};

Now I want to try 'sequelize' library and try to connect

const sequelize = new Sequelize('zorgo', 'sa', 'xxxxxx', {
    dialect: 'mssql',
    host: 'xxx.xxx.xxx.xxx',
    options: {
        enableArithAbort: false,
        cryptoCredentialsDetails: {
            minVersion: 'TLSv1'
        }
    }
});

But I get an error

Failed to connect to xxx.xxx.xxx.xxx:1433 - 584:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol

Please help me resolve this problem

2
  • Are you making both connections from the same client machine/container/guest to the same SQL Server instance? If they're different clients they may have different mssql versions, different OpenSSL versions or different settings in their /etc/ssl/openssl.cnf files. Commented Mar 21, 2021 at 9:18
  • I am making connection at the same SQL Server from the same app.
    – zorgo
    Commented Mar 21, 2021 at 10:50

1 Answer 1

1

I found the answer to my question

    const sequelize = new Sequelize('zorgo', 'sa', 'xxxxxx', {
    dialect: 'mssql',
    host: 'xxx.xxx.xxx.xxx',
    dialectOptions: {
        options: {
            enableArithAbort: false,
            cryptoCredentialsDetails: {
                minVersion: 'TLSv1'
            }
        }
    }
});

And works well...

Not the answer you're looking for? Browse other questions tagged or ask your own question.