Uploaded image for project: 'BrownDog'
  1. BrownDog
  2. BD-1222

Polling in Clowder tests resulting in HTTP 404 errors

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Clowder
    • None

      Recently messages like the one below started showing up in the DTS logs.

      OSSEC HIDS Notification.
      2016 Sep 08 12:27:25

      Received From: (dts) any->/var/log/apache2/error.log
      Rule: 31412 fired (level 5) -> "PHP internal error (missing file)."
      Portion of the log(s):

      [Thu Sep 08 12:27:25 2016] [error] [client 141.142.60.37] PHP Warning: file_get_contents(http://dts.ncsa.illinois.edu:9000/api/extractions//status): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found\r\n in /var/www/dts/extract.php on line 29
      --END OF NOTIFICATION

      • There is a while loop in vat/www/dts/tests.py that may need to be changed.

      #Poll until output is ready (optional)
              while wait > 0:
                      status = requests.get('http://' + host + ':' + port + '/api/extractions/' + file_id + '/status?key=' + key).json()
                      if status['Status'] == 'Done': break
                      time.sleep(1)
                      wait -= 1

              Unassigned Unassigned
              sandeeps Sandeep Puthanveetil Satheesan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: