Page 1 of 3

Cron error periodically

Posted: Thu Jan 16, 2020 11:43 pm
by hesker
Script URL: support.activationhq.com/hesk/
Version of script: 2.85
Hosting company: SiteGround
URL of phpinfo.php: will post if truly needed
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Could not get login password entry response

Write your message below:

several times per week I get the following error when the cron script for pop fetching executes:

<h2>Error: Could not get login password entry response</h2>

The script runs every 5 minutes, and this only happens once in a while. Fetching does work, I have tested it multiple times and it has worked every time. There are no server logs regarding this issue at all. What is it and how do I fix it?

Re: Cron error periodically

Posted: Fri Jan 17, 2020 3:05 pm
by Klemen
Not sure what this is, but nothing in the code changes and sometimes it works while sometimes it doesn't - this means it's a server-side issue, perhaps your host limits the number of times you can login to POP3 per hour? Or the POP3 server is unreliable/stressed and drops connections sometimes?

Re: Cron error periodically

Posted: Fri Jan 17, 2020 6:38 pm
by hesker
Thanks, but the host has already looked into this quite deep and concluded that it is definitely not on their side and the message is coming from the script. Last instance of this error was just under 36 hours ago now so... I've no idea. Like I said tickets are fetched and everything seems to be working, the error is just strange.

Re: Cron error periodically

Posted: Fri Jan 17, 2020 9:19 pm
by hesker
Just got another one 10 minutes ago. So this is happening roughly once every 36 to 48 hours

Re: Cron error periodically

Posted: Sat Jan 18, 2020 6:21 am
by Klemen
hesker wrote: Fri Jan 17, 2020 6:38 pm Thanks, but the host has already looked into this quite deep and concluded that it is definitely not on their side and the message is coming from the script.
How surprising :lol:

Yes, the message is coming from the script, but only because the POP3 server doesn't return any response after the PASS command.

Like said, if the same code works 99% of the time and absolutely nothing changes in the code, the problem is elsewhere.

Re: Cron error periodically

Posted: Sat Jan 18, 2020 10:02 pm
by hesker
Well to add to the confusion... this morning I woke up to 3 messages:

<h2>Error: Could not get login password entry response</h2>

sent last night at 11:14pm

<h2>Error: Password error: [SYS/TEMP] Internal error occurred. Refer to server log for more information.</h2>

sent this morning at 3:05am

<h2>Error: Password error: [SYS/TEMP] Internal error occurred. Refer to server log for more information.</h2>

sent this morning at 5:39am

No idea what to do about these and of course the server logs show nothing.

Re: Cron error periodically

Posted: Mon Jan 20, 2020 11:31 am
by Klemen
These errors are returned by your POP3 server, not by Hesk:
[SYS/TEMP] Internal error occurred. Refer to server log for more information.
You will need to check your mail server logs, not apache/server logs for details.

Re: Cron error periodically

Posted: Wed Jan 22, 2020 5:27 pm
by hesker
All logs were checked, and there is nothing.

I slowed cron execution down to 10 minutes in case the speed was an issue but, no change.

Re: Cron error periodically

Posted: Wed Jan 22, 2020 10:03 pm
by hesker
Further reply from my host:
I also analyzed the server's Exim mail log and the entries we have so far indicate that the message created by the script is successfully sent by the server:

2020-01-22 08:50:02.286661 8248 SMTP>> MAIL FROM:<<strong>username</strong>@serverid.siteground.us> SIZE=2029
2020-01-22 08:50:02.397275 8248 SMTP<< 250 OK
2020-01-22 08:50:02.397291 8248 SMTP>> RCPT TO:<username@gmail.com>
2020-01-22 08:50:02.412703 8248 SMTP<< 250 Accepted
2020-01-22 08:50:02.412723 8248 SMTP>> DATA
2020-01-22 08:50:02.423763 8248 SMTP<< 354 Enter message, ending with "." on a line by itself
2020-01-22 08:50:02.423782 8248 SMTP>> writing message and terminating "."
2020-01-22 08:50:03.871723 8248 SMTP<< 250 OK id=1iuBi6-000511-DW
2020-01-22 08:50:03.875405 8248 SMTP>> QUIT


One thing, however, that caught my attention is that the script does not utilize authentication. This means that messages are sent directly from the user for your Site instead of a particular inbox.

I opened the script that is defined to run as a cron job and noticed the following lines:

// Uncomment lines below to use different POP3 login details than in settings
/*
$hesk_settings['pop3_host_name'] = 'mail.server.com';
$hesk_settings['pop3_host_port'] = 110;
$hesk_settings['pop3_tls'] = 0;
$hesk_settings['pop3_user'] = 'user@server.com';
$hesk_settings['pop3_password'] = 'password';
*/

//============================================================================//
// END OPTIONAL MODIFICATIONS //
//============================================================================//


In order to guarantee successful mailing we recommend implementing SMTP authentication within the script.

That way a particular inbox of yours can be used in order to send out the automated messages and the chances of getting the error message related to the password would be avoided.

I recommend passing this information to the person who wrote the script so he/she will be aware of what changes will be required.

Re: Cron error periodically

Posted: Thu Jan 23, 2020 10:07 am
by Klemen
We're talking apples and oranges here. Your host talks about email sending (which SMTP is used for and Hesk indeed supports SMTP authentication if you set Email sending to SMTP Server), but the cron job (the POP3 protocol) is for email fetching (reading) from a mailbox.

Have you tried using IMAP fetching instead of POP3? It's used for the same thing, but using a different protocol. I'd try that and see if it is more reliable.

Re: Cron error periodically

Posted: Wed Jan 29, 2020 2:37 am
by hesker
I did try imap fetching originally but there was some feature that couldn't be supported with it and required pop. I forget what exactly it was now.

Side note, I haven't received an error now in 6 days. No idea why.

Re: Cron error periodically

Posted: Wed Jan 29, 2020 3:24 pm
by hesker
And of course now I got an error this morning so... I have no idea.

Re: Cron error periodically

Posted: Wed Jan 29, 2020 6:33 pm
by Klemen
IMAP and POP3 fetching do the same thing, there are no Hesk functionality differences between them.

If you can't identify the issue with POP3, try IMAP.

Re: Cron error periodically

Posted: Wed Jan 29, 2020 10:11 pm
by hesker
Now I remember what the issue with imap fetching was:
This function deletes quoted replies from all customer emails before they are converted into a ticket using Email piping or POP3 Fetching.
I would prefer to strip the replies from emails but imap doesn't support it.

Re: Cron error periodically

Posted: Thu Jan 30, 2020 3:05 am
by hesker
Well that didn't take long. Running imap fetching every 5 minutes since my last post, just got this:

<h2>An error occured.</h2><p>For details turn <b>Debug mode</b> ON in settings and run this script again.</p>