antedebaas / Viesti-Reports

DMARC & SMTP-TLS Reports processor and visualizer and BIMI file hoster
https://docs.viestireports.com/
GNU Affero General Public License v3.0
82 stars 16 forks source link

GetReportsFromMailbox command was already running. #113

Closed bundyland closed 4 months ago

bundyland commented 5 months ago

Describe the bug Error message in logs since latest update

Are you using the Docker image?

Database used

Error Messages GetReportsFromMailbox command was already running.

Expected behavior Normal email fetch schedule

Screenshots Screenshot 2024-06-20 151744

Environment (please complete the following information):

Additional context This error appears since the latest update from yesterday

antedebaas commented 5 months ago

This can happen when either one of 2 cases occur:

antedebaas commented 5 months ago

In case of the latter please let me know what crashed it

bundyland commented 5 months ago

Ante,

thanks for your feedback.

If I try docker exec -t dmarc-smtptls-reports-web-1 php .\bin\console app:removemaillock I just get Could not open input file: .binconsole.

Could you please help me with the correct command?

Thank you!

antedebaas commented 5 months ago

php /var/www/html/bin/console app:removemaillock

bundyland commented 5 months ago

Thank you.

I've run this command and got: Screenshot 2024-06-21 112724

After docker compose down && docker compose up -d I've hit Check Mailbox now and got immediately again:

Screenshot 2024-06-21 112909

For the moment I will roll back to an older version as I never had these problems before the latest release.

Thanks once again for your support.

Cheers...

bundyland commented 5 months ago

Update: switched back to version 1.14.2 and problem is gone.

antedebaas commented 5 months ago

the problem is probably still there, older versions didnt do a check i added. this could cause other problems instead so i would not recoomend it

bundyland commented 5 months ago

Hi Ante,

sorry for the late response.

Here are my docker compose logs: logs.txt

I see some warnings in there, but due to a lack of knowledge it doesn't ring a bell to me. Hopefully the logs are helpful for you anyway.

Thanks and best...

antedebaas commented 5 months ago

None of the errors are related to the getreportsfrommailbox command.

could you run the following command on 1 line and give me the output.

php /var/www/html/bin/console app:removemaillock; php /var/www/html/bin/console app:getreportsfrommailbox

this should run them both in sequence

bundyland commented 5 months ago

Sure. I got this:

Screenshot 2024-06-22 193751

Sorry, my server speaks German. "Kommando nicht gefunden" means "command not found", but I'm sure Dutch people understand German very well. 😉

antedebaas commented 5 months ago

Yep can read German :)

try this one: docker expect -t smtp-tls-reports-1 php /var/www/html/bin/console app:removemaillock; docker expect -t smtp-tls-reports-1 php /var/www/html/bin/console app:getreportsfrommailbox

bundyland commented 5 months ago

This is the result:

Screenshot 2024-06-22 201926

antedebaas commented 5 months ago

Autocorrect changed stuff; try this one: docker exec -t smtp-tls-reports-1 php /var/www/html/bin/console app:removemaillock; docker exec -t smtp-tls-reports-1 php /var/www/html/bin/console app:getreportsfrommailbox

bundyland commented 5 months ago

I've changed your command to the correct container name and got positive results:

Screenshot 2024-06-22 211606

But after clicking on Check mailbox now the same error message GetReportsFromMailbox command was already running.

Strange, isn't it?

bundyland commented 5 months ago

It seems to work as long as I don't hit the check mailbox now button. If I only let the cron scheduled mail check running, the error message doesn't appear. Hope this helps.

antedebaas commented 5 months ago

Yeah that helps a lot actually. I think I have enough reason now to retire that ugly button 😃

bundyland commented 5 months ago

Yeah, time to say goodbye! 😃

bundyland commented 5 months ago

Dag Ante,

I'm sorry to tell you, but after a few hours of regular cron fetching mails, the error message appeared suddenly again although I haven't touched the "check mailbox now" button. So for the moment I think I better stay with v.1.14.2 until we have found the real issue.

antedebaas commented 5 months ago

If it happens without any other logged errors and it’s only now and then it’s not a problem. In fact it’s preventing duplicate processes so that’s a good thing.

antedebaas commented 5 months ago

What is your cron schedule?

bundyland commented 5 months ago

If it happens without any other logged errors and it’s only now and then it’s not a problem. In fact it’s preventing duplicate processes so that’s a good thing.

Unfortunately this is not the case. The error appears at every scheduled mail check (once per hour) and no report is imported. After I have run your command above, it works for a while, but then it stops at some point. I need to run the command again. Otherwise it gets stuck.

antedebaas commented 5 months ago

have you checked the mailbox for flagged messages? any other errors in the logs around the time the check starts to fail?

bundyland commented 5 months ago

No flagged mails and nothing other than what I had already written above. Really strange.

But please don't waste your time. As it seems that I'm the only one with this problem, you can close this case. I'll stay with 1.14.2 as this version is just running fine for me. And perhaps the problem will resolve itself with one of the next releases. 😃

antedebaas commented 5 months ago

If rather fix the underlying issue