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

Too many periodic requests to Crowd server

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: crowd2-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.480.2
      Crowd2 plugin 1.5
      Crowd 2.5.3
    • Similar Issues:

      Description

      The logfile of Crowd contain lots of periodic requests coming from Jenkins. They occur every 5 seconds and are always the same. The following snippet from the log file shows the requests while one user (foo) is logged into Jenkins.

      127.0.0.1 - - [08/Feb/2013:14:09:41 +0100] "POST /rest/usermanagement/1/session/fZ2pVLxOteqInIc0VYr0tQ00 HTTP/1.1" 200 346
      127.0.0.1 - - [08/Feb/2013:14:09:41 +0100] "POST /rest/usermanagement/1/session/fZ2pVLxOteqInIc0VYr0tQ00 HTTP/1.1" 200 346
      127.0.0.1 - - [08/Feb/2013:14:09:41 +0100] "GET /rest/usermanagement/1/session/fZ2pVLxOteqInIc0VYr0tQ00?expand=user HTTP/1.1" 200 752
      127.0.0.1 - - [08/Feb/2013:14:09:41 +0100] "GET /rest/usermanagement/1/session/fZ2pVLxOteqInIc0VYr0tQ00?expand=user HTTP/1.1" 200 752
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/group?groupname=jenkins-users HTTP/1.1" 200 381
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/group?groupname=jenkins-users HTTP/1.1" 200 381
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/group/user/direct?groupname=jenkins-users&username=foo HTTP/1.1" 404 129
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/group/user/direct?groupname=jenkins-users&username=foo HTTP/1.1" 404 129
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/group/user/nested?groupname=jenkins-users&username=foo HTTP/1.1" 200 173
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/group/user/nested?groupname=jenkins-users&username=foo HTTP/1.1" 200 173
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/user/group/direct?username=foo&start-index=0&max-results=500&expand=group HTTP/1.1" 200 987
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/user/group/direct?username=foo&start-index=0&max-results=500&expand=group HTTP/1.1" 200 987
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/user/group/direct?username=foo&start-index=500&max-results=500&expand=group HTTP/1.1" 200 79
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/user/group/direct?username=foo&start-index=500&max-results=500&expand=group HTTP/1.1" 200 79
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/user/group/nested?username=foo&start-index=0&max-results=500&expand=group HTTP/1.1" 200 4374
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/user/group/nested?username=foo&start-index=0&max-results=500&expand=group HTTP/1.1" 200 4374
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/user/group/nested?username=foo&start-index=500&max-results=500&expand=group HTTP/1.1" 200 79
      127.0.0.1 - - [08/Feb/2013:14:09:42 +0100] "GET /rest/usermanagement/1/user/group/nested?username=foo&start-index=500&max-results=500&expand=group HTTP/1.1" 200 79
      
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "POST /rest/usermanagement/1/session/fZ2pVLxOteqInIc0VYr0tQ00 HTTP/1.1" 200 346
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "POST /rest/usermanagement/1/session/fZ2pVLxOteqInIc0VYr0tQ00 HTTP/1.1" 200 346
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "GET /rest/usermanagement/1/session/fZ2pVLxOteqInIc0VYr0tQ00?expand=user HTTP/1.1" 200 752
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "GET /rest/usermanagement/1/session/fZ2pVLxOteqInIc0VYr0tQ00?expand=user HTTP/1.1" 200 752
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "GET /rest/usermanagement/1/group?groupname=jenkins-users HTTP/1.1" 200 381
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "GET /rest/usermanagement/1/group?groupname=jenkins-users HTTP/1.1" 200 381
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "GET /rest/usermanagement/1/group/user/direct?groupname=jenkins-users&username=foo HTTP/1.1" 404 129
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "GET /rest/usermanagement/1/group/user/direct?groupname=jenkins-users&username=foo HTTP/1.1" 404 129
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "GET /rest/usermanagement/1/group/user/nested?groupname=jenkins-users&username=foo HTTP/1.1" 200 173
      127.0.0.1 - - [08/Feb/2013:14:09:47 +0100] "GET /rest/usermanagement/1/group/user/nested?groupname=jenkins-users&username=foo HTTP/1.1" 200 173
      127.0.0.1 - - [08/Feb/2013:14:09:48 +0100] "GET /rest/usermanagement/1/user/group/direct?username=foo&start-index=0&max-results=500&expand=group HTTP/1.1" 200 987
      127.0.0.1 - - [08/Feb/2013:14:09:48 +0100] "GET /rest/usermanagement/1/user/group/direct?username=foo&start-index=0&max-results=500&expand=group HTTP/1.1" 200 987
      127.0.0.1 - - [08/Feb/2013:14:09:48 +0100] "GET /rest/usermanagement/1/user/group/direct?username=foo&start-index=500&max-results=500&expand=group HTTP/1.1" 200 79
      127.0.0.1 - - [08/Feb/2013:14:09:48 +0100] "GET /rest/usermanagement/1/user/group/direct?username=foo&start-index=500&max-results=500&expand=group HTTP/1.1" 200 79
      127.0.0.1 - - [08/Feb/2013:14:09:48 +0100] "GET /rest/usermanagement/1/user/group/nested?username=foo&start-index=0&max-results=500&expand=group HTTP/1.1" 200 4374
      127.0.0.1 - - [08/Feb/2013:14:09:48 +0100] "GET /rest/usermanagement/1/user/group/nested?username=foo&start-index=0&max-results=500&expand=group HTTP/1.1" 200 4374
      127.0.0.1 - - [08/Feb/2013:14:09:48 +0100] "GET /rest/usermanagement/1/user/group/nested?username=foo&start-index=500&max-results=500&expand=group HTTP/1.1" 200 79
      127.0.0.1 - - [08/Feb/2013:14:09:48 +0100] "GET /rest/usermanagement/1/user/group/nested?username=foo&start-index=500&max-results=500&expand=group HTTP/1.1" 200 79
      

      The "Session validation interval" in the Crowd2 configuration is set to 10 (minutes?). Well, the configuration form always reverts back to 2 which seems to be a bug. However, the config.xml contains the correct value of 10.

      Anyway, for some reason this value seems to be ignored completely.

        Attachments

        1. crowd2.hpi
          2.99 MB
        2. crowd2.hpi
          1.59 MB
        3. jenkins.log
          86 kB

          Issue Links

            Activity

            gertschi Gerhard Schlager created issue -
            rzanner rzanner made changes -
            Field Original Value New Value
            Attachment jenkins.log [ 23758 ]
            integer Kanstantsin Shautsou made changes -
            Link This issue duplicates JENKINS-18791 [ JENKINS-18791 ]
            integer Kanstantsin Shautsou made changes -
            Assignee Thorsten Heit [ t_heit ] Kanstantsin Shautsou [ integer ]
            aheritier Arnaud Héritier made changes -
            Assignee Kanstantsin Shautsou [ integer ] Arnaud Héritier [ aheritier ]
            aheritier Arnaud Héritier made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            aheritier Arnaud Héritier made changes -
            Attachment crowd2.hpi [ 29103 ]
            integer Kanstantsin Shautsou made changes -
            Link This issue depends on JENKINS-17957 [ JENKINS-17957 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 147527 ] JNJira + In-Review [ 185445 ]
            vbier vbier made changes -
            Attachment CrowdRememberMeServices.java [ 34754 ]
            vbier vbier made changes -
            Attachment CrowdRememberMeServices.java [ 34754 ]
            vbier vbier made changes -
            Comment [ The problem seems to be that the method CrowdRememberMeServices.autoLogin is called lots of times for a single request and does perform authorization with crowd every single time. On my instance, this lead to > 50 crowd calls for the main jenkins job page. I have changed the code so that autoLogin does now do the work in a callable. Subsequent invocations do reuse the callable so that crowd is contacted only one time per request. This makes crowd absolutely usable on my instance without adding any caching mechanism whatsoever. I have attached the changed class. ]
            aheritier Arnaud Héritier made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            aheritier Arnaud Héritier made changes -
            Attachment crowd2.hpi [ 40638 ]
            oleg_nenashev Oleg Nenashev made changes -
            Assignee Arnaud Héritier [ aheritier ]
            pingunaut Martin Spielmann made changes -
            Assignee Martin Spielmann [ pingunaut ]
            pingunaut Martin Spielmann made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            pingunaut Martin Spielmann made changes -
            Released As https://github.com/jenkinsci/crowd2-plugin/releases/tag/crowd2-2.0.0
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            pingunaut Martin Spielmann made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              Assignee:
              pingunaut Martin Spielmann
              Reporter:
              gertschi Gerhard Schlager
              Votes:
              13 Vote for this issue
              Watchers:
              25 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: