1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Changed the deferred.php stuff and now hundreds of server errors

Discussion in 'Troubleshooting and Problems' started by Stuart Wright, Jan 22, 2015.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    I had this in our cron:
    * * * * * /home/sites/avforums/public_html/deferred.php > /dev/null 2>&1
    then installed this addon:
    https://xenforo.com/community/resources/goodfornothing-shell-defer.3791/
    And changed the cron accordingly and started getting server errors like this one below.
    So I reverted back and uninstalled the addon but now I'm still getting the errors.
    About 600 errors every half an hour. E.g.
    Does anyone know what on earth is going on?
    Thanks
     
    Last edited: Jan 22, 2015
  2. Daniel Hood

    Daniel Hood Well-Known Member

    Are they all the same error?
     
  3. Stuart Wright

    Stuart Wright Well-Known Member

  4. Daniel Hood

    Daniel Hood Well-Known Member

    But they're all connected to ElasticSearch? Interesting.. Might need to restart the ES server (I'm not an expert on it though, so don't do it till someone else confirms). I think XenForo Devs may want to consider adding some Exception catching here.
     
  5. Stuart Wright

    Stuart Wright Well-Known Member

    Even when I remove the cron and restore the standard call in page_container, it's the same. About 600 errors every half an hour.
     
  6. Xon

    Xon Well-Known Member

    @Stuart Wright Since you ran it as root, make sure you reset file permissions so they are owned by the correct user the website runs as.

    The deferred task itself may be screwed up, had have bad data persisted to the xf_deferred table. This may require purging from the DB. You can then restart off the failed indexing per normal.

    But looking at that XF Elastic Search code, it is bizarre that it failed there. That is parsing the results from Elastic Search.

    Can you check your elastic search instance's logs?
     
    SneakyDave likes this.
  7. Stuart Wright

    Stuart Wright Well-Known Member

    I can't, but I've asked Tim to.
     
  8. HWS

    HWS Well-Known Member

    You need to chown all files and folders in /data and /internal_data to your web server user if you ran deferred.php as root to prevent future errors.

    Regarding the Elastic Search errors, those are very strange. Never had a similar experience. Maybe you updated Elasticsearch recently and this is not connected with the deferred.php change?
     
    SneakyDave likes this.
  9. Mike

    Mike XenForo Developer Staff Member

    There are actually some changes relating to this ES code but IIRC, it is mostly hiding another error so it wouldn't happen in normal execution unless there was another error happening. I would look at the status of your Elasticsearch server to make sure everything is ok there.
     
    Xon likes this.
  10. Stuart Wright

    Stuart Wright Well-Known Member

    Seems we've had a major Elastic implosion! Tim completely removed and reinstalled Elastic and it's taking all day to reindex.
     
    Xon likes this.
  11. Stuart Wright

    Stuart Wright Well-Known Member

    I've been getting the same errors from Elastic again since Monday.
    They all started with this different error:
    So it seems that this error triggers an issue which breaks Elastic which then gives all the subsequent errors (4,500+ of them).
    Any ideas please?
     
  12. Xon

    Xon Well-Known Member

    It sounds like XF is trying to submit an empty post or similar to Elastic Search.

    Do you have a stacktrace for that error? It should help suggest what content type is triggering this.
     
  13. Stuart Wright

    Stuart Wright Well-Known Member

     
  14. Mike

    Mike XenForo Developer Staff Member

    It looks like a post with invalid UTF-8 in it. It seems that Elasticsearch fell over when it received that. I don't see any obvious bad UTF-8 in the message, but it might be caused by an add-on to convert links to page titles (and it not giving valid UTF-8).
     
    Xon likes this.

Share This Page