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

ConnectorX MsSQL encryptionlevel TimedOut error #707

Open
boersmamarcel opened this issue Nov 18, 2024 · 0 comments · May be fixed by #708
Open

ConnectorX MsSQL encryptionlevel TimedOut error #707

boersmamarcel opened this issue Nov 18, 2024 · 0 comments · May be fixed by #708
Labels
bug Something isn't working

Comments

@boersmamarcel
Copy link

What language are you using?

Rust

What version are you using?

0.3.3 as available in crates.io, but in addition I checked the change log of 0.4.0 which does not change the relevant lines of code to mitigate the bug. However, I didn't test it yet with 0.4.0.

What database are you using?

MS SQL

What dataframe are you using?

Arrow

Can you describe your bug?

Using the connectorx library with the Arrow DataFrames in Rust, an issue arises when the encryption level is set to NotSupported. This configuration causes an error during execution. Modifying the encryption level to Off resolves the problem.

What are the steps to reproduce the behavior?

If possible, please include a minimal simple example including:

let destination = get_arrow(&source_conn, None, &[queries.query.clone()]).expect("run failed");

It is based on the examples mentioned here. Where I use the default connection string. After a lot of debugging, the reason of the bug can be found in this function: src/sources/mssql/mod.rs.

The suggested fix is:

+++ b/connectorx/src/sources/mssql/mod.rs
@@ -96,7 +96,7 @@ pub fn mssql_config(url: &Url) -> Config {

     match params.get("encrypt") {
         Some(v) if v.to_lowercase() == "true" => config.encryption(EncryptionLevel::Required),
-        _ => config.encryption(EncryptionLevel::NotSupported),
+        _ => config.encryption(EncryptionLevel::Off),
     };

where we change the EncryptionLevel::NotSupported into EncryptionLevel::Off. As a result, we do not get the bug:

run failed: MsSQLArrowTransportError(Source(MsSQLRuntimeError(TimedOut)))
Database setup if the error only happens on specific data or data type

Not applicable, it holds for any table schema and data because it can't connect to the database at all.

Example query / code

See example in the replicate bug section.

What is the error?

We continuously get an TimedOut error:

run failed: MsSQLArrowTransportError(Source(MsSQLRuntimeError(TimedOut)))
@boersmamarcel boersmamarcel added the bug Something isn't working label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant