Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16991

Access to some YUI resources lost after renaming my site

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • jswidgets-plugin
    • None
    • Ubuntu 10.0.4 LTS

      After renaming my site from "ci.example.com" to "ci.example.net" (both at Apache and Jenkins config), JavaScript console from clients states the following errors and don't execute any subsequent ajax request,

      Uncaught ReferenceError: crumb is not defined (program):8
      Uncaught ReferenceError: YAHOO is not defined (program):9
      Uncaught ReferenceError: createSearchBox is not defined (program):10
      2 Uncaught ReferenceError: refreshPart is not defined (program):28
      Uncaught TypeError: Object has no method 'insertBefore' ci.example.net:122

      To rename the site I've changed my Apache site config to match the following and also renamed "ci.example.com" to "ci.example.net" from Jenkins admin menu,

      <VirtualHost *:80>
      ServerAdmin webmaster@example.com
      ServerName ci.example.net
      ServerAlias ci.example.com
      ServerAlias ci
      ProxyRequests Off
      <Proxy *>
      Order deny,allow
      Allow from all
      </Proxy>
      ProxyPreserveHost on
      ProxyPass / http://localhost:9000/
      </VirtualHost>

      The error dissapears when accesing the site back with ci.example.com name (still an Alias in Apache), with no need to reconfigure the site (Apache or Jenkins).

      I've checked new domain name is correctly specified in .xml config files,

      hudson.tasks.Mailer.xml: <hudsonUrl>http://ci.example.net/</hudsonUrl>
      jenkins.model.JenkinsLocationConfiguration.xml: <jenkinsUrl>http://ci.example.net/</jenkinsUrl>

      I've tried to clear the webapp cache with,

      sudo service jenkins stop
      sudo mv /var/cache/jenkins/war /var/cache/jenkins/war.old
      sudo service jenkins start

      but this doesn't solve the issue.

      Many, many thanks in advance.-

          [JENKINS-16991] Access to some YUI resources lost after renaming my site

          Hello Agustin,

          probably some of the javascripts needed could not be loaded. Before I can do anything (that's why I did set this to "Cannot Reproduce" ) you have to answer a few questions

          Best Regards
          Mirko

          Mirko Friedenhagen added a comment - Hello Agustin, probably some of the javascripts needed could not be loaded. Before I can do anything (that's why I did set this to "Cannot Reproduce" ) you have to answer a few questions Which URL(s) are you invoking? Do you have the jswidgets plugin installed (Example output http://huschteguzzel.de/hudson/job/jenkinsci-jswidgets-plugin/jswidgets/)? Are you sure this is jswidgets related? Best Regards Mirko

          Hi Mirko,

          It's a pleasure to meet you and having such fast assistance.

          This happens to me almost in any jenkins.war page, whenever the URL takes to a page that uses the (unknown name for me) Ajax library that keeps the page live-synced (to refresh jobs status) and lets you launch context menu operations (like launching a job).

          I mean, my configuration works properly when accessed through http://ci.example.com, http://ci.example.com/jobs/myJob (Ajax library is working)... but when I configure Apache and Jenkins to use the new site name "example.net", then Ajax library seems to not be working: JavaScript errors above (crumb is not defined, YAHOO is not defined, ... ) appear in the browser console and browser doesn't request http://ci.example.net/ajax*, http://ci.example.net/jobs/myJob/ajax*...

          I'm sorry to have choosen jswidgets when classifiying this issue; I didn't find the subsystem that provides this Ajax library (unkwnown for me) and arbitrarily selected jswidgets. We have not jswidgets installed.

          About [...] probably some of the javascripts needed could not be loaded [...], I've checklisted that every HTTP request when accessing http://ci.example.com (working) is also made when accessing http://ci.example.net and correctly ends with HTTP 200. I mean, there's no HTTP 404 or unrequested URL when accesing the renamed site. To be clear, I've tested this after removing any temporary files at the browser.

          Best regards.-

          Agustín Moretón added a comment - Hi Mirko, It's a pleasure to meet you and having such fast assistance. This happens to me almost in any jenkins.war page, whenever the URL takes to a page that uses the (unknown name for me) Ajax library that keeps the page live-synced (to refresh jobs status) and lets you launch context menu operations (like launching a job). I mean, my configuration works properly when accessed through http://ci.example.com , http://ci.example.com/jobs/myJob (Ajax library is working)... but when I configure Apache and Jenkins to use the new site name "example.net", then Ajax library seems to not be working: JavaScript errors above (crumb is not defined, YAHOO is not defined, ... ) appear in the browser console and browser doesn't request http://ci.example.net/ajax* , http://ci.example.net/jobs/myJob/ajax* ... I'm sorry to have choosen jswidgets when classifiying this issue; I didn't find the subsystem that provides this Ajax library (unkwnown for me) and arbitrarily selected jswidgets. We have not jswidgets installed. About [...] probably some of the javascripts needed could not be loaded [...] , I've checklisted that every HTTP request when accessing http://ci.example.com (working) is also made when accessing http://ci.example.net and correctly ends with HTTP 200. I mean, there's no HTTP 404 or unrequested URL when accesing the renamed site. To be clear, I've tested this after removing any temporary files at the browser. Best regards.-

          Mirko Friedenhagen added a comment - - edited

          Hello Agustin,

          I am afraid this is more of a problem with your setup (Jenkins behind Apache). I can not really help you here and moving the issue to component core would probably not really help either so I would like to close the issue.

          I would suggest you tell about your setup and problems on the Jenkins-Userlist. At least you will get a lot more attention there and a lot more readers than on this ticket .

          You should be very specific, take a look at https://wiki.jenkins-ci.org/display/JENKINS/Issue+Tracking#IssueTracking-Whattoputinthedescriptionofanissuereport%3F and try to give all the facts you know in your mail.

          Best Regards
          Mirko

          Mirko Friedenhagen added a comment - - edited Hello Agustin, I am afraid this is more of a problem with your setup (Jenkins behind Apache). I can not really help you here and moving the issue to component core would probably not really help either so I would like to close the issue. I would suggest you tell about your setup and problems on the Jenkins-Userlist . At least you will get a lot more attention there and a lot more readers than on this ticket . You should be very specific, take a look at https://wiki.jenkins-ci.org/display/JENKINS/Issue+Tracking#IssueTracking-Whattoputinthedescriptionofanissuereport%3F and try to give all the facts you know in your mail. Best Regards Mirko

          This is probably a Apache/Tomcat issue.

          Mirko Friedenhagen added a comment - This is probably a Apache/Tomcat issue.

            mfriedenhagen Mirko Friedenhagen
            amoreton Agustín Moretón
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: