• The Wordfence scan has stopped running automatically. If I hit the “Start new scan” button, it will run for a while until the message “Scan process ended after forking.” is displayed in the log (I’ve turned on debug mode).

    If I try the displayed scan URL to my site, for example https://www.mysite.com/wp-admin/admin-ajax.php?action=wordfence_doScan&isFork=1&scanMode=standard&cronKey=7225018fca0f54834eb9403a58f44013, the scan runs for a while before it stops with the “Scan process ended after forking.” message again.

    If I configure the scans to start remotely, and use the URL displayed in the scan log, for example https://noc1.wordfence.com/scanp/www.mysite.com/wp-admin/admin-ajax.php?action=wordfence_doScan&isFork=1&scanMode=standard&cronKey=ebdf307727bb7a9b96f9fe5b233bf17d, the can also runs for a while before it stops with the same error message.

    Running the https://www.mysite.com or noc1.wordfence.com links with curl or wget on the server that hosts my WordPress installation, results in the follow message in the scan log:

    [Feb 19 19:40:23] Scan engine received request.
    [Feb 19 19:40:23] Fetching stored cronkey for comparison.
    [Feb 19 19:40:23] Checking cronkey: [invalid] (expecting ebdf307727bb7a9b96f9fe5b233bf17d)

    The cronkey is typically the correct one, i.e. the one that was in the link, so I’m not sure why Wordfence compains it’s invalid.

    I think I’ve exhausted my options here. Any suggestions on how I can solve this issue and get the scans to work again?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support wfphil

    (@wfphil)

    Hi @vskjefst

    If you are using a plugin with any kind of database caching then disable that and flush the cache.

    If that doesn’t apply to you, or doesn’t help, then the most likely reason for any host to still have this issue is if they have multiple copies of the database that don’t sync immediately – so the key gets written to one database, but when it gets read from a different database, it might not be there yet.

    Some hosts have an issue on some of their servers behind an Apache Traffic Server load balancer, where we make one connection to the site, and it sends it to two back end servers. So one of those two hits works and the scan continues running, but the second one finds that the cron key has already been cleared, so the second one just dies.

    If a load balance is involved it may be possible to fix it by configuring the load balancer so that all hits on admin-ajax.php go to the same back end server, even if the other databases aren’t in sync, that one at least would be self-consistent.

    Plugin Support wfphil

    (@wfphil)

    Hi,

    Since I haven’t heard back from you I am assuming that the instructions solved your issue so I am marking this topic as resolved.

    If however, for whatever reason, you are still experiencing this issue and it is not resolved please respond to the post, which moves it back up the queue, and mark this topic as “not resolved”.

    Thank you.

    Thread Starter Vegard Skjefstad

    (@vskjefst)

    If anyone has a similar problem to this, I finally solved it by installing php-curl, which was not installed on my server. Neither is it a mandatory php-module to get WordPress to work, so WordFence should perhaps consider showing a huge warning if php-curl is not installed ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Scan process ended after forking.’ is closed to new replies.