Author Topic: The following modules failed while saving their changes, their state is unknown:  (Read 8797 times)

sspeed

  • Zen Apprentice
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
Pulling my hair out on this.  Here are the contents of my zentyal.log when trying to save some network objects and getting the error, "The following modules failed while saving their changes, their state is unknown: dns"

2017/05/22 10:18:25 INFO> GlobalImpl.pm:625 EBox::GlobalImpl::saveAllModules - Saving config and restarting services: network dns firew
all dhcp
2017/05/22 10:18:25 INFO> Base.pm:231 EBox::Module::Base::save - Restarting service for module: network
2017/05/22 10:18:28 INFO> Base.pm:231 EBox::Module::Base::save - Restarting service for module: dns
2017/05/22 10:18:31 INFO> DNS.pm:91 EBox::DNS::appArmorProfiles - Setting DNS apparmor profile
2017/05/22 10:18:34 ERROR> Sudo.pm:240 EBox::Sudo::_rootError - root command nsupdate -g -t 10 /var/lib/zentyal/tmp/Mit5dhpoCG failed.
Error output: update failed: REFUSED

Command output: .
Exit value: 2 at root command nsupdate -g -t 10 /var/lib/zentyal/tmp/Mit5dhpoCG failed.
Error output: update failed: REFUSED

Command output: .
Exit value: 2 at /usr/share/perl5/EBox/Sudo.pm line 240
EBox::Sudo::_rootError('/usr/bin/sudo -p sudo: /var/lib/zentyal/tmp/t1vPYvpDTh.cmd 2> /var/lib/zentyal/tmp/stderr', 'nsupdate -g -t 10
/var/lib/zentyal/tmp/Mit5dhpoCG', 512, 'ARRAY(0x7bac828)', 'ARRAY(0x47dbb40)') called at /usr/share/perl5/EBox/Sudo.pm line 210
EBox::Sudo::_root(1, 'nsupdate -g -t 10 /var/lib/zentyal/tmp/Mit5dhpoCG') called at /usr/share/perl5/EBox/Sudo.pm line 153
EBox::Sudo::root('nsupdate -g -t 10 /var/lib/zentyal/tmp/Mit5dhpoCG') called at /usr/share/perl5/EBox/DNS.pm line 923
EBox::DNS::_postServiceHook('EBox::DNS=HASH(0x78e3450)', 1) called at /usr/share/perl5/EBox/Module/Service.pm line 941
EBox::Module::Service::_regenConfig('EBox::DNS=HASH(0x78e3450)') called at /usr/share/perl5/EBox/Module/Base.pm line 234
eval {...} at /usr/share/perl5/EBox/Module/Base.pm line 233
EBox::Module::Base::save('EBox::DNS=HASH(0x78e3450)') called at /usr/share/perl5/EBox/GlobalImpl.pm line 657
eval {...} at /usr/share/perl5/EBox/GlobalImpl.pm line 656
EBox::GlobalImpl::saveAllModules('EBox::GlobalImpl=HASH(0x6af1170)', 'progress', 'EBox::ProgressIndicator=HASH(0x6aa8b18)') called at /
usr/share/perl5/EBox/Global.pm line 95
EBox::Global::AUTOLOAD('EBox::Global=HASH(0x6a8dc98)', 'progress', 'EBox::ProgressIndicator=HASH(0x6aa8b18)') called at /usr/share/zent
yal/global-action line 32
eval {...} at /usr/share/zentyal/global-action line 30
2017/05/22 10:18:34 ERROR> GlobalImpl.pm:661 EBox::GlobalImpl::saveAllModules - Failed to save changes in module dns: root command nsup
date -g -t 10 /var/lib/zentyal/tmp/Mit5dhpoCG failed.
Error output: update failed: REFUSED

Command output: .
Exit value: 2
2017/05/22 10:18:34 INFO> Base.pm:231 EBox::Module::Base::save - Restarting service for module: dhcp
2017/05/22 10:18:35 ERROR> GlobalImpl.pm:736 EBox::GlobalImpl::saveAllModules - The following modules failed while saving their changes
, their state is unknown: dns  at The following modules failed while saving their changes, their state is unknown: dns  at /usr/share/p
erl5/EBox/GlobalImpl.pm line 736
EBox::GlobalImpl::saveAllModules('EBox::GlobalImpl=HASH(0x6af1170)', 'progress', 'EBox::ProgressIndicator=HASH(0x6aa8b18)') called at /
usr/share/perl5/EBox/Global.pm line 95
EBox::Global::AUTOLOAD('EBox::Global=HASH(0x6a8dc98)', 'progress', 'EBox::ProgressIndicator=HASH(0x6aa8b18)') called at /usr/share/zent
yal/global-action line 32
eval {...} at /usr/share/zentyal/global-action line 30
scottz@zentyal:/var/log/zentyal$ nsupdate -g -t 10 /var/lib/zentyal/tmp/Mit5dhpoCG
could not open '/var/lib/zentyal/tmp/Mit5dhpoCG': permission denied
scottz@zentyal:/var/log/zentyal$ sudo nsupdate -g -t 10 /var/lib/zentyal/tmp/Mit5dhpoCG
update failed: REFUSED

sspeed

  • Zen Apprentice
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
It appears like this might be related to the DNS account for Zentyal to dynamically update records on the domain.  On my machine it's dns-zentyal (don't know if I named it that).  How can I reset the AD password in Zentyal's configuration for this account?  I know how to reset it on the domain. 

Or maybe I'm going down a rabbit hole?

jclendineng

  • Guest
Always been an issue.  When I was running this I just either rebooted and it worked fine, or removed and reapplied the problem module.  If you want a real server that's actually stable id humbly recommend nethserver.  Centos is like the older wiser more stable cousin of debian :D  I was pretty active on here but I was always having issues like what you are having and as much as I enjoy tinkering and fixing stuff the other people in my place just wanted the internet up...but back to the issue, Remove the module, reboot, try again.  You will get a failed to apply error about half the time, I found It works fine though but your mileage may vary.

sspeed

  • Zen Apprentice
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
Thanks for the reply, that's what I ended up doing and it seems to be working.  Thanks also for the suggestion on nethserver, I'll check it out.

sspeed

  • Zen Apprentice
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
Looking at nethserver now, does it have built-in AD support like zentyal or is it a user-installed and configured option?

jclendineng

  • Guest
It has ldap as well as ad depending on what you need...works good.  I have it set up, and another server running freenas connected to the ad as well as my pc's.  It will run for months without you touching it, I try to reboot weekly for updates but its stable.  Minor quirks such as if you have multiple domains and sites like me you need to manually set up vhosts in apache but thats ez pz once youve done it once. 

jclendineng

  • Guest
Im not trying to hijack this though, I used zentyal for 2 generations of it, and have a love for ubuntu just because its so dang easy to use and documentation is just fantastic.  I have ubuntu vm running in freenas to run random game servers, but in MY PERSONAL experience, I could not make zentyal stable for my needs, though thats definitely my problem.  The other issue is that the forums here are pretty dead, maybe one or two guys come on to give help so its hard to get community support when issues like this arise. 

jstammi

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
The few times I tried to get support using the forums here, I did not receive any help. So I agree with that statement. I hope someone convinces me of the opposite. As I personally prefer ubuntu  for the same reasons as already said, too.


Concerning the issue: I did not find a good solution for this, it is still an issue for me.

And it is tracked by a bug report, too:

https://tracker.zentyal.org/issues/5257

sspeed

  • Zen Apprentice
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
Ahh, thank you for that.  I had looked through the bug tracker and missed it.  I ran an apt-get install again and it appears to have fixed it for now.  It's sad that the forums are so dead.  Good product overall, but with no support it's a bummer.

jstammi

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Sounds promising: could you please provide what you did exactly?

sspeed

  • Zen Apprentice
  • *
  • Posts: 22
  • Karma: +1/-0
    • View Profile
Yeah, I basically just ran:

sudo apt-get install

sudo apt-get update

sudo apt-get upgrade

It worked, I guess because it probably restored a file that was messed up. We'll see if it keeps working.