Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(server): SQL SSL docs update on using ssl with no custom cert #606

Merged
merged 1 commit into from
May 14, 2021

Conversation

metalix2
Copy link
Contributor

Found out that when using certificates defined else where you need to specify in the sqlDialectOptions that ssl is true.

Related thread - sequelize/sequelize#956 (comment)

Just felt it should be noted in the docs.

I suppose the alternative is to bind sqlConnectionSsl: true to map to

dialectOptions: {
  ssl: true,
}

Without this the API returns:

SequelizeConnectionError: no pg_hba.conf entry for host "172.18.48.124", user "lighthouseci", database "lighthouseci", SSL off
    at /usr/src/lhci/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:154:24
    at Connection.connectingErrorHandler (/usr/src/lhci/node_modules/pg/lib/client.js:194:14)
    at Connection.emit (events.js:315:20)
    at Socket.<anonymous> (/usr/src/lhci/node_modules/pg/lib/connection.js:134:12)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at Socket.Readable.push (_stream_readable.js:212:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @metalix2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants