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

TLS connection error: connection reset by peer #61

Closed
raymundovr opened this issue Feb 21, 2023 · 6 comments
Closed

TLS connection error: connection reset by peer #61

raymundovr opened this issue Feb 21, 2023 · 6 comments

Comments

@raymundovr
Copy link

raymundovr commented Feb 21, 2023

Hi,

I am trying to connect to CloudAMQP by using the TLS connection (amqps).

let mut args = OpenConnectionArguments::new(
        "host.cloudamqp.com",
        5671,
        "user",
        "super_secret",
    );
    args.virtual_host("/my_vh");

let connection = Connection::open(&args)
    .await?;

Given that the TLS example involves file certificates I was thinking that this is the way to do it merely as a client (as many other libraries do). Unfortunately I can't connect:

Error: AMQP network error: network io error: Connection reset by peer (os error 54)

I'll appreciate any help.

@gftea
Copy link
Owner

gftea commented Feb 22, 2023

Do you have correct tls configuration to your client?
good reference to read first: https://www.rabbitmq.com/ssl.html,

@raymundovr
Copy link
Author

Yes, other libraries do not crash :)

@gftea
Copy link
Owner

gftea commented Feb 22, 2023

In your above code, there is no tls adapter configured to connection Argument, can you paste full code of your connection configurations

@gftea
Copy link
Owner

gftea commented Feb 25, 2023

not enough information provided to help you, note that you need to make sure you configure the client's root cert store, etc mapping the config in server correctly and provide the TlsAdaptor to the connection, you can read more about rustls document.
if you using system default root store, you can use crate rustls-native-certs.

I believe it is an issue in your config, not the library itself, If no more info provide, I would close the ticket

@raymundovr
Copy link
Author

raymundovr commented Feb 25, 2023

Hi @gftea, I ended up using another library that does not require so much to perform a TLS connection. I just want to connect using a str :).

Will check if I can contribute with this later on.

@gftea
Copy link
Owner

gftea commented Feb 25, 2023

OK, I will close it now.
And there is new ticket to address the enhancement #62

@gftea gftea closed this as completed Feb 25, 2023
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

No branches or pull requests

2 participants