Bug 188521 - [Webapp] Test F1: 2) Standalone infocenter not accessible through browser
Summary: [Webapp] Test F1: 2) Standalone infocenter not accessible through browser
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 3.3 RC2   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-05-22 20:12 EDT by Mike Pawlowski CLA
Modified: 2007-06-11 09:50 EDT (History)
1 user (show)

See Also:
cgold: review? (mike.pawlowski)
curtispd: review+


Attachments
Patch (1.45 KB, patch)
2007-05-23 13:58 EDT, Chris Goldthorpe CLA
mike.pawlowski: review+
Details | Diff
reverted patch changes further (1.40 KB, patch)
2007-05-23 15:09 EDT, Adam Archer CLA
no flags Details | Diff
same as previous (1.40 KB, patch)
2007-05-23 15:11 EDT, Adam Archer CLA
mike.pawlowski: review-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Pawlowski CLA 2007-05-22 20:12:59 EDT
Tried using Firefox and Safari.

Get the following error message on Firefox:

Unable to connect
Firefox can't establish a connection to the server at localhost:8888

Plain "localhost" will open up a VNC login page (assuming default port 80) - do 
not know if this is interfering with the infocenter.

I'm confident the infocenter server was actually started okay through the 
commandline because I am able to shut it down fine using the commandline.
Comment 1 Chris Goldthorpe CLA 2007-05-22 20:39:27 EDT
I think that the instructions in the test may be incorrect, the test asks you to open http://localhost:8888/help - I found that I had to enter http://localhost:8888/help/index.jsp . Can you see if theis works and if so I'll update the test description.
Comment 2 Mike Pawlowski CLA 2007-05-22 20:47:02 EDT
Unfortunately, http://localhost:8888/help/index.jsp did not work for me either.  I got the same error message
Comment 3 Adam Archer CLA 2007-05-23 10:37:22 EDT
This is not Mac OS specific. I've reproduced on Linux and Windows.

The problem is that the "-port <port #>" command is being ignored. If you open the ".metadata\.connection" file in the infocenter workspace ("d:\eclipse\infocenter\.metadata\.connection" for the command listed in the test plan) it has a line indicating the port that is in use ("port=<port #>"). This appears to be a random port assigned as usual and does not match the port supplied on the command line.
Comment 4 Chris Goldthorpe CLA 2007-05-23 13:02:26 EDT
This is a regression which happened last week. The reason I didn't detect it is that I ran the infocenter tests on the build from May 15th, the same day that it was introduced. It appears that the regression was caused by the patch submitted by Simon Kaegi attached to Bug 184537. Using I20070515-0800 I observed the following.

I20070515-0800 - Webapp works
I20070515-0800 + org.eclipse.help.base - Webapp fails  
I20070515-0800 + org.eclipse.help.base v20070426 - Webapp works
I20070515-0800 + org.eclipse.help.base v20070426 + proposed patch from Bug 184537 - Webapp fails
I20070515-0800 + org.eclipse.help.base v20070426 + patch [1] from Bug 184537 - Webapp works
I20070515-0800 + org.eclipse.help.base v20070426 + patch [2] from Bug 184537 - Webapp works
I20070515-0800 + org.eclipse.help.base v20070426 + patch [3] from Bug 184537 - Webapp works

Adam, can you figure out what it is about this patch that caused the Webapp to fail and see if you can fix it?
Comment 5 Chris Goldthorpe CLA 2007-05-23 13:58:03 EDT
Created attachment 68396 [details]
Patch

The problem was caused the the option server_port being renamed to org.eclipse.help.server_port. The lowest risk path to fixing this is to set the name back to what it used to be which is what I have done.
Comment 6 Chris Goldthorpe CLA 2007-05-23 14:02:40 EDT
Requesting review for RC2
Comment 7 Adam Archer CLA 2007-05-23 14:54:13 EDT
The patch does not seem to work on Windows. A random port number is still being assigned. There must be another change that needs to be made.
Comment 8 Adam Archer CLA 2007-05-23 15:09:40 EDT
Created attachment 68425 [details]
reverted patch changes further

Before the patch we were using:

System.getProperty("server_port");

as opposed to:

HelpBasePlugin.getBundleContext().getProperty("server_port");

The "-port" argument results in "-Dserver_port" getting set on the call to launch eclipse. Thus, the port is supplied as a jvm argument and must be retreived using System.getProperty("server_port").

I'm about to test to confirm.
Comment 9 Adam Archer CLA 2007-05-23 15:11:40 EDT
Created attachment 68426 [details]
same as previous

There was a sloppy mistake in the last one. Sorry.
Comment 10 Mike Pawlowski CLA 2007-05-23 15:24:18 EDT
Comment on attachment 68426 [details]
same as previous

Unfortunately, this patch did not work for me (same error) on Mac.  

Essentially what I'm doing is checking out the latest org.eclipse.help.base source from HEAD, applying the patch to it , and then exporting that plugin back into the eclipse plugins directory.  From there I  successfully start the standalone infocenter server through the commandline
Comment 11 Adam Archer CLA 2007-05-23 15:58:42 EDT
False alarm. Chris' patch is good.

It seems that even if your classpath is pointed explicitly at the modified org.eclipse.help.base.*.jar you will run into problems (on Windows) if you have other copies of the jar in the plugins directory for the specified eclipsehome.

To test the patch you not only need to export the new jar to your plugins directory and point to it with your command line argument, but you also need to remove other copies of the jar from the plugins directory.
Comment 12 Mike Pawlowski CLA 2007-05-23 16:17:27 EDT
Comment on attachment 68396 [details]
Patch

Works well on Mac.  http://localhost:8888/help/index.jsp worked for me.  Have to specify 'index.jsp' otherwise you get a proxy error.  Adam was bang on regarding the need to remove the old version of the plug-in.  As soon as I did that it worked.
Comment 13 Chris Goldthorpe CLA 2007-05-23 16:30:42 EDT
Fixed for 3.3 RC2
Comment 14 Adam Archer CLA 2007-06-11 09:50:33 EDT
Verified in I20070608-1718.