You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to connect to mongodb pod in a 'persistence' namespace from a pod of rust actix-web server in 'security' namespace, using the service name of mongodb pod, but i get this error:
In local this doesn't occur and even if I try pointing from rust running local to ingress of mongodb pod (or port-forwarding the mongodb pod), it works as expected, so I can't understand how this happens. I also used a 'busybox' pod, inside 'security' namespace, executing 'nslookup mongodb.persistence.svc.cluster.local' and it works, so the mongodb pod and service seems to be ok.
I tried even without .direct_connection() (and without increasing .connect_timeout(), that I increased to try if there is some delay) but it didn't work, the only change in not using .direct_connetion() is the 'Topology Type' that changes from 'Single' to 'Unknown' in the error. I also used 'mongodb://mongodb.persistence.svc.cluster.local' as host but it didn't work.
It's the first time I try to connect from a rust pod to mongodb pod, so I don't have any other experience, and I'm fairly new to Rust so all this, looks very strange to me (considering that using Golang this works as expected).
Thanks in advance
The text was updated successfully, but these errors were encountered:
Hi @Leonardo-94, thanks for opening this issue! The error you're receiving:
I/O error: Device or resource busy (os error 16),
indicates that this issue is likely not related to the driver itself, but instead related to your setup or how you're connecting. I recommend posting this question on the community forums where you can get some help debugging this!
Hi @isabelatkinson, thanks for your response. It looks very strange cause using the IP of the service (instead of the service.namespace.svc.cluster.local) as host, works well. But ok, if you say that this is a setup problem, I try to post a question on the community forum.
I let you decide whether to close the issue or not.
Versions/Environment
Rust version: 1.77.1
Mongodb version: 2.8.2
OS: windows subsystem linux 2
cargo pkgid mongodb: registry+https://github.com/rust-lang/crates.io-index#[email protected]
cargo pkgid bson: registry+https://github.com/rust-lang/crates.io-index#[email protected]
Mongo Replicaset
Kubernetes on k3d
Describe the bug
I try to connect to mongodb pod in a 'persistence' namespace from a pod of rust actix-web server in 'security' namespace, using the service name of mongodb pod, but i get this error:
In local this doesn't occur and even if I try pointing from rust running local to ingress of mongodb pod (or port-forwarding the mongodb pod), it works as expected, so I can't understand how this happens. I also used a 'busybox' pod, inside 'security' namespace, executing 'nslookup mongodb.persistence.svc.cluster.local' and it works, so the mongodb pod and service seems to be ok.
I'm making the connection with below code:
I tried even without .direct_connection() (and without increasing .connect_timeout(), that I increased to try if there is some delay) but it didn't work, the only change in not using .direct_connetion() is the 'Topology Type' that changes from 'Single' to 'Unknown' in the error. I also used 'mongodb://mongodb.persistence.svc.cluster.local' as host but it didn't work.
It's the first time I try to connect from a rust pod to mongodb pod, so I don't have any other experience, and I'm fairly new to Rust so all this, looks very strange to me (considering that using Golang this works as expected).
Thanks in advance
The text was updated successfully, but these errors were encountered: