Bug 112144 - Konqueror does not start when setting socks
Summary: Konqueror does not start when setting socks
Status: RESOLVED INTENTIONAL
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 3.5
Platform: Slackware Linux
: NOR normal
Target Milestone: ---
Assignee: Thiago Macieira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-07 08:37 UTC by Condor
Modified: 2008-05-05 17:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
konqueror strace output (814.06 KB, application/x-gzip)
2005-09-09 18:10 UTC, Condor
Details
kdeinit strace output (272.36 KB, application/x-gzip)
2005-09-10 22:39 UTC, Condor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Condor 2005-09-07 08:37:26 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Slackware Packages
Compiler:          gcc-3.3.6 
OS:                Linux

I run dante socks and setup in /etc/ directory file socks.conf
{
   route from 0.0.0.0/0 to 0.0.0.0/0 via 192.168.11.101 port 5555
   protocol: tcp udp
   proxyprotocol: socks_v4 socks_v5
   method: none
}

192.168.11.101 is my socks server on different server.
In konqueror in settings -> Proxy -> socks and click enable socks and select dante.
In Proxy menu i select Connect to internet directly (may this is the right choice, i search in google but no any documentations found how what is the right choice).
I restart konqueror but konqueror does not run again, kcontrol also unable to run. No any error messages. I make strace output and i see:
open("/usr/lib/libsocks.so", O_RDONLY)  = 15
open("/etc/socks.conf", O_RDONLY)       = 15
read(15, "# $Id: socks.conf,v 1.28 2001/12"..., 8192) = 4604
open("/tmp/./sockslockXXXXFTsQfL", O_RDWR|O_CREAT|O_EXCL, 0600) = 16
unlink("/tmp/./sockslockXXXXFTsQfL")    = 0
File socks.conf is loaded normal, but in end of file last few lines is:
write(9, "\1\2\1\0\307\0\0\0\235\2\0\0", 12) = 12
write(9, "\0\0\0\20konqueror-16906\0\0\0\0\vDCOPServ"..., 110) = 110
write(9, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0EKBookmarkManager"..., 89) = 89
read(9, "\2\3\0\0021\0\0\0", 8)         = 8
read(9, "\235\2\0\0", 4)                = 4
read(9, "\0\0\0\vDCOPServer\0\0\0\0\20konqueror-169"..., 49) = 49
gettimeofday({1125994407, 508942}, NULL) = 0
gettimeofday({1125994407, 509000}, NULL) = 0
munmap(0xb750b000, 4096)                = 0
exit_group(1)                           = ?

Any body know what is the problem ?
Comment 1 Thiago Macieira 2005-09-07 21:55:34 UTC
Setting to Direct Connection was the right thing to do.
Comment 2 Condor 2005-09-08 16:43:56 UTC
Hm ... very interest, i resolve a problem with konqueror exit but i unable to make it to use socks. My socks.conf file only have:
route {
        from: 0.0.0.0/0   to: 0.0.0.0/0   via: 192.168.11.101 port = 5423
        proxyprotocol: socks_v5
}
192.168.11.101 is my socks server. My server are setuped to accept connection from my home pc, but i see in socks server that my home pc does not connect to socks server and in log of socks client have:

Sep  8 10:37:42 (1126165062) KDE[4784]: dante/client v1.1.17 running
Sep  8 10:37:42 (1126165062) KDE[4784]: Rconnect(): unsupported address family '1', fallback to system connect()

I check socks serve with mozilla and work fine but with konqueror does not.

Any solutions about this problem ?
Comment 3 Thiago Macieira 2005-09-08 16:51:10 UTC
That error message is expected and normal, since Konqueror and other KDE applications use and abuse Unix-domain sockets (which are family 1). But I really don't know what the problem could be.

Can you attach a full strace of a simple KDE program (kcontrol is ok)?
Comment 4 Condor 2005-09-09 18:10:23 UTC
Created attachment 12516 [details]
konqueror strace output
Comment 5 Thiago Macieira 2005-09-10 01:46:38 UTC
Comment on attachment 12516 [details]
konqueror strace output

Changing the MIME type for the attachment.
Comment 6 Thiago Macieira 2005-09-10 02:15:53 UTC
I don't see anything wrong with the trace you attached. According to it, Konqueror opened fine and browsed to a site on mit.edu. I can even see the webpage being retrieved in the trace.

So, what exactly happened in that trace that was wrong?

Also, can you try a simpler app than Konqueror?
Comment 7 Condor 2005-09-10 08:13:22 UTC
Can't work with socks. My pc does not connect to socks server and socks client log:
Sep  8 10:37:42 (1126165062) KDE[4784]: dante/client v1.1.17 running 
 Sep  8 10:37:42 (1126165062) KDE[4784]: Rconnect(): unsupported address family '1', fallback to system connect() 

 What program also support with socks in kde to try ?
Comment 8 Thiago Macieira 2005-09-10 15:42:37 UTC
Please describe "can't work with socks" a little better:

does Konqueror start?
can you interact with it?
can you type addresses in Konqueror?
does it look like it's going to a website?
does the website show?
can you close the application?

I need details to understand what is going wrong. In special, note that your strace shows that you DID go to a website, because a webpage was received. So, from what I can see, Konqueror is working and there's nothing wrong.
Comment 9 Condor 2005-09-10 18:45:47 UTC
Yes, Konqueror is started, can see pages and all, BUT DOES NOT WORK WITH SOCKS!
It's does not connect to socks server!
Dante client log say:
Sep  8 10:37:42 (1126165062) KDE[4784]: dante/client v1.1.17 running 
Sep  8 10:37:42 (1126165062) KDE[4784]: Rconnect(): unsupported address family '1', fallback to system connect()
So Konqueror  or KDE does not use right socks library. See:
Sep  8 10:37:42 (1126165062) KDE[4784]: dante/client v1.1.17 running 
Sep  8 10:37:42 (1126165062) KDE[4784]: Rconnect(): unsupported address family '1', fallback to system connect()
Dante clinet say that do not recive from KDE/Konqueror supported address family!
Comment 10 Thiago Macieira 2005-09-10 18:52:30 UTC
How have you configured socks? With socksify or did you configure it in KControl?
Comment 11 Condor 2005-09-10 19:53:13 UTC
Yes, i have configured dante socks server that work fine with mozilla and i make socks.conf in my /etc/ directory that contain:
$cat /etc/socks.conf
debug: 1
logoutput: /var/log/dante-client
route {
        from: 0.0.0.0/0   to: 0.0.0.0/0   via: 192.168.11.101 port = 5423
        proxyprotocol: socks_v5
}
And i configure my konqueror to use socks from kcontrol -> internet & network -> Proxy that i say: Direct connect and from socks menu click enable socks -> select dante and restart konqueror (test say socks is loaded sucessful). After restart of konqueror and my dante client log: 
Sep  8 10:37:42 (1126165062) KDE[4784]: dante/client v1.1.17 running 
 Sep  8 10:37:42 (1126165062) KDE[4784]: Rconnect(): unsupported address family '1', fallback to system connect() 
and konqueror going direct connect to site not to socks server. I have permissions to socks server and i see that my home pc does not connect to socks server.
Comment 12 Thiago Macieira 2005-09-10 20:00:42 UTC
Have you logged out and back in after making these changes?
Comment 13 Condor 2005-09-10 21:49:56 UTC
No, i exit from konqueror and start again. I have some terminals opened in X mode and i unable to restart my X server or KDE. Konqueror say that doed not needed to restart KDE, just to restart konqueror. I now remember that may be i tried to restart X server and kde and changes have no effect. Yes, i restarted kde and no effect with new settings. When i tried to open url dante client logged the same error:
Sep  8 10:37:42 (1126165062) KDE[4784]: dante/client v1.1.17 running 
  Sep  8 10:37:42 (1126165062) KDE[4784]: Rconnect(): unsupported address family '1', fallback to system connect() 
Comment 14 Thiago Macieira 2005-09-10 22:01:35 UTC
Please try this (and follow instructions precisely):

1. Open Konqueror
2. Open Konsole
3. Run in Konsole: killall kio_http
4. Run in Konsole: strace -f -t -s 1024 -o /tmp/kdeinit.trace kdeinit
5. Browse a site in the Konqueror window that was open
6. When the site finishes loading, go back to Konsole, quit strace and run: kdeinit
7. Attach the kdeinit.trace file here
Comment 15 Condor 2005-09-10 22:39:11 UTC
Created attachment 12522 [details]
kdeinit strace output
Comment 16 Condor 2005-09-10 22:44:47 UTC
I attach you strace output, the site that i tried to open (privacy.net) does not opened complete, i see dante client log that the same error has been logged.
Comment 17 Thiago Macieira 2005-09-10 23:43:14 UTC
Ok, now I understand. Your trace confirms what you said: the connection was direct, not through the SOCKS server.

Is there any chance you could test KDE 3.5 beta 1 (due to be out in a week)? I think I fixed a bug related to this recently.
Comment 18 Condor 2005-09-10 23:56:55 UTC
Ok, i will test it and will report you if bug is fixed or not.
Comment 19 Thiago Macieira 2005-12-02 22:38:30 UTC
Have you had a chance to test this?
Comment 20 Philip Rodrigues 2006-09-06 12:27:58 UTC
Does this problem still exist in KDE 3.5?
Comment 21 William Adams 2006-09-29 15:06:23 UTC
this is definitely happening in kde-3.5.1 in exactly the fashion described.
Comment 22 Michael Frank 2006-12-28 11:02:37 UTC
this is definitely happening in kde-3.5.5 in exactly the fashion described with dante-1.1.19 on gentoo.
Comment 23 FiNeX 2008-05-05 13:50:35 UTC
Please, could someone test how is working now with konqueror 3.5.9 and 4 ?
Comment 24 Thiago Macieira 2008-05-05 14:27:58 UTC
This does not apply to KDE 4 since SOCKS support was dropped.
Comment 25 FiNeX 2008-05-05 15:12:55 UTC
So we can close this? Or should we let it open for a future fix on 3.5 ?
Comment 26 Thiago Macieira 2008-05-05 17:09:05 UTC
Agreed.