Bug 63088 - connecting to servers with RR dns connects to different sites
Summary: connecting to servers with RR dns connects to different sites
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 88855 94271 307784 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-21 22:22 UTC by cb-kde
Modified: 2018-04-25 21:00 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cb-kde 2003-08-21 22:22:26 UTC
Version:            (using KDE KDE 3.1.3)
Installed from:    Compiled From Sources

Using konqueror, I connect to
ftp://ftp.uk.kernel.org/

While browsing the directory structure, I get various behaviour, such as everything working, entering a directory reports 'directory does not exist', and repeated attempts at the same thing working.

I am guessing that konqueror is sometimes opening a new connection, and  sometimes connecting to a different server where the directory does not exist. The DNS lookup for a given host name should be done at the beginning the session only.
Comment 1 Thiago Macieira 2003-10-12 17:47:09 UTC
That isn't a problem for each kio_ftp, but Konqueror can launch more than one to be able to 
show completions on the tab bar as well as download and let you keep on browsing the file 
structure. 
Comment 2 Waldo Bastian 2004-08-10 22:16:41 UTC
We have this problem with http as well.. I think when an IO-slave does a successful DNS lookup it should pass the IP number back to the application (KIO::Scheduler) which should then pass that information on to other IO-slaves that need to connect to the same host.

We can even go a step further and start doing DNS resolution in the application side if we have proper asynchronous DNS resolution (do we have that at the moment?)

If we do that we should also make sure to take care of the case where we get multiple IP numbers and the first one fails to connect.
Comment 3 Thiago Macieira 2004-08-10 23:58:38 UTC
We do have proper async DNS working.

The idea is interesting. Maybe we should extend it to all ioslaves? (If so, change the component in the bug ticket).

I also believe there's a duplicate of this, as a wishlist. Let me see if I can find it.
Comment 4 Thiago Macieira 2004-08-11 00:54:26 UTC
It is no duplicate, but I've found the report I was thinking about: bug #68894.

The idea is also to move the name-resolution from the ioslave to the iomaster so that all slaves get the same address. By doing this, we're effectively doing the "cache of negative responses" that I mentioned there: a second ioslave launched would not try again an address that we know not to work.

Finally, I must mention that doing this will also require the timeout processing on the iomaster, instead of the slave.

The data to be sent to the ioslave would ideally be a KSocketAddress along with the original hostname and port for SSL purposes and for HTTP's Host: header. If passing the binary data is not acceptable, a pair of strings will do (node and service from KSocketAddress).
Comment 5 Thiago Macieira 2004-10-11 16:17:04 UTC
*** Bug 88855 has been marked as a duplicate of this bug. ***
Comment 6 Waldo Bastian 2004-10-29 13:37:20 UTC
The problem with doing the lookup in the application is that not every slave uses DNS hostnames. And e.g. http does, but not if it uses a proxy.

It may be easier to do the lookup in a kdedmodule, the io-slave should then also report back success or failure in connecting so that the kdedmodule can decide which ip-address to use for requests from other slaves.
Comment 7 Thiago Macieira 2004-10-30 02:02:33 UTC
That's true. However, the fact that an ioslave does the resolution could create a condition in which two slaves are doing the resolving at the same time and could come up with a different results (filename completion, for instance).

Unless the DCOP call to the kdedmodule from the second ioslave blocked it until the first completes the name-resolution.

I think this is getting too complex for such a simple task.
Comment 8 Stephan Kulow 2004-12-02 09:57:00 UTC
*** Bug 94271 has been marked as a duplicate of this bug. ***
Comment 9 Dawit Alemayehu 2011-04-21 04:52:04 UTC
Not a kio_ftp specific issue + such issues are better solved by using a local caching DNS server such as pdnsd so that the problem is solved for every application instead of just KDE based ones.
Comment 10 Dawit Alemayehu 2013-06-06 04:33:15 UTC
KDE 3 is no longer maintained.
Comment 11 Nate Graham 2018-04-25 21:00:41 UTC
*** Bug 307784 has been marked as a duplicate of this bug. ***