Author Topic: Cron Output  (Read 3620 times)

Valiant

  • aka Sam
    • Radiance Audio
Cron Output
« on: 06 June, 2017, 11:44:41 pm »
I need some help, the cron service on my VPS is emailing me with:


Code: [Select]
<!DOCTYPE html><!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono--><html xmlns="http://www.w3.org/1999/xhtml" lang="en-GB"><head>        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />        <meta name="viewport" content="width=device-width">        <meta name='robots' content='noindex,follow' />        <title>WordPress &rsaquo; Error</title>        <style type="text/css">                html {                        background: #f1f1f1;                }                body {                        background: #fff;                        color: #444;                        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;                        margin: 2em auto;                        padding: 1em 2em;                        max-width: 700px;                        -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.13);                        box-shadow: 0 1px 3px rgba(0,0,0,0.13);                }                h1 {                        border-bottom: 1px solid #dadada;                        clear: both;                        color: #666;                        font-size: 24px;                        margin: 30px 0 0 0;                        padding: 0;                        padding-bottom: 7px;                }                #error-page {                        margin-top: 50px;                }                #error-page p {                        font-size: 14px;                        line-height: 1.5;                        margin: 25px 0 20px;                }                #error-page code {                        font-family: Consolas, Monaco, monospace;                }                ul li {                        margin-bottom: 10px;                        font-size: 14px ;                }                a {                        color: #0073aa;                }                a:hover,                a:active {                        color: #00a0d2;                }                a:focus {                        color: #124964;                    -webkit-box-shadow:                        0 0 0 1px #5b9dd9,                                0 0 2px 1px rgba(30, 140, 190, .;                    box-shadow:                        0 0 0 1px #5b9dd9,                                0 0 2px 1px rgba(30, 140, 190, .;                        outline: none;                }                .button {                        background: #f7f7f7;                        border: 1px solid #ccc;                        color: #555;                        display: inline-block;                        text-decoration: none;                        font-size: 13px;                        line-height: 26px;                        height: 28px;                        margin: 0;                        padding: 0 10px 1px;                        cursor: pointer;                        -webkit-border-radius: 3px;                        -webkit-appearance: none;                        border-radius: 3px;                        white-space: nowrap;                        -webkit-box-sizing: border-box;                        -moz-box-sizing:    border-box;                        box-sizing:         border-box;                        -webkit-box-shadow: 0 1px 0 #ccc;                        box-shadow: 0 1px 0 #ccc;                        vertical-align: top;                }                .button.button-large {                        height: 30px;                        line-height: 28px;                        padding: 0 12px 2px;                }                .button:hover,                .button:focus {                        background: #fafafa;                        border-color: #999;                        color: #23282d;                }                .button:focus  {                        border-color: #5b9dd9;                        -webkit-box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );                        box-shadow: 0 0 3px rgba( 0, 115, 170, .8 );                        outline: none;                }                .button:active {                        background: #eee;                        border-color: #999;                        -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );                        box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );                        -webkit-transform: translateY(1px);                        -ms-transform: translateY(1px);                        transform: translateY(1px);                }                        </style></head><body id="error-page">        <p></p></body>
</html>
You have the right to remain silent. Anything you say will be misquoted, then used against you.

Support Equilibrium

Kim

  • Timelord
    • Fediverse
Re: Cron Output
« Reply #1 on: 07 June, 2017, 12:07:53 am »
Is there an actual error message in amongst that HTML?  It's not obvious by skim-reading it.

Valiant

  • aka Sam
    • Radiance Audio
Re: Cron Output
« Reply #2 on: 07 June, 2017, 12:31:55 am »
Not that I can see, hence why I'm mystified.
You have the right to remain silent. Anything you say will be misquoted, then used against you.

Support Equilibrium

vorsprung

  • Opposites Attract
    • Audaxing
Re: Cron Output
« Reply #3 on: 07 June, 2017, 06:50:29 am »
i am guessing that somewhere on your hosted server there is an "error page" - that is a document that is served when there is an error condition - which is less than 512 bytes after compression

Find that page and fix it

On apache this is pretty easy to work out, there is a configuration directive which maps file paths to error codes

Afasoas

Re: Cron Output
« Reply #4 on: 07 June, 2017, 09:52:21 am »
Or you have a cron job that is doing a failing http request?

Phil W

Re: Cron Output
« Reply #5 on: 07 June, 2017, 04:37:41 pm »
Appears to be a WordPress error, you'll find this in the title element

WordPress › Error

Re: Cron Output
« Reply #6 on: 07 June, 2017, 04:54:36 pm »
I have no idea, but what hell is all that God awful internal CSS doing there?
Those wonderful norks are never far from my thoughts, oh yeah!

Valiant

  • aka Sam
    • Radiance Audio
Re: Cron Output
« Reply #7 on: 07 June, 2017, 05:54:23 pm »
So here's the process

WP Cron and Heartbeat is disabled and instead doing proper cron from cpanel.


Code: [Select]
The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled.

CPanel Cron sez


Code: [Select]
php -q /home/samv/html/site/wp-cron.php
You have the right to remain silent. Anything you say will be misquoted, then used against you.

Support Equilibrium

Valiant

  • aka Sam
    • Radiance Audio
Re: Cron Output
« Reply #8 on: 07 June, 2017, 06:07:23 pm »
WP Cron Contents





     
Code: [Select]
            [table]  [tr][td]  jetpack_sync_cron  [/td][td] Jetpack_Sync_Actions::do_cron_sync()  [/td][/tr]     [tr][td] jetpack_sync_full_cron [/td][td] Jetpack_Sync_Actions::do_cron_full_sync() [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] jetpack_display_posts_widget_cron_update [/td][td] jetpack_display_posts_update_cron_action() [/td][/tr]     [tr][td] wp_db_backup_event [/td][td]  [/td][/tr]     [tr][td] wordfence_completeCoreUpdateNotification [/td][td] wordfence::_completeCoreUpdateNotification() [/td][/tr]     [tr][td] woocommerce_cleanup_sessions [/td][td]  [/td][/tr]     [tr][td] woocommerce_tracker_send_event [/td][td]  [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] check_plugin_updates-mailchimp-woocommerce [/td][td] PucScheduler_3_1->maybeCheckForUpdates() [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] update_local_ga [/td][td]  [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] wpseo_hit_sitemap_index [/td][td] WPSEO_Sitemaps->hit_sitemap_index() [/td][/tr]     [tr][td] woocommerce_scheduled_sales [/td][td] wc_scheduled_sales() [/td][/tr]     [tr][td] wc_customer_order_csv_export_scheduled_export_cleanup [/td][td]  [/td][/tr]     [tr][td] wc_points_rewards_expire_points_daily [/td][td]  [/td][/tr]     [tr][td] sucuriscan_scheduled_scan [/td][td]  [/td][/tr]     [tr][td] wp_scheduled_delete [/td][td] wp_scheduled_delete() [/td][/tr]     [tr][td] wc_sre_send [/td][td]  [/td][/tr]     [tr][td] wp_scheduled_auto_draft_delete [/td][td] wp_delete_auto_drafts() [/td][/tr]     [tr][td] akismet_scheduled_delete [/td][td] Akismet::delete_old_comments() [/td][/tr]     [tr][td] [/td][td] Akismet::delete_old_comments_meta() [/td][/tr]     [tr][td] popmake_daily_scheduled_events [/td][td]  [/td][/tr]     [tr][td] wordfence_completeCoreUpdateNotification [/td][td] wordfence::_completeCoreUpdateNotification() [/td][/tr]     [tr][td] action_scheduler_run_queue [/td][td] ActionScheduler_QueueRunner->run() [/td][/tr]     [tr][td] http_worker_cron [/td][td] WP_Http_Worker->handle_cron() [/td][/tr]     [tr][td] wordfence_hourly_cron [/td][td] wordfence::hourlyCron() [/td][/tr]     [tr][td] rocket_purge_time_event [/td][td] do_rocket_purge_cron() [/td][/tr]     [tr][td] wordfence_processAttackData [/td][td] wordfence::processAttackData() [/td][/tr]     [tr][td] jetpack_clean_nonces [/td][td] Jetpack::clean_nonces() [/td][/tr]     [tr][td] jetpack_v2_heartbeat [/td][td] Jetpack_Heartbeat->cron_exec() [/td][/tr]     [tr][td] wprevpro_daily_event [/td][td] wprevpro_do_this_daily() [/td][/tr]     [tr][td] wordfence_batchReportFailedAttempts [/td][td] wordfence::wfsnBatchReportFailedAttempts() [/td][/tr]     [tr][td] wp_version_check [/td][td] wp_version_check() [/td][/tr]     [tr][td] wp_update_plugins [/td][td] rocket_reset_check_update_timer() [/td][/tr]     [tr][td] [/td][td] wp_update_plugins() [/td][/tr]     [tr][td] wp_update_themes [/td][td] wp_update_themes() [/td][/tr]     [tr][td] rocket_database_optimization_time_event [/td][td] do_rocket_database_optimization() [/td][/tr]     [tr][td] fs_data_sync_wp-review-slider-pro [/td][td]  [/td][/tr]     [tr][td] wc_points_rewards_expire_points_daily [/td][td]  [/td][/tr]     [tr][td] wordfence_daily_cron [/td][td] wordfence::dailyCron() [/td][/tr]     [tr][td] wc_points_rewards_expire_points_daily [/td][td]  [/td][/tr]     [tr][td] wordfence_start_scheduled_scan [/td][td] wordfence::wordfenceStartScheduledScan() [/td][/tr]     [tr][td] jp_purge_transients_cron [/td][td] jp_purge_transients() [/td][/tr]     [tr][td] wpmudev_scheduled_jobs [/td][td]  [/td][/tr]     [tr][td] wpseo_onpage_fetch [/td][td] WPSEO_OnPage->fetch_from_onpage() [/td][/tr]     [tr][td] wordfence_start_scheduled_scan [/td][td] wordfence::wordfenceStartScheduledScan() [/td][/tr]     [tr][td] wordfence_start_scheduled_scan [/td][td] wordfence::wordfenceStartScheduledScan() [/td][/tr]     [tr][td] wordfence_start_scheduled_scan [/td][td] wordfence::wordfenceStartScheduledScan() [/td][/tr]     [tr][td] wordfence_start_scheduled_scan [/td][td] wordfence::wordfenceStartScheduledScan() [/td][/tr]     [tr][td] wordfence_email_activity_report [/td][td] wfActivityReport::executeCronJob() [/td][/tr]     [tr][td] wordfence_start_scheduled_scan [/td][td] wordfence::wordfenceStartScheduledScan() [/td][/tr]     [tr][td] wordfence_start_scheduled_scan [/td][td] wordfence::wordfenceStartScheduledScan() [/td][/tr]     [tr][td] woocommerce_geoip_updater [/td][td]  [/td][/tr] [/table]   
You have the right to remain silent. Anything you say will be misquoted, then used against you.

Support Equilibrium

Valiant

  • aka Sam
    • Radiance Audio
Re: Cron Output
« Reply #9 on: 07 June, 2017, 06:11:07 pm »
Strange tables not working
You have the right to remain silent. Anything you say will be misquoted, then used against you.

Support Equilibrium

PaulF

  • "World's Scariest Barman"
  • It's only impossible if you stop to think about it
Re: Cron Output
« Reply #10 on: 07 June, 2017, 06:16:26 pm »



Strange tables not working


Think it's  because you'd  wrapped the table in code tags

WP Cron Contents





     
           
  jetpack_sync_cron  Jetpack_Sync_Actions::do_cron_sync() 
jetpack_sync_full_cron Jetpack_Sync_Actions::do_cron_full_sync()
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
jetpack_display_posts_widget_cron_update jetpack_display_posts_update_cron_action()
wp_db_backup_event  
wordfence_completeCoreUpdateNotification wordfence::_completeCoreUpdateNotification()
woocommerce_cleanup_sessions  
woocommerce_tracker_send_event  
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
check_plugin_updates-mailchimp-woocommerce PucScheduler_3_1->maybeCheckForUpdates()
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
update_local_ga  
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
wpseo_hit_sitemap_index WPSEO_Sitemaps->hit_sitemap_index()
woocommerce_scheduled_sales wc_scheduled_sales()
wc_customer_order_csv_export_scheduled_export_cleanup  
wc_points_rewards_expire_points_daily  
sucuriscan_scheduled_scan  
wp_scheduled_delete wp_scheduled_delete()
wc_sre_send  
wp_scheduled_auto_draft_delete wp_delete_auto_drafts()
akismet_scheduled_delete Akismet::delete_old_comments()
Akismet::delete_old_comments_meta()
popmake_daily_scheduled_events  
wordfence_completeCoreUpdateNotification wordfence::_completeCoreUpdateNotification()
action_scheduler_run_queue ActionScheduler_QueueRunner->run()
http_worker_cron WP_Http_Worker->handle_cron()
wordfence_hourly_cron wordfence::hourlyCron()
rocket_purge_time_event do_rocket_purge_cron()
wordfence_processAttackData wordfence::processAttackData()
jetpack_clean_nonces Jetpack::clean_nonces()
jetpack_v2_heartbeat Jetpack_Heartbeat->cron_exec()
wprevpro_daily_event wprevpro_do_this_daily()
wordfence_batchReportFailedAttempts wordfence::wfsnBatchReportFailedAttempts()
wp_version_check wp_version_check()
wp_update_plugins rocket_reset_check_update_timer()
wp_update_plugins()
wp_update_themes wp_update_themes()
rocket_database_optimization_time_event do_rocket_database_optimization()
fs_data_sync_wp-review-slider-pro  
wc_points_rewards_expire_points_daily  
wordfence_daily_cron wordfence::dailyCron()
wc_points_rewards_expire_points_daily  
wordfence_start_scheduled_scan wordfence::wordfenceStartScheduledScan()
jp_purge_transients_cron jp_purge_transients()
wpmudev_scheduled_jobs  
wpseo_onpage_fetch WPSEO_OnPage->fetch_from_onpage()
wordfence_start_scheduled_scan wordfence::wordfenceStartScheduledScan()
wordfence_start_scheduled_scan wordfence::wordfenceStartScheduledScan()
wordfence_start_scheduled_scan wordfence::wordfenceStartScheduledScan()
wordfence_start_scheduled_scan wordfence::wordfenceStartScheduledScan()
wordfence_email_activity_report wfActivityReport::executeCronJob()
wordfence_start_scheduled_scan wordfence::wordfenceStartScheduledScan()
wordfence_start_scheduled_scan wordfence::wordfenceStartScheduledScan()
woocommerce_geoip_updater  
   

Valiant

  • aka Sam
    • Radiance Audio
Re: Cron Output
« Reply #11 on: 07 June, 2017, 06:19:25 pm »
Ah thanks :)

Everything look ok otherwise?
You have the right to remain silent. Anything you say will be misquoted, then used against you.

Support Equilibrium

Re: Cron Output
« Reply #12 on: 07 June, 2017, 06:24:08 pm »
WP.

Run away!
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Cron Output
« Reply #13 on: 07 June, 2017, 06:30:37 pm »
So here's the process

WP Cron and Heartbeat is disabled and instead doing proper cron from cpanel.


Code: [Select]
The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled.

CPanel Cron sez


Code: [Select]
php -q /home/selfhar1/public_html/customvapes/wp-cron.php

OK, presumably there is something in front of that, like "*/10 * * * *"?

And for that table, I'm guessing they are all scheduled to run at various times? So *one* of those things is hitting the site incorrectly and getting an (empty) error page in return. Rather unhelpfully, it is not creating it's own exception, simply passing the page through to STDERR back to cron, which emails it to you.

Your problem is finding out which one. Can you match up the time of the email with the schedule? Or perhaps with the website error log? Given how many hits you get from outside, it might be tricky.
Quote from: tiermat
that's not science, it's semantics.

Re: Cron Output
« Reply #14 on: 07 June, 2017, 06:57:42 pm »
The subject of the email should be the name of the specific script being run by cron.

There are also some headers in the email (X-Cron-Env:) that cron sets that may help narrow it down.

However it may be that WP sets up a single script to be run by cron and then the script decides what it needs to run from its own internal tables/setup.
"Yes please" said Squirrel "biscuits are our favourite things."

Valiant

  • aka Sam
    • Radiance Audio
Re: Cron Output
« Reply #15 on: 07 June, 2017, 07:42:17 pm »
Yep all the timings etc are there. I'll try running each action manually.
You have the right to remain silent. Anything you say will be misquoted, then used against you.

Support Equilibrium

Re: Cron Output
« Reply #16 on: 07 June, 2017, 09:03:52 pm »
The subject of the email should be the name of the specific script being run by cron.

There are also some headers in the email (X-Cron-Env:) that cron sets that may help narrow it down.

However it may be that WP sets up a single script to be run by cron and then the script decides what it needs to run from its own internal tables/setup.

It's the third one. The idea is WP has its own pseudo-cron for installations where you just upload a site but have no access to the server for cron. Every hit to the site causes wp-cron.php to run, which looks through its schedule and spins off a thread to run things. The obvious drawback is that on low-hit sites things don't get run until you get a visitor, and on high-hit sites there's a ton of extra process slowing everything down. So Valiant has quite sensibly turned this behaviour off and used a real cron to run wp-cron.php. The woeful error handling of one of the subtasks seems to be the root of the issue, though if it was being run through the standard method it would probably be failing silently.
Quote from: tiermat
that's not science, it's semantics.

Valiant

  • aka Sam
    • Radiance Audio
Re: Cron Output
« Reply #17 on: 07 June, 2017, 10:21:48 pm »
So running them one by one gave no errors.
You have the right to remain silent. Anything you say will be misquoted, then used against you.

Support Equilibrium

Valiant

  • aka Sam
    • Radiance Audio
Re: Cron Output
« Reply #18 on: 08 June, 2017, 12:45:53 am »
Email info:

Subject: Cron <samv@server> php -q /home/samv/html/site/wp-cron.php

Headers:

Auto-Submitted: auto-generated
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <MAILTO=sam@gmail.com>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/samv>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=sam>
X-Cron-Env: <USER=sam>

So no useful info. I've asked the hosts and they took a look and said err ask your dev. Which is moi.
You have the right to remain silent. Anything you say will be misquoted, then used against you.

Support Equilibrium

Re: Cron Output
« Reply #19 on: 08 June, 2017, 07:52:57 am »
OK, my hacky way would be to add some code to wp-cron.php to write out the name of each sub-script it is about to run.

Sure you'll get an email for every time it does run a sub-script whether it outputs an error or not, but if the problem was occurring regularly then it shouldn't be long before you get something useful:-

"
blah
foo
wibble
"

"
blah
foo
<error>
argle-bargle
"

But that's still not going to solve the problem...
"Yes please" said Squirrel "biscuits are our favourite things."