Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server that is extremely slow (takes 3-5 minutes) at starting X11 applications over a forwarded X11 link. I have tried connecting to it with 2-3 different machines with different operating systems. After the applications start everything seems to be fine. I am connecting using trusted X11 forwarding (ssh -Y) and using cert based authentication (not that that should matter).

The operating system is Gentoo Linux on amd64. None of the applications give any messages related to the X environment (one shows nothing, another just a standard welcome message and the last an error message about a resource being in use (which the window that finally popped up told me about as well).

As per Bertera's suggestion I ran with the -v option. It doesn't print anything until the window shows up when it prints:

debug1: client_input_channel_open: ctype x11 rchan 3 win 87380 max 16384
debug1: client_request_x11: request from 127.0.0.1 43716
debug1: channel 1: new [x11]
debug1: confirm x11

Also, I have tested ssh port forwarding and it is extremely slow as well (and I'm guessing this could be the problem with the X11 forwarding).

share|improve this question
    
check if your IP address is known in all the servers. Check the logs, you will maybe see an IP instead of a FQDN. –  Dom Mar 22 '13 at 8:08
    
maybe a DNS issue ? try to use -v option to see where ssh stuck. –  Bertera Mar 22 '13 at 8:35
    
I'm unclear how DNS could be related to this. In any case, if I connect to the IP instead of the FQDN it still takes a really long time. As for using the -v option, nothing is printed out at the point that it gets stuck. –  CrazyCasta Mar 22 '13 at 14:36
    
P.S. Just to be clear, it's not the ssh connection that is taking forever, it's the starting of an application after having connected. –  CrazyCasta Mar 22 '13 at 14:59
    
To troubleshoot you could run tcpdump on the xserver, filtering for traffic from the client. If there is no traffic then something is happening on the client. If there is a large amount of traffic it may be the X protocol being chatty. I believe for modern apps the client renders the decorations and will have to be initially transmitted as bitmaps to the server, which caches them thereafter. –  Mark Wagner Mar 22 '13 at 18:51

1 Answer 1

Problem is that ssh does things on the loopback with ipv6 and I had ip6tables setup to drop all traffic. Just did the following and it works now:

ip6tables -A INPUT -i lo -j ACCEPT
ip6tables -A OUTPUT -o lo -j ACCEPT
ip6tables -A FORWARD -i lo -o lo -j ACCEPT

Thanks to ezakimak on #gentoo for pointing out the ipv6 angle.

share|improve this answer
    
Of course. localhost is an IPv6 address by default, and port forwards connect/bind to/from localhost on the remote system. –  Michael Hampton Mar 22 '13 at 19:09
    
No, it all depends on how the listener is listening. On my machine localhost is 127.0.0.1, but because ssh is listening on an IPv6 socket it uses the IPv6 version of that. –  CrazyCasta Mar 24 '13 at 23:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.