• Resolved januzi_pl

    (@januzi_pl)


    Hello

    At one point wordfence started to refuse to update firewall rules (“No rules were updated. Please verify your website can reach the Wordfence servers.” / The last successful update check was 27 June 2019 15:35). Diagnostic window says that everything is ok. Curl in the ssh console also says that there is no problem:

    curl -D – https://noc4.wordfence.com/v1.8/
    HTTP/1.1 200 OK
    Server: nginx/1.10.3 (Ubuntu)
    Date: Mon, 15 Jul 2019 23:26:30 GMT
    Content-Type: application/json
    Content-Length: 59
    Connection: keep-alive

    {“success”:false,”errorMessage”:”Invalid action supplied.”}

    I’ve snooped around and I’ve found that there’s a class “wfWAFCronFetchRulesEvent” that’s being used to fetch the data with the fire() method. Too bad that it only returns true/false and not the real meaningful messages:

    else {
    $success = false;
    }
    }
    else {
    $success = false;
    }
    }
    else {
    $success = false;
    }
    […]
    return $success;

    Yep, finding the reason why it is failing will be very easy with the “false” in the every single else. I’d change that class to give proper messages, but you’ve hardcoded that the update can be fired up only 3 times, so I have to wait for the next opportunity (I’d change that also, but I’m to tired to look around files).

    So:
    1. What should I do to fix rules updating mechanism?
    2. Would you be so kind and change the fire() method, so it would provide more detailed data about why it failed?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hey @januzi_pl,

    Can you please try deleting the wp-content/wflogs/rules.php file and letting Wordfence rebuild it? Please give this a try and let me know if it helps.

    Once we get the rules issue sorted I’ll be sure to share your thoughts regarding more informative error messages.

    Thanks,

    Gerroald

    Thread Starter januzi_pl

    (@januzi_pl)

    Hello

    I’ve tried deleting that file, but it didn’t help, the error message keeps popping up. There is one difference. The new rules file has got 164KB, while the old one had 161KB (and about 90 lines less), so probably it managed to download the new rules. Maybe additional line in the rules.php would help:

    $this->rulesVersion = ‘x’ ;

    or

    $this->rulesDate = ‘x’ ;

    This way it would be possible to recognize if the problem is in the downloading or in later stage (if the file got recreated, then I assume there is nothing wrong with the connection and the error message is there because of other reason?)/

    Hey @januzi_pl,

    It is possible that the rules have been updated, and you can check by looking at the timestamp for /wp-content/wflogs/rules.php.

    This is an excellent suggestion and could save some time when issues like this happen.

    Please let me know.

    Thanks,

    Gerroald

    Thread Starter januzi_pl

    (@januzi_pl)

    Hello again

    The file was created today, 3 hours ago. Should I delete it again and give one more try to the manual refresh?

    Hey @januzi_pl,

    Are you able to dismiss the warning? If not, can you first try deactivating and reactivating Wordfence to see if that helps?

    Thanks,

    Gerroald

    • This reply was modified 5 years, 4 months ago by WFGerroald.
    Thread Starter januzi_pl

    (@januzi_pl)

    Hello again

    Reactivate didn’t help, the message is still there. Dismiss button hides the message for a moment. As soon as I reload the page (or enter pages/posts/etc) the message pops up again.
    The ajax request with the “action: wordfence_dismissAdminNotice” returns json with ok:1.

    Hey @januzi_pl,

    Do you have any caching on the site/server that you can clear?

    Thanks,

    Gerroald

    Thread Starter januzi_pl

    (@januzi_pl)

    The only performance plugin that I have is WP Performance Pack, which switches translations from default ones into system’s gettext. I’ve switched that plugin off, but it didn’t change anything.
    I’ve also disabled all plugins except wordfence, but it didn’t help either. I’ve also checked wp-content/ and plugins/ dir if there is something about cache (like those object-cache.php or something like that). Nope. No cache at all.

    Hey @januzi_pl,

    I’ve spoken with some colleagues about this. If you’re certain there isn’t any other drop-in or MU cache plugins can you see if there’s any caching on the server that might be contributing to this?

    Unfortunately, if not the next course of action is going to resetting Wordfence. I understand this isn’t the ideal solution, but the data is definitely getting hung up on something.

    https://www.wordfence.com/help/advanced/remove-or-reset/#remove-or-reset

    Please let me know how it goes.

    Thanks,

    Gerroald

    Thread Starter januzi_pl

    (@januzi_pl)

    Hello

    The message did disappear, however “manual refresh” is still yelling that it couldn’t download rules (which isn’t true, since rules.php is being created). So, in the weekend I’ll spend some time and try to find on which certain line it gets wrong result.

    Plugin Support wfscott

    (@wfscott)

    @januzi_pl

    Just checking in to make sure your rules are still updating.

    If you have any questions, please let me know.

    Scott

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘No rules were updated’ is closed to new replies.