About a week ago it quit fetching emails, nothing has changed, it will send them just fine when we respond to tickets but it will not fetch them. no errors that we can see, was running 1.17 and so i updated it to 1.18 and it' still the same issue. not sure what has changed. Fetching is enabled and auto cron is on as it always has been. We don't see any errors with oauth2 so i'm not even sure where to look for the issue.

    mattejacob

    Login to the database, go to the _email_account table, and see if you see anything in the error columns. If not, then can you go to the email in the Emails tab, ensure the Status is set to Active/Enabled within the Remote Mailbox tab, and Save Changes to see if it connects successfully. Lastly, you say you are using auto-cron; any reason you aren’t using an actual cron job/scheduled task? Auto-cron requires agents to be logged in and doing activity whereas a cron job/schedule task runs non-stop regardless of if anyone is logged in.

    Cheers.

    I had a similar issue with fetching from office 365 where it would fetch for a few weeks without issue, then it would appear to time out and not fetch again. I got mine sorted and its not failed since. Is your issue with oauth and Office 365 email?

    I don't see any errors related to the emails. A little bit ago it just decided to randomly pull all of them in. then it quit again. It was working fine for over a year then this started. I'm hoping someone can point me in the right direction. To answer your questions, yes auto-cron is running. I have not set up an actual cron job becasue i can't find a walk through. this is on a centos 7 server and all i could find was windows walk through. I'm fine with it not pulling things in unless users are logged in. there is always someone logged into it so that's never really been an issue.

    As for oauth, yes, office 365 and my first thought was, micorsoft made some change that broke it. but i'm not really sure. if a standalone cron job would fix it i'm fine with doing that. the token is renewing just fine, not expired or anything, it just won't fetch the emails or delete them. ironically, if i respond to a ticket in osticket, it will email the user like it should so it's only the fetching that is not working.

      mattejacob

      What do you mean by the below?

      I have not set up an actual cron job becasue i can't find a walk through. this is on a centos 7 server and all i could find was windows walk through.

      We give a Linux example here under the “RECURRING TASKS SCHEDULER (CRON JOB)” section.

      As for the not fetching part have you checked your PHP and web server error logs for any related errors? Have you also checked your Admin Panel > Dashboard > System Logs for any Mail Fetcher errors?

      Cheers.

      Ha. I did not see the nix section there. this is what i put in the crontab file but i really don't konw if it's correct. it doesn't seem to be doing anything/ making a difference. this is what i put in there. */5 * * * * /var/lib/php /var/www/osticket/api/cron.php

      I did check the logs and i can't seem to find any errors related to this. I did check the system logs in the admin panel and there is nothing in there related to email fethcing. some errors from january, and the logs from when i applied the update yesterday but that it. it's odd that it all of the sudden pulled all the emails from the last 2 weeks in at once, deleted them and then quit pulling them again. it really wouldn't be a huge deal ecept for the fact that when people reply to tickets we've responded to via email it won't pull the responses in.

        mattejacob

        With the cron job running can you set your Admin Panel > Settings > System > Default Log Level to DEBUG and see if it logs Cron Job entries in your System Logs that say Cron Job executed [CLI]. If not then it’s not running correctly.

        Cheers.

        Here are some of the logs just since i put that new job in there. it does look like it's running every 5 min but i can't tell what the errors mean.
        May 3 20:55:01 helpdesk-autismwv-org crond[1446]: (/var/lib/php) ERROR (getpwnam() failed)
        May 3 21:00:01 helpdesk-autismwv-org crond[1446]: (/var/lib/php) ERROR (getpwnam() failed)
        May 3 21:00:01 helpdesk-autismwv-org CROND[12533]: (root) CMD (/usr/lib64/sa/sa1 1 1)
        May 3 21:01:01 helpdesk-autismwv-org CROND[12690]: (root) CMD (run-parts /etc/cron.hourly)
        May 3 21:01:01 helpdesk-autismwv-org run-parts(/etc/cron.hourly)[12690]: starting 0anacron
        May 3 21:01:01 helpdesk-autismwv-org run-parts(/etc/cron.hourly)[12701]: finished 0anacron
        May 3 21:01:01 helpdesk-autismwv-org run-parts(/etc/cron.hourly)[12690]: starting mcelog.cron
        May 3 21:01:01 helpdesk-autismwv-org run-parts(/etc/cron.hourly)[12709]: finished mcelog.cron
        May 3 21:05:01 helpdesk-autismwv-org crond[1446]: (/var/lib/php) ERROR (getpwnam() failed)
        May 3 21:10:01 helpdesk-autismwv-org crond[1446]: (/var/lib/php) ERROR (getpwnam() failed)
        May 3 21:10:01 helpdesk-autismwv-org CROND[13950]: (root) CMD (/usr/lib64/sa/sa1 1 1)
        May 3 21:15:01 helpdesk-autismwv-org crond[1446]: (/var/lib/php) ERROR (getpwnam() failed)
        May 3 21:20:01 helpdesk-autismwv-org crond[1446]: (/var/lib/php) ERROR (getpwnam() failed)
        May 3 21:20:01 helpdesk-autismwv-org CROND[15321]: (root) CMD (/usr/lib64/sa/sa1 1 1)

        Looks like it may be fixed. I was in the mailbox and noticed an email in there and wondered why it was still in there as normally the box is empty because we have it set to delete the emails after it fetches them. it was an email that was dated right around the time this started. So i deleted that email manually and all of the sudden it started pulling in emails again. Really odd that no errors were showing related to the fetching or anything. Whatever was going on was related to that one email i believe. I'll check it again in the morning but I think it may be fixed. It's been running for over a year and that has never happened before. It's been rock solid up till this point.

          mattejacob

          Yea that should’ve triggered a Mail Fetcher error entry in your System Logs. Strange..glad it’s working now though. Please monitor it for a few days and let us know the results!

          Cheers.

          Yeah strange indeed. I never saw any errors. It had just quit. It's been a few days and it's still seems to fine. So whatever was going on with that email must have been the cause. I now have that inbox in my side pane just so I can monitor it. As long as the ticket system is working it's always empty. But if I ever see anything in it I'll know there may be an issue.

          Write a Reply...