Author Topic: Zentyal 5.0 mail not working after reboot  (Read 5625 times)

MrZANE

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Zentyal 5.0 mail not working after reboot
« on: December 07, 2016, 01:51:25 pm »
Hi
After downloading the newly released Zentyal 5.0 and installing it (Samba,AD,Mail,DNS,CA) on a virtual machine for trying out everything seems to work as it should. A virtual mail domain was created and also one user.
Everything (fileshare, MAPI, webmail, POP3, activesync etc.) was tested to work as it should.
No other changes to the newly installed system was done.

Also worth mentioning that the network card was set up with DHCP (An IP was reserved so the the VM always gets the same IP) and through that it gets another DNS server (Than it's own).

After the first reboot the mail wont ever start up again.

Any ideas what could cause this?
Kind regards
Jimmy

MrZANE

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #1 on: December 09, 2016, 11:52:44 am »
An update (As a separate post to be more visible for others facing this problem):

It seems that changing the network card from using DHCP to instead use static IP fixes the problem.
I don't know why but since we're going to use static IP in the real deployment anyway it doesn't really matter to me.

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #2 on: December 09, 2016, 05:39:17 pm »
I have noticed similar behavior in my testing.   It would appear the dovecot service is not restarting on reboot.  Does performing
Code: [Select]
sudo systemctl start dovcotcause things to start working again for you?

MrZANE

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #3 on: December 13, 2016, 09:46:53 am »
Hi half_life
Thanks for the suggestion.
Code: [Select]
sudo systemctl start dovecotalone didn't work but if if followed up with
Code: [Select]
sudo systemctl start postfixit started.
It would be great if this could be fixed in the relevant component(s).

Ps. Pressing the mail service (re)start button didn't work either.

MrZANE

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #4 on: December 13, 2016, 11:49:39 am »
Hmmm. The issue might be fixed in one of the last zentyal component updates, but I'm not 100% sure since it's not the same VM (This one has 2 NICs, both DHCP though)  and another 59 Ubuntu updates where also installed. But I'm quite sure mail didn't work at startup on this VM before.

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #5 on: December 14, 2016, 04:11:24 am »
You didn't happen to disable "retrieve mail for external accounts" ,  did you? Turning this feature on in my test system causes the mail service not start.

Code: [Select]
2016/12/13 21:04:09 INFO> LDAP.pm:304 EBox::Module::LDAP::waitForLDAPObject - Waiting for schema object present: CN=userZentyalMail,CN=Schema,CN=Configuration,DC=idoubtit,DC=net                                                           
2016/12/13 21:04:09 INFO> LDAP.pm:304 EBox::Module::LDAP::waitForLDAPObject - Waiting for schema object present: CN=vdZentyalMail,CN=Schema,CN=Configuration,DC=idoubtit,DC=net                                                             
2016/12/13 21:04:13 ERROR> GlobalImpl.pm:659 EBox::GlobalImpl::saveAllModules - Failed to save changes in module mail: Can't locate object method "throw" via package "Can't locate object method "fetchmailMustRun" via package "EBox::Mail::FetchmailLdap" at /usr/share/perl5/EBox/Mail/FetchmailLdap.pm line 443.                                                                                                                                                                     
" (perhaps you forgot to load "Can't locate object method "fetchmailMustRun" via package "EBox::Mail::FetchmailLdap" at /usr/share/perl5/EBox/Mail/FetchmailLdap.pm line 443.                                                               
"?) at /usr/share/perl5/EBox/Module/Base.pm line 238.                                                                                                                                                                                       
2016/12/13 21:04:13 INFO> Base.pm:231 EBox::Module::Base::save - Restarting service for module: logs                                                                                                                                         
2016/12/13 21:04:14 ERROR> GlobalImpl.pm:734 EBox::GlobalImpl::saveAllModules - The following modules failed while saving their changes, their state is unknown: mail  at The following modules failed while saving their changes, their state is unknown: mail  at /usr/share/perl5/EBox/GlobalImpl.pm line 734                                                                                                                                                                         
EBox::GlobalImpl::saveAllModules('EBox::GlobalImpl=HASH(0x5eb3e50)', 'progress', 'EBox::ProgressIndicator=HASH(0x5e51270)') called at /usr/share/perl5/EBox/Global.pm line 95                                                               
EBox::Global::AUTOLOAD('EBox::Global=HASH(0x5e695d0)', 'progress', 'EBox::ProgressIndicator=HASH(0x5e51270)') called at /usr/share/zentyal/global-action line 32                                                                             
eval {...} at /usr/share/zentyal/global-action line 30     

Seems to be a missing module dependency.

The feature doesn't matter much to me as I was just using it to keep the test machine in sync with the live email service.  I don't actually use it in production.

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: Zentyal 5.0 mail not working after reboot
« Reply #6 on: December 14, 2016, 04:48:50 pm »
The error when enabling "retrieve mail for external accounts" is already fixed in zentyal-mail 5.0.1
Zentyal Server Lead Developer

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #7 on: December 14, 2016, 11:01:29 pm »
Unfortunately mail 5.0.1 did not fix my situation concerning external accounts.  Should I completely remove the module then reinstall it?

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: Zentyal 5.0 mail not working after reboot
« Reply #8 on: December 15, 2016, 12:43:57 am »
Unfortunately mail 5.0.1 did not fix my situation concerning external accounts.  Should I completely remove the module then reinstall it?

Very strange, could you please check /var/log/zentyal/zentyal.log to see the error? It must be a different one this time... Thanks!
Zentyal Server Lead Developer

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #9 on: December 15, 2016, 02:10:00 am »
The error changed but the results are a little ambiguous.
zentyal log
Code: [Select]
2016/12/14 15:49:04 ERROR> Service.pm:962 EBox::Module::Service::restartService - Error restarting service: root command systemctl start 'fetchmail' failed.
Error output: Job for fetchmail.service failed because the control process exited with error code. See "systemctl status fetchmail.service" and "journalctl -xe" for details.

Command output: .
Exit value: 1
2016/12/14 15:49:04 ERROR> Service.pm:964 EBox::Module::Service::restartService - root command systemctl start 'fetchmail' failed.
2016/12/14 15:49:04 ERROR> RestartService.pm:61 EBox::SysInfo::CGI::RestartService::_process - Restart of Mail from dashboard failed: root command systemctl start 'fetchmail' failed.
Error output: Job for fetchmail.service failed because the control process exited with error code. See "systemctl status fetchmail.service" and "journalctl -xe" for details.



(journalctl output)
Code: [Select]
Dec 14 18:56:21 zentyal5 sudo[24463]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 14 18:56:21 zentyal5 systemd[1]: Starting LSB: init-Script for system wide fetchmail daemon...
-- Subject: Unit fetchmail.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit fetchmail.service has begun starting up.
Dec 14 18:56:21 zentyal5 fetchmail[24466]: /etc/zentyal-fetchmail.rc: 6: /etc/zentyal-fetchmail.rc: poll: not found
Dec 14 18:56:21 zentyal5 fetchmail[24466]: /etc/zentyal-fetchmail.rc: 7: /etc/zentyal-fetchmail.rc: user: not found
Dec 14 18:56:21 zentyal5 systemd[1]: fetchmail.service: Control process exited, code=exited status=127
Dec 14 18:56:21 zentyal5 systemd[1]: Failed to start LSB: init-Script for system wide fetchmail daemon.
-- Subject: Unit fetchmail.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit fetchmail.service has failed.
--
-- The result is failed.
Dec 14 18:56:21 zentyal5 systemd[1]: fetchmail.service: Unit entered failed state.
Dec 14 18:56:21 zentyal5 systemd[1]: fetchmail.service: Failed with result 'exit-code'.
Dec 14 18:56:21 zentyal5 sudo[24463]: pam_unix(sudo:session): session closed for user root
Dec 14 18:56:21 zentyal5 sudo[24477]: PAM unable to dlopen(pam_cap.so): /lib/security/pam_cap.so: cannot open shared object file: No such file or directory
Dec 14 18:56:21 zentyal5 sudo[24477]: PAM adding faulty module: pam_cap.so


The pam_cap.so error repeats continously.  The problem doesn't assert itself until fetchmail is turned on.  If you need insitu access Jose,  just email me.  It can be arranged.

MrZANE

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #10 on: December 15, 2016, 10:23:11 am »
Hi again.
I didn't disable the external accounts, it was disabled (Or rather wasn't enabled) after install.
Like Jose says it seems there is more than one problem here.

Ps. I've installed mail component v.5.0.1 and all seems to work as it should (Haven't tried to change the NIC to DHCP and rebooting though)

You didn't happen to disable "retrieve mail for external accounts" ,  did you? Turning this feature on in my test system causes the mail service not start.

Code: [Select]
2016/12/13 21:04:09 INFO> LDAP.pm:304 EBox::Module::LDAP::waitForLDAPObject - Waiting for schema object present: CN=userZentyalMail,CN=Schema,CN=Configuration,DC=idoubtit,DC=net                                                           
2016/12/13 21:04:09 INFO> LDAP.pm:304 EBox::Module::LDAP::waitForLDAPObject - Waiting for schema object present: CN=vdZentyalMail,CN=Schema,CN=Configuration,DC=idoubtit,DC=net                                                             
2016/12/13 21:04:13 ERROR> GlobalImpl.pm:659 EBox::GlobalImpl::saveAllModules - Failed to save changes in module mail: Can't locate object method "throw" via package "Can't locate object method "fetchmailMustRun" via package "EBox::Mail::FetchmailLdap" at /usr/share/perl5/EBox/Mail/FetchmailLdap.pm line 443.                                                                                                                                                                     
" (perhaps you forgot to load "Can't locate object method "fetchmailMustRun" via package "EBox::Mail::FetchmailLdap" at /usr/share/perl5/EBox/Mail/FetchmailLdap.pm line 443.                                                               
"?) at /usr/share/perl5/EBox/Module/Base.pm line 238.                                                                                                                                                                                       
2016/12/13 21:04:13 INFO> Base.pm:231 EBox::Module::Base::save - Restarting service for module: logs                                                                                                                                         
2016/12/13 21:04:14 ERROR> GlobalImpl.pm:734 EBox::GlobalImpl::saveAllModules - The following modules failed while saving their changes, their state is unknown: mail  at The following modules failed while saving their changes, their state is unknown: mail  at /usr/share/perl5/EBox/GlobalImpl.pm line 734                                                                                                                                                                         
EBox::GlobalImpl::saveAllModules('EBox::GlobalImpl=HASH(0x5eb3e50)', 'progress', 'EBox::ProgressIndicator=HASH(0x5e51270)') called at /usr/share/perl5/EBox/Global.pm line 95                                                               
EBox::Global::AUTOLOAD('EBox::Global=HASH(0x5e695d0)', 'progress', 'EBox::ProgressIndicator=HASH(0x5e51270)') called at /usr/share/zentyal/global-action line 32                                                                             
eval {...} at /usr/share/zentyal/global-action line 30     

Seems to be a missing module dependency.

The feature doesn't matter much to me as I was just using it to keep the test machine in sync with the live email service.  I don't actually use it in production.

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: Zentyal 5.0 mail not working after reboot
« Reply #11 on: December 17, 2016, 10:53:07 am »
I hope zentyal-mail 5.0.2 has the definitve fix for the fetchmail problems. Thanks for your feedback and patience.

If upgrading from zentyal-mail 5.0.1 instead of doing fresh install, you will probably need to manually edit /etc/default/fetchmail and set START_DAEMON=no
« Last Edit: December 17, 2016, 03:49:23 pm by J. A. Calvo »
Zentyal Server Lead Developer

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #12 on: December 17, 2016, 09:14:16 pm »
5.0.2 mail fixed the external mail fetch problem.  I did need to edit the /etc/default/fetchmail daemon settings as you described. 

zentyal-sogo

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Zentyal 5.0 mail not working after reboot
« Reply #13 on: December 20, 2016, 01:51:55 pm »
Is version 5.0.2 already publicly available? Zentyal says 5.0.1 is up-to-date.

J. A. Calvo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1986
  • Karma: +67/-3
    • View Profile
    • http://blogs.zentyal.org/jacalvo
Re: Zentyal 5.0 mail not working after reboot
« Reply #14 on: December 21, 2016, 01:34:35 am »
Is version 5.0.2 already publicly available? Zentyal says 5.0.1 is up-to-date.

Yes, zentyal-mail 5.0.2 is publicly available since December 17
Zentyal Server Lead Developer