Postmaster Mailbox script not running properly

Moderator: crythias

Post Reply
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Postmaster Mailbox script not running properly

Post by pradeepspa »

Folks,

I have OTRS 3 installed and running. I am getting tickets from nms server. The issue here is on crontab, I see postmastermailbox script running every minute. But watching the running process for a while, I see the same "PostMasterMailbox.pl" process is holding/running more than 1 minute. In log, I see this
NOTICE: PostMasterMailbox.pl is already running (use '-f 1' if you want to start it forced)!
.

When I stop nms server which is sending alarms through email, I see the "PostmasterMailbox.pl" is running with different process-id , each minute. Why the same process is holding more than 1 minute when it tries to process the ticket? Is there anywhere in configuration I could optimize this setting?
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Postmaster Mailbox script not running properly

Post by jojo »

the NMS mail seems somehow wrongly formatted, check it. Also you should update to the latest version of OTRS as OTRS 3x is not supported and a lot of changes were made over the years (also in mail processing)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Postmaster Mailbox script not running properly

Post by pradeepspa »

Thanks for the response. If you say nms mail is wrongly formatted, what exactly should I check ? Sorry if my question sounds trivial.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Postmaster Mailbox script not running properly

Post by jojo »

Character Sets and encodings (especially in the Subject)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Postmaster Mailbox script not running properly

Post by pradeepspa »

It was working fine suntill yesterday. There were no change in the character set from nms. I am not saying it doesnt work but postmastermailbox script takes lot of time to process it. However when I run "fetchmail" i see all the mail getting processed. Is there a difference in a way fetchmail and postmastermailbox.pl works?
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Postmaster Mailbox script not running properly

Post by pradeepspa »

Looking at the put of postmastermailbox.pl script,
POP3: Message 99/466 (nms/192.168.199.124)
POP3: Safety protection waiting 3 seconds till processing next mail...

POP3: Message 100/466 (nms/192.168.199.124)
POP3: Safety protection wa

Its getting stuck for sometime. Meanwhile the mails are getting accumulated taking hours to process the ticket. Any reason why this script not processing the ticket fast enough?
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Postmaster Mailbox script not running properly

Post by jojo »

you should switch to send mails to the otrs server direct instead of polling a mailbox (which is much faster)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Postmaster Mailbox script not running properly

Post by pradeepspa »

I am newbiew to email system. Will sendmail be in part of cronjob?
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Postmaster Mailbox script not running properly

Post by jojo »

No. The mailing system is part of the Linux box. You Linux Sysadmin should be able to help
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Postmaster Mailbox script not running properly

Post by pradeepspa »

Thanks for your response. After digging further, I found all configuration looks normal on OTRS, However the mails sent by nms was way too high for OTRS to process. Once fixing that, I see OTRS working as intended. I realized the version running 3.2 was too old so I have upgraded it to version 5. Everything looks fine so far. Whereas I am sure I miss something silly here.

Jun 13 11:59:15 otrs OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-06[3089]: [Notice][Kernel::System::PID::PIDCreate] Can't create PID Maint::PostMaster::MailAccountFetch, because it's already running (test-otrs.bxi.lan/27891)!
Jun 13 11:59:15 otrs OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-06[3089]: [Error][Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError][Line:51]: There was an error executing Execute() in Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch: Error: Unable to register the process in the database. Is another instance still running?
You can use --force-pid to override this check.



I was trying to find the process of Postmastermailbox but it isnt there. Comparing otrs 3 , 5 got all the cronjob scripts integerated into daemon process. So anyway I could kill the specific process and start?
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Postmaster Mailbox script not running properly

Post by pradeepspa »

I found the issue. There was a old process id in dataabase causing this conflict. Deleting it fixed the issue and I see tickets coming in. Just one more concern.

When I delete the process, Postmaster creates its new process but with older hostname which I have used for testing. I have changed my hostname in system but not sure where to change for the database to see.
+-------------------------------------+------------+-------------------+----------------+----------------+
| process_name | process_id | process_host | process_create | process_change |
+-------------------------------------+------------+-------------------+----------------+----------------+
| Maint::PostMaster::MailAccountFetch | 3618 | test-otrs.xxxx | 1497356102 | 1497356102 |
+-------------------------------------+------------+-------------------+----------------+----------------+
it should be "otrs.xxx"
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Postmaster Mailbox script not running properly

Post by reneeb »

Did you restart the daemon?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: Postmaster Mailbox script not running properly

Post by pradeepspa »

Yes. I saw after a file I found no entry and its working like normal. Thanks for supporting.
Post Reply