6

Why might my Jython Interactive Console fail to be created when called in Eclipse?

Following the 'Using Jython in an IDE' instructions in the Jython manual (http://www.jython.org/jythonbook/en/1.0/JythonIDE.html) I have reached just before 'Listing 11-10' in the Testing section, specifically:

First, click the right-most button on the console’s toolbar (you will recognize it as the one with a plus sign on its upper left-hand corner, which has the Open Console tip when you pass the mouse over it). From the menu, select PyDev Console. To the next dialog, answer Jython Console. After doing this you will get an interactive interpreter embedded on the IDE

I select 'Open Console' -> 'PyDev Console' -> 'Jython Console' -> 'OK'. The 'Create Interactive Console' dialog appears and then either:

  1. Gets about 1/10th complete and stops (I left it overnight and it hadn't progressed in the morning)
  2. Finishes and fails with the error message:

Error initializing console. Unexpected error connecting to console. Failed to recive suitable Hello response from pydevconsole. Last msg received: HTTP server returned unexpected status: null

My setup:

  • Operating System: Windows XP
  • Eclipse: Kepler Service Release 1
  • Jython: 2.5.2
  • PyDev: 3.0.0.201311051910
user1472525
  • 263
  • 1
  • 2
  • 11

2 Answers2

11

This error occured due to badly configured proxy settings, specifically the proxy exceptions did not include 'localhost' and '127.0.0.1'. This resulted in requests from Eclipse to itself through localhost being diverted through the proxy, which neither the proxy nor Eclipse were happy with.

The solution (in Windows XP) was to open Internet Options -> Connections (tab) -> LAN Settings -> Advanced, and then add localhost;127.0.0.1; to the beginning of the Exceptions list.

user1472525
  • 263
  • 1
  • 2
  • 11
0

I think this was an issue on PyDev. Can you please check the latest nightly build (see http://pydev.org/download.html for details on how to get it) and see if it works for you?

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78
  • I have installed PyDev version 3.1.0.201312101208 from http://pydev.org/nightly using Eclipse's Install wizard. It now only progresses 3%... – user1472525 Dec 10 '13 at 13:03
  • I've checked it here and couldn't find how to reproduce that error... One thing that came to mind: do you have some firewall which may be preventing communication from java to the python shell? – Fabio Zadrozny Dec 10 '13 at 15:41
  • I am working within an office intranet, so this is certainly a possibility. I will check once I am back in the office. I had no idea that different parts of Eclipse communicated with each other via 127.0.0.1 - perhaps I just didn't read the install and setup info carefully enough. Either way, I'll report back once I check out the firewall. – user1472525 Dec 10 '13 at 17:07
  • 1
    In this case, PyDev is spawning a console and communicating with 127.0.0.1, so, a firewall *could* be an issue here. – Fabio Zadrozny Dec 10 '13 at 19:00
  • So, Window -> Preferences -> General -> Network Connections is set to Native, which allows my to update and install new software onto Eclipse from remote sites (e.g. http://pydev.org/nightly). However Native does not include '127.0.0.1' or 'localhost'. If I switch to 'Native' then I can open the Interactive Console but I can no longer retrieve updates, etc, because I am not longer using the proxy at all. My next challenge is to update Native such that it includes 127.0.0.1 and localhost in its proxy bypass list, which is something I will investigate now. – user1472525 Dec 12 '13 at 13:33
  • I don't want to mark your answer as correct because it is this ensuing conversation that has resolved the issue, not the original answer. However, I also don't want to deprive you of the reputation you deserve from helping me and leave other readers thinking that this is not resolved, because it is. What is the protocol here? – user1472525 Dec 12 '13 at 13:36
  • Well, for me it's fine if you add your own answer saying that this was a proxy issue in the way that Eclipse was configured locally and add the proper details in your own answer (as I really didn't think about a proxy there, just pointed that it might be a problem in the network communicating with 127.0.0.1) -- on my side I'll probably add a note to the PyDev FAQ (p.s.: don't worry about the reputation). – Fabio Zadrozny Dec 12 '13 at 16:58