This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 165067 - localhost:38800 is used instead of the actual hostname:port for jobs in hudson view
Summary: localhost:38800 is used instead of the actual hostname:port for jobs in hudso...
Status: RESOLVED INVALID
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Hudson (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 165735
Blocks:
  Show dependency tree
 
Reported: 2009-05-13 13:42 UTC by japod
Modified: 2009-05-21 20:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description japod 2009-05-13 13:42:58 UTC
After adding http://hudson.sfbay.sun.com/view/jersey/ as a new hudson node,
individual jobs have wrong urls associated with them.
e.g. instead of http://hudson.sfbay.sun.com/job/Jersey/ i see
http://localhost:38800/job/Jersey/ so that also the [open in browser] feature fails

tested with latest daily build of NB6.7 (tagged as 20090512001)
Comment 1 Jesse Glick 2009-05-14 05:34:51 UTC
First of all, you probably wanted to add the actual Hudson root:

http://hudson.sfbay.sun.com/

You can switch to a particular view using the context menu if you wish. It seems to work to add the view URL directly
but this should certainly not be considered supported.

It seems that Hudson sends the X-Hudson header not only when serving its root page, but also the root pages of views,
and this is all NB knows how to check. CCing Kohsuke; main/core/src/main/resources/hudson/model/View/index.jelly says

<st:header name="X-Hudson" value="${servletContext.getAttribute('version')}"/>

and this is active whether or not it.class.name=='hudson.model.AllView'. Not sure if that is intentional.


As to the URL problem, this is due to the Hudson instance being misconfigured. For example,

http://hudson.sfbay.sun.com/api/xml

shows e.g.

<url>http://localhost:38800/job/A_OpenSolaris_WebStack/</url>

whereas of course this should be

<url>http://hudson.sfbay.sun.com/job/A_OpenSolaris_WebStack/</url>

I am not sure offhand where the problem lies, since

http://hudson.sfbay.sun.com/configure

does specify http://hudson.sfbay/ as Hudson URL under E-mail Notification; perhaps this is getting overridden by some
other information not visible in the master configuration. Again Kohsuke would likely know.
Comment 2 kohsuke 2009-05-14 17:28:47 UTC
Hudson 1.306 will contain a fix for excessive X-Hudson header problem.

In addition, I wonder if Hudson should send out something like X-Hudson-RootURL: <HudsonTopPageURL> on every page, so
that users can pass in a potentially wrong URL like http://hudson.sfbay.sun.com/view/jersey/ and still allow the NB
plugin to auto-correct it to the right address.

Investigating the http://localhost:38800/ problem now, but I wonder why I was able to use it, then...
Comment 3 kohsuke 2009-05-14 17:37:00 UTC
OK, the incorrect URL problem is also fixed in 1.306. The deployment of this to hudson.sfbay is May 20th.
This was caused by the use of reverse proxy.