9

Whenever I open some help within eclipse I get a page saying:

Server Error. The following error occurred: [code=CANT_CONNECT_LOOPBACK] Cannot connect due to potential loopback problems

I'm running Ubuntu 10.04.

Any ideas what this can be?

UPDATE Some commands outputs (some private info replaced):

$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:xx:xx:xx:xx:xx  
          inet addr:123.12.123.235  Bcast:123.12.456.255  Mask:255.255.254.0
          inet6 addr: fe80::xxx:eff:xxxx:xxxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1343040 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1133672 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:829265876 (829.2 MB)  TX bytes:242912202 (242.9 MB)
          Memory:f3200000-f3220000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:125 errors:0 dropped:0 overruns:0 frame:0
          TX packets:125 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:15910 (15.9 KB)  TX bytes:15910 (15.9 KB)

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
123.12.123.0    0.0.0.0         255.255.254.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
0.0.0.0         123.12.456.254  0.0.0.0         UG    0      0        0 eth0

$ sudo netstat -anp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      765/portmap     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      871/sshd        
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1181/cupsd      
tcp        0      0 0.0.0.0:52068           0.0.0.0:*               LISTEN      786/rpc.statd   
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1186/mysqld     
tcp        0      0 0.0.0.0:53709           0.0.0.0:*               LISTEN      -               
tcp        0      0 123.12.123.235:755      123.12.5.48:2049        ESTABLISHED -               
tcp        0      0 123.12.123.235:60793    123.12.5.129:8080       ESTABLISHED 2264/firefox-bin
tcp        0      0 123.12.123.235:57940    123.12.5.43:8080        ESTABLISHED 2264/firefox-bin
tcp        0      0 123.12.123.235:57928    123.12.5.43:8080        CLOSE_WAIT  2247/google-chrome
tcp        0      0 123.12.123.235:35767    123.12.5.129:8080       ESTABLISHED 2247/google-chrome
tcp        0      0 123.12.123.235:57930    123.12.5.43:8080        ESTABLISHED 2247/google-chrome
tcp        0      0 123.12.123.235:57931    123.12.5.43:8080        CLOSE_WAIT  2247/google-chrome
tcp6       0      0 :::80                   :::*                    LISTEN      1278/apache2    
tcp6       0      0 :::22                   :::*                    LISTEN      871/sshd        
tcp6       0      0 ::1:631                 :::*                    LISTEN      1181/cupsd      
tcp6       0      0 :::55934                :::*                    LISTEN      1956/eclipse    
tcp6       0      0 :::5900                 :::*                    LISTEN      1792/vino-server
udp        0      0 0.0.0.0:35631           0.0.0.0:*                           912/avahi-daemon: r
udp        0      0 0.0.0.0:962             0.0.0.0:*                           786/rpc.statd   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1575/dhclient   
udp        0      0 0.0.0.0:46149           0.0.0.0:*                           -               
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           912/avahi-daemon: r
udp        0      0 0.0.0.0:111             0.0.0.0:*                           765/portmap     
udp        0      0 0.0.0.0:36211           0.0.0.0:*                           786/rpc.statd   
udp        0      0 123.12.123.235:123      0.0.0.0:*                           1689/ntpd       
udp        0      0 127.0.0.1:123           0.0.0.0:*                           1689/ntpd       
udp        0      0 0.0.0.0:123             0.0.0.0:*                           1689/ntpd       
udp6       0      0 fe80::227:eff:fe07::123 :::*                                1689/ntpd       
udp6       0      0 ::1:123                 :::*                                1689/ntpd       
udp6       0      0 :::123                  :::*                                1689/ntpd       

Active UNIX domain sockets (servers and established) due to post size limit.

UPDATE 2 My proxy bypass settings: alt text

David B
  • 29,258
  • 50
  • 133
  • 186
  • I suggest posting output of `ifconfig -a`, `route -n`, `netstat -anp` (when Eclipse is running). One funny thing on Ubuntu (maybe it's elsewhere as well, the first I noticed it was on Ubuntu) is a loopback IP address for the 'hostname' in `/etc/hosts` -- e.g., `127.0.1.1 haig` on my system. I haven't got a clue why, but it feels funny to me. – sarnold Aug 13 '10 at 05:19
  • Starting a bounty for the second time now. Will this mystery be solved? – David B Sep 09 '10 at 15:13
  • Do you have any virtual machines installed on your system? – karlphillip Sep 16 '10 at 02:39

6 Answers6

3

I know this is a late answer, but I had the same problem and resolved it, so to tie up this one...

This is a combination of two bugs:

(i) Eclipse's internal help browser doesn't use the Eclipse proxy settings! See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=318969

(and the bugs referenced in comment #7 therein)

(ii) Ubuntu's proxy support is horribly broken in certain subtle ways. See: https://bugs.launchpad.net/ubuntu/+bug/300271

The fix/workaround is to manually set the no_proxy environment variable before running eclipse (as reported in the Eclipse #308035 bug referenced from the 318969 one) e.g.

export no_proxy=127.0.0.1,localhost
eclipse &

Help then launches correctly within Eclipse. Of course, once Eclipse is launched (thus running its own internal HTTP server), you can also access the local help manually from another browser (or, if within the 'can't access 127.0.0.1' screen, there's an icon at the top to launch in an external window --> default system browser).

This may well apply on other Linux distros using Gnome.

[Couldn't post the 308035 bug link because my low reputation means I can only post 2 hyperlinks :-( Getting excited at this privilege come 10 reputation points :-)]

Stuart Rossiter
  • 2,432
  • 1
  • 17
  • 20
2

Basically, this error means that Eclipse is failing to establish a TCP/IP connection to your localhost using 127.0.0.1 (Eclipse starts a server for the Help).

If you are using some specific proxy settings (either global at the OS level or local at the Eclipse level), double check that you are bypassing the proxy for localhost and 127.0.0.1.

If this doesn't help, try setting the hostname that help uses to localhost when starting eclipse (either on the command line or in the eclipse.ini):

eclipse -vmargs -Dserver_host=localhost
Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
  • I do have a proxy enabled on the system level. It is configured to bypass `localhost`, `127.0.0.0` and `127.0.0.1`. I also checked eclipse proxy settings (try all the different possibilities there), and also tried running with the command line args as suggested. In all the cases, nothing has changed. **P.s.** I'm running an apache server on, if this makes any difference. – David B Aug 08 '10 at 08:35
  • @David Maybe you get some port conflict then. Can you try with Apache stopped? – Pascal Thivent Aug 08 '10 at 10:30
  • @David I guess you disabled the proxy settings when you tried without apache started (just to be sure). If you did, I don't have any other suggestions for now. But I can tell you that the help works on my Ubuntu machine, there is definitely something related to your specific environment. – Pascal Thivent Aug 08 '10 at 12:32
  • That's so weired. What a bummer. – David B Aug 09 '10 at 07:01
0

Eclipse help is actually an HTTP server.

This is probably a permissions problem with your installation of Eclipse.

I have no suggestions except to check the permissions on your Eclipse folder, or delete and reinstall Eclipse.

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111
  • downloaded a fresh copy of Eclipse Classic 3.6.0 linux 32bit, extracted, set full permissions for all --> the same error. p.s. I can see the help content but whenever I try to click some item I get the error page. – David B Aug 03 '10 at 13:01
  • Did the same thing happen with Eclipse 3.5? – Gilbert Le Blanc Aug 03 '10 at 13:21
  • Wow. I'm sorry, but I'm out of ideas. In the mean time, you can access Eclipse help on the Internet. Eclipse 3.5 - http://help.eclipse.org/galileo/index.jsp Eclipse 3.6 - http://help.eclipse.org/helios/index.jsp At the time I'm typing this, the Eclipse 3.6 help link isn't working. – Gilbert Le Blanc Aug 03 '10 at 14:03
  • I actually don't want eclipse help for ecllipse itself, but for R (I use StatET as recommended here on another post), and since I'm new to R it's really helpful to have integrated help in eclipse. – David B Aug 04 '10 at 06:14
0

had the same problem recently installing and running Eclipse on 9.10. Found that the default settings for Eclipse were fine but 9.10 had no proxy bypass set for 127.0.0.1 in its system settings. Also had to install Apache2 via Synaptic. I installed Apache2, did not change any settings for Apache2 and then went System > Preferences > Network Proxy Preferences clicked on Ignored Hosts and added "127.0.0.1". Reset the Eclipse Network Preferences back to default, restarted Eclipse and help worked perfectly. Hope this works for others.

0

David, thanks for the netstat output; you'll notice that Eclipse is listening on an IPv6 port:

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp6 0 0 :::55934 :::* LISTEN 1956/eclipse

Is your proxy configuration set to bypass both 127.0.0.1 and ::1?

Community
  • 1
  • 1
sarnold
  • 102,305
  • 22
  • 181
  • 238
-1

Make sure your /etc/hosts file is properly done. Usually

  • if the line containing 127.0.0.1 has your host name remove it and just leave 'localhost'
  • if the opposite were true, try adding your hostname to it :)

such things happen because gnome is trying to match hostname and sockets to handle UI things. Might be worth asking on superuser..

lorenzog
  • 3,483
  • 4
  • 29
  • 50
  • I had `127.0.0.1 localhost`, changed it to `127.0.0.1 myhostname`. didn't solve the problem (or should I `source` something etc. before checking it out?) – David B Sep 16 '10 at 10:26
  • Are you sure about `myhostname`? Is that the hostname it shows on the command prompt? Also, don't remove localhost; instead, add to it. Also remove the other 127.* lines. – lorenzog Sep 16 '10 at 12:32