Mautic Community Forums

Cronfig error

Hi!



I’m looking on Mautic Community and Google for a while and nothing… Let’s see if somebody help me =P



I’m using Cronfig to set up the cron jobs, but some of them seens like it’s not working. I received this error message by email:

Quote:
The cron task "Trigger campaigns" ended with the 4 error results in a row.

The Mautic plugin tried to use the --force attribute after the 3rd error in a row and it didn't help either. It might need a human assistance.

Here are some details about the last cron job:

Task URL: http://mautic.viagemgrupo.com.br/cronfig/mautic%3Acampaigns%3Atrigger?secret_key=xxxx

Error info: HTTP status is not 2xx. That means not successful.

HTTP status: 403

Task output:

error: access forbidden


I have no idea whats going on =(
Looks like something is blocking Cronfig to access the URL /cronfig/mautic:campaigns:trigger
Has anyone ever experienced this?





Hi!

I’m looking on Mautic Community and Google for a while and nothing… Let’s see if somebody help me =P

I’m using Cronfig to set up the cron jobs, but some of them seens like it’s not working. I received this error message by email:

[quote]
The cron task “Trigger campaigns” ended with the 4 error results in a row.

The Mautic plugin tried to use the --force attribute after the 3rd error in a row and it didn’t help either. It might need a human assistance.

Here are some details about the last cron job:

Task URL: http://mautic.viagemgrupo.com.br/cronfig/mautic%3Acampaigns%3Atrigger?secret_key=xxxx

Error info: HTTP status is not 2xx. That means not successful.

HTTP status: 403

Task output:

error: access forbidden[/quote]

I have no idea whats going on =(
Looks like something is blocking Cronfig to access the URL /cronfig/mautic:campaigns:trigger
Has anyone ever experienced this?

I’m trying to figure it out. From what I could tell, the request is killed by some servers because some HTTP header is missing. I have to figure out which one. If you access the URL in a browser, it works, right?

Thanks for the fast reply escopecz =)

Looks like it returns a database exception: “MySQL Server has gone away”. Could it be a connection with database problem? Timeout?

[quote]Triggering events for campaign 1
Triggering first level events
4 total events(s) to be processed in batches of 100
0/4 [>---------------------------] 0%
1/4 [=======>--------------------] 25%
2/4 [==============>-------------] 50%

[DoctrineDBALExceptionDriverException]
An exception occurred while executing ‘SELECT t0.id AS id_1, t0.date_added AS date_added_2, t0.reason AS reason_3, t0.channel AS channel_4, t0.channel_id AS channel_id_5, t0.comments AS comments_6, t0.lead_id AS lead_id_7 FROM lead_donotcontact t0 WHERE t0.channel = ? AND t0.lead_id = ?’ with params [“notification”, 8]:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

[DoctrineDBALDriverPDOException]
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

[PDOException]
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

mautic:campaigns:trigger [-i|–campaign-id [CAMPAIGN-ID]] [–scheduled-only] [–negative-only] [-l|–batch-limit [BATCH-LIMIT]] [-m|–max-events [MAX-EVENTS]] [-f|–force] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–]

[/quote]

Yes, that’s your MySql server failing. It has nothing to do with Mautic or Cronfig. Contact your server/hosting provider and discuss it with them.

@escopecz, thanks for tryng help me!

I contacted my hosting provider and they came with and interesting theory, but I don’t know.

Well, the problem is in the query:

'SELECT t0.id AS id_1, t0.date_added AS date_added_2, t0.reason AS reason_3, t0.channel AS channel_4, t0.channel_id AS channel_id_5, t0.comments AS comments_6, t0.lead_id AS lead_id_7 FROM lead_donotcontact t0 WHERE t0.channel = ? AND t0.lead_id = ?' with params ["notification", 17]

They told me that’s a timeout problem and they think it’s because the application is unable to treat empty returns. I don’t know exatly why they told this (if they realy think that or if they are lazy) but when i try to run this query directly on database, it actualy returns as empty.

At least at this point, they’re right. The database is returning nothing on this query. And the error is a timeout. So I started thinking maybe it could be related somehow with this “empty return”.

What do you think?

The query you posted is not executable with the mysql database directly. It’s in the syntax Doctrine (a PHP library) uses to build the query. So you should get a SQL syntax error while executing it.

But when the error is 2006 MySQL server has gone away then it’s because the mysql server hung up and didn’t deliver the response to the PHP application. So the PHP application did not cause the problem. Here is an article about it if you want to learn more:

http://dev.mysql.com/doc/refman/5.7/en/gone-away.html

Here is a possible solution:

http://stackoverflow.com/questions/7942154/mysql-error-2006-mysql-server-has-gone-away

The server’s admin said the “max_allowed_packet” is actualy seted to 500MB.
Well… I’ll keep looking for a way to debug it.

Hi,

I installed Cronfig but it gives me an error when it try to Trigger Campaigns

latest jobs
created: 2016-09-02T20:35:09.000Z, runtime: 0.821s, job status: error, HTTP status: 500 Internal Server Error

HTTP status is not 2xx. That means not successful.

Job Output

error: access forbidden

I don´t know what it mean

Can you help me?

Thanks

Hi! Check your logs to see what’s wrong: https://mautic.org/docs/en/tips/troubleshooting.html

Hello !
This is what I have when executing cron job with cronfig
"
JOB OUTPUT
error : secret key is missing in the configuration
"

@Tadj this error is reported here: https://github.com/cronfig/mautic-cronfig/issues/2 Subscribe to that issue to get latest updates about it.

@escopecz thanks