Author Topic: Upgrading server from 4.2 to 5.0: errors in redis blocking setup of zentyal-core  (Read 723 times)

cynthb

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +1/-0
    • View Profile
Hello!

I am using a Zentyal server as my firewall (2 NICs), and have been running version 4.2 (development) successfully for a while. I have got as far as most of the packages being upgraded to 5.0, however the upgrade fails on zentyal-core because of errors with redis. I have tried manually restarting redis-server which doesn't help. /etc/redis/redis.conf does not require a password. What should I do to fix the installation problem?

Here is the output from the command line:

Code: [Select]
root@tutone:/usr/share/perl5/EBox/Config# dpkg --configure -a
Setting up zentyal-core (5.0.7) ...
Reconnecting to redis server (1 try)... at /usr/share/perl5/EBox/Config/Redis.pm line 476.
Reconnecting to redis server (2 try)... at /usr/share/perl5/EBox/Config/Redis.pm line 476.
Reconnecting to redis server (3 try)... at /usr/share/perl5/EBox/Config/Redis.pm line 476.
Reconnecting to redis server (4 try)... at /usr/share/perl5/EBox/Config/Redis.pm line 476.
Redis command 'get version' failed: [get] NOAUTH Authentication required.,  at /usr/share/perl5/EBox/Config/Redis.pm line 453.
dpkg: error processing package zentyal-core (--configure):
 subprocess installed post-installation script returned error exit status 29
dpkg: dependency problems prevent configuration of zentyal-software:
 zentyal-software depends on zentyal-core (>= 5.0); however:
  Package zentyal-core is not configured yet.
 zentyal-software depends on zentyal-core (<< 5.1); however:
  Package zentyal-core is not configured yet.

dpkg: error processing package zentyal-software (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-antivirus:
 zentyal-antivirus depends on zentyal-core (>= 5.0); however:
  Package zentyal-core is not configured yet.
 zentyal-antivirus depends on zentyal-core (<< 5.1); however:
  Package zentyal-core is not configured yet.

dpkg: error processing package zentyal-antivirus (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-openvpn:
 zentyal-openvpn depends on zentyal-core (>= 5.0); however:
  Package zentyal-core is not configured yet.
 zentyal-openvpn depends on zentyal-core (<< 5.1); however:
  Package zentyal-core is not configured yet.
 zentyal-openvpn depends on zentyal-core; however:
  Package zentyal-core is not configured yet.

dpkg: error processing package zentyal-openvpn (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-firewall:
 zentyal-firewall depends on zentyal-core (>= 5.0); however:
  Package zentyal-core is not configured yet.
 zentyal-firewall depends on zentyal-core (<< 5.1); however:
  Package zentyal-core is not configured yet.
 zentyal-firewall depends on zentyal-core; however:
  Package zentyal-core is not configured yet.

dpkg: error processing package zentyal-firewall (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-ca:
 zentyal-ca depends on zentyal-core (>= 5.0); however:
  Package zentyal-core is not configured yet.
 zentyal-ca depends on zentyal-core (<< 5.1); however:
  Package zentyal-core is not configured yet.

dpkg: error processing package zentyal-ca (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-dhcp:
 zentyal-dhcp depends on zentyal-core (>= 5.0); however:
  Package zentyal-core is not configured yet.
 zentyal-dhcp depends on zentyal-core (<< 5.1); however:
  Package zentyal-core is not configured yet.
 zentyal-dhcp depends on zentyal-firewall; however:
  Package zentyal-firewall is not configured yet.
 zentyal-dhcp depends on zentyal-core; however:
  Package zentyal-core is not configured yet.

dpkg: error processing package zentyal-dhcp (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-ntp:
 zentyal-ntp depends on zentyal-core (>= 5.0); however:
  Package zentyal-core is not configured yet.
 zentyal-ntp depends on zentyal-core (<< 5.1); however:
  Package zentyal-core is not configured yet.
 zentyal-ntp depends on zentyal-firewall; however:
  Package zentyal-firewall is not configured yet.

dpkg: error processing package zentyal-ntp (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-network:
 zentyal-network depends on zentyal-core (>= 5.0); however:
  Package zentyal-core is not configured yet.
 zentyal-network depends on zentyal-core (<< 5.1); however:
  Package zentyal-core is not configured yet.

dpkg: error processing package zentyal-network (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-services:
 zentyal-services depends on zentyal-network; however:
  Package zentyal-network is not configured yet.

dpkg: error processing package zentyal-services (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-dns:
 zentyal-dns depends on zentyal-core (>= 5.0); however:
  Package zentyal-core is not configured yet.
 zentyal-dns depends on zentyal-core (<< 5.1); however:
  Package zentyal-core is not configured yet.
 zentyal-dns depends on zentyal-firewall; however:
  Package zentyal-firewall is not configured yet.

dpkg: error processing package zentyal-dns (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of zentyal-objects:
 zentyal-objects depends on zentyal-network; however:
  Package zentyal-network is not configured yet.

dpkg: error processing package zentyal-objects (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 zentyal-core
 zentyal-software
 zentyal-antivirus
 zentyal-openvpn
 zentyal-firewall
 zentyal-ca
 zentyal-dhcp
 zentyal-ntp
 zentyal-network
 zentyal-services
 zentyal-dns
 zentyal-objects
root@tutone:/usr/share/perl5/EBox/Config#

cynthb

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +1/-0
    • View Profile
Never mind; blew the thing away and went with a fresh 5.0 install.

trysomething

  • Zen Warrior
  • ***
  • Posts: 119
  • Karma: +5/-0
  • Founder of The Tiki Lab
    • View Profile
    • The Tiki Lab | Bridging the gap between technology and vision impairment!
I love how people ask these questions and give absolutely no solution.
This is another example of why it is imperative that people run updates and upgrades through the Zentyal web interface.
APT and DPKG don't know how to handle certain Zentyal specific configurations.
Take into consideration that 5 doesn't have OpenChange at all, it's 100% Sogo and that's it - some things just won't fly.
So first of all just read all of the release notes prior to upgrading things.
Secondly let's not forget to read the directions (at least skim through them) for the server software we are using - since it's a best practice kind of thing to know what we're working with.
Third I'd like to bring to the forground that Zentyal uses stubs and hooks, these are specific to Zentyal and have absolutely nothing to do with Ubuntu or DPKG or APT, thusly if you use the terminal to administer Zentyal you invite corrupted files and all sorts of other funtastic issues.  Via use of the Zentyal GUI you get to take advantage of things like Hooks that tell APT or DPKG to stop a service and set something to a certain state prior to upgrading therefore you don't get issues like this thread mentions.
If you found this thread because you already made the same mistakes as the author did then you may be allright still.  If you uninstall the packages you'd already screwed up OR roll them back to the working version you can then hit up the GUI and do a proper upgrade/update.
You will have to excuse my posts not having actual links in them.  I'm blind and can never find that insert hyperlink button LoL.  If you, or someone you know has vision problems check out The Tiki Lab.

cynthb

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +1/-0
    • View Profile
I love how people ask these questions and give absolutely no solution.
This is another example of why it is imperative that people run updates and upgrades through the Zentyal web interface.

1. I did not say it in my original post, but the Zentyal web interface crashed on me, therefore I started mucking around with apt and dpkg.

2. I did not post a solution because I did not find a solution other than wiping and reinstalling from scratch. Complaining about someone posting and looking for help does not help anyone, it just makes people less likely to post questions in the future.

covex

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +1/-1
    • View Profile
Even thou this is old topic, I have the same problem. I did a test install of 3.5 and tried if I am able to upgrade to later version. 4.0 was fine, but during upgrade to 5.0 from web interface if ended with Zentyal upgrade failed. The problem is that zentyal-core is not properly configured at time when the package is installed. It fails to reach redis. As far as I can tell, this is a problem related to conversion to systemd. During redis installation the redis is started by the unit "consumes" the port 6379  or something and zentyal starts the redis on 6380, but the core package update is not able to use the redis on different port, at least I saw several times the redis started at 6380. Even thou I changed it to 6379 and disabled the unit and started it manualy the zentyal-core is not able to finish the reconfiguration.  The next problem seems authentication - zentyal-core is probably not able to authenticated to redis during install.
Code: [Select]
ebox.redis stop/waiting
Stopping redis-server: redis-server.
cp: cannot create regular file ‘/var/lib/redis/dump.rdb’: No such device or address
Starting redis-server: redis-server.
 * Stopping Zentyal module: printers
   ...done.
mv: cannot stat ‘/etc/zentyal/stubs’: No such file or directory

Upgrading from Ubuntu 14.04 to 16.04 with Zentyal 5.0...
Preparing to unpack .../redis-server_2%3a3.0.6-1ubuntu0.4_amd64.deb ...
/usr/sbin/invoke-rc.d: 1: /usr/sbin/invoke-rc.d: /sbin/runlevel: not found
invoke-rc.d: could not determine current runlevel
Stopping redis-server: redis-server.
Unpacking redis-server (2:3.0.6-1ubuntu0.4) over (2:2.8.4-2ubuntu0.2) ...
dpkg: warning: unable to delete old directory '/var/log/redis': Directory not empty
dpkg: warning: unable to delete old directory '/var/lib/redis': Directory not empty

Setting up zentyal-core (5.0.14) ...
Installing new version of config file /etc/cron.daily/zentyal ...
Installing new version of config file /etc/logrotate.d/zentyal-core ...

Configuration file '/etc/zentyal/core.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
 ==> Keeping old config file as default.

Configuration file '/etc/zentyal/hooks/template.postsetconf'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
 ==> Keeping old config file as default.
Installing new version of config file /etc/zentyal/zentyal.conf ...
Could not connect to Redis server at 127.0.0.1:6379: Connection refused at /usr/share/perl5/EBox/Config/Redis.pm line 511.
dpkg: error processing package zentyal-core (--configure):
 subprocess installed post-installation script returned error exit status 111


Whatever is causing this is preveting the smooth 4.x->5.x upgrade.  I tried to start the redis server manually same way as it was started at 4.0 (sudo -u ebox redis-server /var/lib/zentyal/conf/redis.conf) but the dpkg --configure -a is stuck forever, the zentyal GUI is unreachable as it is not configured/working.
« Last Edit: August 08, 2019, 10:57:48 pm by covex »

covex

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +1/-1
    • View Profile
What helped to me now - hard reboot, after upgrade to systemd formal upstart system, the system can not reboot thru systemd.

After that I remove the requirepass directive in /var/lib/zentyal/conf/redis.conf otherwise I got:
Code: [Select]
dpkg --configure zentyal-core
Setting up zentyal-core (5.0.14) ...
Reconnecting to redis server (1 try)... at /usr/share/perl5/EBox/Config/Redis.pm line 476.
Reconnecting to redis server (2 try)... at /usr/share/perl5/EBox/Config/Redis.pm line 476.
Reconnecting to redis server (3 try)... at /usr/share/perl5/EBox/Config/Redis.pm line 476.
Reconnecting to redis server (4 try)... at /usr/share/perl5/EBox/Config/Redis.pm line 476.
Redis command 'get version' failed: [get] NOAUTH Authentication required.,  at /usr/share/perl5/EBox/Config/Redis.pm line 453.
dpkg: error processing package zentyal-core (--configure):
 subprocess installed post-installation script returned error exit status 29
Errors were encountered while processing:
 zentyal-core

manually started redis with the zentyal config and re configured dpkg... it complained about upstart, but at least moved on:
Code: [Select]
dpkg --configure zentyal-core
Setting up zentyal-core (5.0.14) ...
Synchronizing state of zentyal.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable zentyal
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'lxdm' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `lxdm'
insserv: Default-Stop  undefined, assuming empty stop  runlevel(s) for script `lxdm'
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'lxdm' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `lxdm'
insserv: Default-Stop  undefined, assuming empty stop  runlevel(s) for script `lxdm'
Processing triggers for zentyal-core (5.0.14) ...
 * Restarting Zentyal module: webadmin                                   [ OK ]
 * Restarting Zentyal module: logs                                       [ OK ]

then you have to manually stop services like bind, samba etc. that were started by systemd at boot to continue with reconfiguration of packages... but still not there to start everything OK.... TBC.

Good luck.

covex

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +1/-1
    • View Profile
The final notice - the Z5.0 seems to use the default redis installation and config - if failed during install clean the /var/lib/redis/ and copy there a DB dump from /var/lib/zentyal/dump.rdb chown redis:redis and you are good to go.