Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-748

Session lost after viewing device overview

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • None
    • Web Interface
    • None
    • CentOS 6.5 / PHP 5.3.3 / Observium 0.14.3.5109

    Description

      When viewing a particular host (but this issue is not exclusive to this host), in most of the cases, the various graphs on the device overview page show "No Auth" in a pink image. When this happens, the session is destroyed and i need to log in again. This doesn't happen all the time, but it does most of the time. See attached image.
      There's no indicator that it has to do with the limits specified in php.ini. There's no log entry in the error_log. The session just gets destroyed for no particular reason.

      Attachments

        1. is_graph-r5326.patch
          1.0 kB
        2. obs-noauth.png
          obs-noauth.png
          230 kB
        3. slm4996-php-i.txt
          21 kB

        Activity

          [OBS-748] Session lost after viewing device overview

          Looks fine by me after some extensive testing. Thanks!

          rbressers Remco Bressers added a comment - Looks fine by me after some extensive testing. Thanks!

          I have not seen it anymore

          maartenmoerman Maarten Moerman added a comment - I have not seen it anymore

          But this issue now fixed?

          landy Mike Stupalov added a comment - But this issue now fixed?

          oh dear, yes i believe I did. Sorry about that.

          slm4996 Solomon Seal added a comment - oh dear, yes i believe I did. Sorry about that.

          Solomon,
          I think you put that on the wrong JIRA Issue.

          moorereason Cameron Moore added a comment - Solomon, I think you put that on the wrong JIRA Issue.

          Mike,
          I'm attaching a patch to simplify is_graph(). Your original patch probably works for everyone, but I had to rewrite is_graph() because I run Observium in a subdirectory (yes, I know...unsupported config).

          Anyway, I'm able to set $lifetime_id = 10 with your changes, and I never see any No Auth images. Looks like the changes resolved the problem.

          moorereason Cameron Moore added a comment - Mike, I'm attaching a patch to simplify is_graph(). Your original patch probably works for everyone, but I had to rewrite is_graph() because I run Observium in a subdirectory (yes, I know...unsupported config). Anyway, I'm able to set $lifetime_id = 10 with your changes, and I never see any No Auth images. Looks like the changes resolved the problem.

          Mike, looks good (r5326).

          I haven't seen a "No auth" graph in the past 30 minutes of continuous paging around, and pages with lots of graphs like the processor health page no longer fail to load some of the graphs.

          slm4996 Solomon Seal added a comment - Mike, looks good (r5326). I haven't seen a "No auth" graph in the past 30 minutes of continuous paging around, and pages with lots of graphs like the processor health page no longer fail to load some of the graphs.

          Now should be finally fixed in r5323.
          Pls, test someone

          landy Mike Stupalov added a comment - Now should be finally fixed in r5323. Pls, test someone

          Mike,
          At line 28 of html/includes/authenticate.inc.php, you regenerate the Session ID every 20 seconds ($lifetime_id = 20).

          So, let's say you go to a Device Overview page, wait 18 seconds, and then click the Collectd tab (or any page that has many graphs that may take a few seconds to load). Any graphs that are requested after the remaining 2 seconds of our original session will fail with "No Auth" because the browser has already queued up the requests with the original Session ID.

          I was able to see this happening in FF with the Network developer tab (F12). Click on a GET request and then the Cookies tab to watch the cookies change.

          I ended up setting $lifetime_id = 43200 (12 hrs) since I figured my session could expire when I'm out of the office. Adam thought you may want to avoid generating new Session IDs when hitting graph.php, but I'll leave that to you guys.

          moorereason Cameron Moore added a comment - Mike, At line 28 of html/includes/authenticate.inc.php , you regenerate the Session ID every 20 seconds ( $lifetime_id = 20 ). So, let's say you go to a Device Overview page, wait 18 seconds, and then click the Collectd tab (or any page that has many graphs that may take a few seconds to load). Any graphs that are requested after the remaining 2 seconds of our original session will fail with "No Auth" because the browser has already queued up the requests with the original Session ID. I was able to see this happening in FF with the Network developer tab (F12). Click on a GET request and then the Cookies tab to watch the cookies change. I ended up setting $lifetime_id = 43200 (12 hrs) since I figured my session could expire when I'm out of the office. Adam thought you may want to avoid generating new Session IDs when hitting graph.php, but I'll leave that to you guys.

          Hi Mike,
          I just upgraded to latest (5277) and will keep an eye open for this issue. Please keep the ticket open for a few more days.
          Thanks!

          rbressers Remco Bressers added a comment - Hi Mike, I just upgraded to latest (5277) and will keep an eye open for this issue. Please keep the ticket open for a few more days. Thanks!

          People

            landy Mike Stupalov
            rbressers Remco Bressers
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: