Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

diesel does not connection to postgres database with sslmode required #3317

Closed
3 tasks done
ghost opened this issue Sep 11, 2022 · 2 comments
Closed
3 tasks done

diesel does not connection to postgres database with sslmode required #3317

ghost opened this issue Sep 11, 2022 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Sep 11, 2022

Setup

Versions

  • Rust: stable 11 sept 2022
  • Diesel: 2.0.0
  • Database: postgres
  • Operating System mac m1

Feature Flags

  • diesel:
  • ["postgres","numeric","chrono"]

Problem Description

diesel-cli runs migrations successfully with sslmode=require attached to database url
but when performing diesel_insert in program, it says error performing TLS handshake: no TLS implementation configured"

What are you trying to accomplish?

Connect to postgres database with sslmode required.

What is the expected output?

Successful database insert

What is the actual output?

error performing TLS handshake: no TLS implementation configured"

Are you seeing any additional errors?

N/A

Steps to reproduce

Setup postgres 14 database with encryption only connection.
Create insert query using diesel with sslmode required

Checklist

sgrif/pq-sys#25

  • This issue can be reproduced on Rust's stable channel. (Your issue will be
    closed if this is not the case)
  • This issue can be reproduced without requiring a third party crate
@ghost ghost added the bug label Sep 11, 2022
@ghost ghost closed this as completed Sep 11, 2022
@ghost ghost reopened this Sep 11, 2022
@ghost
Copy link
Author

ghost commented Sep 11, 2022

Also adding allow to sslmode url query results in

UnableToSendCommand, "invalid connection string: invalid value for option sslmode

@weiznich
Copy link
Member

This sounds like an issue with your environment. Can you verify that psql postgres://your/db_url works for you. If not that indicates that your database url does just not match your setup.

@diesel-rs diesel-rs locked and limited conversation to collaborators Sep 19, 2022
@weiznich weiznich converted this issue into discussion #3326 Sep 19, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

1 participant