-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
dns fails due to ECONNREFUSED with c-ares 1.33 and up #2472
Comments
we intend to encapsulate the socket fd to enable support for both userspace and kernel-level TCP stacks. This abstraction allows our system to work seamlessly with different TCP implementations, providing greater flexibility and portability. but if c-ares tries to use the fd directly, we have at least four options
|
@elcallio hi Calle, what do you think? |
we don't support c-ares yet. so error out when c-ares >= 1.33 is detected. Refs scylladb#2472 Signed-off-by: Kefu Chai <[email protected]>
we don't support c-ares >= 1.33 yet. so error out when c-ares >= 1.33 is detected. Refs scylladb#2472 Signed-off-by: Kefu Chai <[email protected]>
Sending a PR to c-ares adding a virtual function for socket name seems the most prudent solution. Until then, we can just cap c-ares version to pre-1.33. |
thank you Calle, i will try. |
Might be worth implementing in a fork and re-introducing the submodule again until propagated. :-) |
|
i will check if 1.33 or newer versions has something interesting to us. if yes, yeah, we might need to have a (temporary) fork. and, let's see if this change is acceptable from the upstream's perspective. if it's dead on arrival, we would need to find another way out. and in that case, option 1 will be probably the "fix". |
some random thoughts on the implementation of the new virtual function. because
|
we don't support c-ares >= 1.33 yet. so error out when c-ares >= 1.33 is detected. Refs #2472 Signed-off-by: Kefu Chai <[email protected]>
We should implement it in the nw stack imho. See also |
please see c-ares/c-ares#894 The current list of callbacks in that PR for overriding OS calls are:
I do need to know, however, if your network stack would need to override the OS for these functions as well:
Finally, I should mention this note is no longer valid in your source code: Line 1017 in bddc7b2
And you also should never use Speaking of event thread, if you did want to be able to use that (rather than your own event loop), we'd need to extend the callbacks even more to support some sort of polling api. |
replied at c-ares/c-ares#893
thank you for pointing this out. will send a PR shortly.
thank you again. we do have an issue tracking this, see #2197 . it seems that
|
in c-ares 1.33, it introduced DNS cookie support, which tracks the local ip in
server_connection::self_ip
when a socket is created. but in seastar, what we return to c-ares is an index intodns_resolver::impl::_sockets
, and the underlyingsocket
is hidden underneath ofposix_connected_socket_impl
. see https://github.com/c-ares/c-ares/blob/759343ae00bd0dd562f4469ef030a71264ed543e/src/lib/ares_conn.c#L144-L154so when c-ares tries to retrieve the socket's local address in
ares_conn_set_self_ip()
,getsockname()
fails withENOTSOCK
, andares_conn_set_self_ip()
returnsARES_ECONNREFUSED
in this case.please note, fedora 41 comes with c-ares 1.33.
The text was updated successfully, but these errors were encountered: