Author Topic: [SOLVED] Migration error while upgrading packages to version 2.2  (Read 5773 times)

gandalfmagic

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +1/-0
    • View Profile
[SOLVED] Migration error while upgrading packages to version 2.2
« on: November 26, 2011, 02:25:48 am »
Hi, I'm trying to migrate 2 zentyal servers in master/slave configuration.
I'm using the last version of the migration script.

The master upgrade went fine, and it's working.
The slave (mail/web server), returned an error during the new packages installation.

It seems the problem is in post installation script from the zentyal-core package.
Can someone look at this?

I've attached the log from the console.

Thanks.
« Last Edit: April 01, 2012, 10:31:58 pm by gandalfmagic »

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #1 on: November 28, 2011, 06:05:08 pm »
I just had a go on my own server and had exactly the same problem although I only have a server in standalone mode.

After restarting I see the server itself is up and apache2 is running, but I don't have an adminpage.

There are a few posts about not having an adminpage (https) after upgrade. Maybe some pointers from those who know where to look and at what logs?
« Last Edit: November 28, 2011, 06:29:13 pm by robb »

Escorpiom

  • Zen Hero
  • *****
  • Posts: 897
  • Karma: +25/-1
    • View Profile
Re: Migration error while upgrading packages to version 2.2
« Reply #2 on: November 29, 2011, 01:11:13 am »
gandalfmagic & robb,
There's not much I can say at this point, but please post the relevant lines from zentyal log.
Code: [Select]
/var/log/zentyal/zentyal.logApache2 is different from Zentyal apache, so probably that service is not running. Try
Code: [Select]
service zentyal apache statusand post the output.
At least we could try to determine a common source for the issue.

Cheers.
 
« Last Edit: November 29, 2011, 01:23:27 am by Escorpiom »
Marcus' Rule:
Blanks & capitals = avoid it and you'll avoid problems...

jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile
Re: Migration error while upgrading packages to version 2.2
« Reply #3 on: November 29, 2011, 06:20:27 am »
I bet you had something broken before the upgrade, zentyal-core postinst script fails, check /var/log/dpkg.log for that.

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #4 on: November 29, 2011, 12:26:40 pm »
I have this server on a VPS, and restored the backup from before I started the migration. I will have another go later today and post relevant logs.

gandalfmagic

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Re: Migration error while upgrading packages to version 2.2
« Reply #5 on: November 29, 2011, 02:08:13 pm »
I have this server on a VPS, and restored the backup from before I started the migration. I will have another go later today and post relevant logs.

Exactly the same situation here.
I will retry ASAP.

Thank you.

gandalfmagic

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Re: Migration error while upgrading packages to version 2.2
« Reply #6 on: November 30, 2011, 10:06:25 pm »
I've just retried with the mail server migration, and it worked this time.

I've created a new clone of my mail server for the the migration test (I've changed the IP, and blocked the communication with the master LDAP server to avoid problems)
Then I've runned the migration script and all went well.

Here is the new migration log, just where the first migration stopped:

Code: [Select]
Setting up zentyal-core (2.2.4) ...
Installing new version of config file /etc/init/ebox.event-daemon.conf ...
Installing new version of config file /etc/init/ebox.redis.conf ...
Installing new version of config file /etc/init/ebox.loggerd.conf ...
Installing new version of config file /etc/security/zentyal.conf ...
Installing new version of config file /etc/pam.d/zentyal ...
 * Restarting Zentyal module: apache                                     [ OK ]

Setting up zentyal-objects (2.2) ...

Setting up zentyal-services (2.2) ...

Setting up zentyal-network (2.2.3) ...
 * Restarting Zentyal module: network                                                                                                                                                                                                 [ OK ]

Setting up zentyal-firewall (2.2) ...
 * Restarting Zentyal module: firewall                                                                                                                                                                                                [ OK ]

Setting up zentyal-antivirus (2.2) ...

Setting up zentyal-ca (2.2.2) ...
 * Restarting Zentyal module: ca                                                                                                                                                                                                      [ OK ]

Setting up zentyal-dns (2.2.1) ...
Installing new version of config file /etc/init/ebox.bind9.conf ...
 * Restarting Zentyal module: dns                                                                                                                                                                                                     [ OK ]

Setting up zentyal-ebackup (2.2.2) ...

Setting up zentyal-users (2.2.4) ...
Installing new version of config file /etc/init/ebox.ad-pwdsync.conf ...
 * Restarting Zentyal module: users                                                                                                                                                                                                   [ OK ]

Setting up zentyal-mail (2.2.1) ...

Setting up zentyal-mailfilter (2.2) ...
Installing new version of config file /etc/init/ebox.learnspamd.conf ...

Setting up zentyal-ntp (2.2) ...
Installing new version of config file /etc/init/ebox.ntpd.conf ...
 * Restarting Zentyal module: ntp                                                                                                                                                                                                     [ OK ]

Setting up zentyal-software (2.2.2) ...

Setting up zentyal-webserver (2.2.2) ...
Installing new version of config file /etc/init/ebox.apache2-user.conf ...
Listening SSL port is empty.
Setting up zentyal-webmail (2.2) ...

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for zentyal-core ...
 * Restarting Zentyal module: apache                                     [ OK ]
 * Restarting Zentyal module: logs                                       [ OK ]
 * Restarting Zentyal module: events                                     [ OK ]
 * Stopping Zentyal module: webmail                                                                                                                                                                                                   [ OK ]
 * Stopping Zentyal module: mailfilter                                                                                                                                                                                                [ OK ]
 * Stopping Zentyal module: mail                                                                                                                                                                                                      [ OK ]
 * Stopping Zentyal module: webserver                                                                                                                                                                                                 [ OK ]
 * Stopping Zentyal module: users                                                                                                                                                                                                     [ OK ]
 * Stopping Zentyal module: ntp                                                                                                                                                                                                       [ OK ]
 * Stopping Zentyal module: logs                                                                                                                                                                                                      [ OK ]
 * Stopping Zentyal module: events                                                                                                                                                                                                    [ OK ]
 * Stopping Zentyal module: ebackup                                                                                                                                                                                                   [ OK ]
 * Stopping Zentyal module: dns                                                                                                                                                                                                       [ OK ]
 * Stopping Zentyal module: ca                                                                                                                                                                                                        [ OK ]
 * Stopping Zentyal module: audit                                                                                                                                                                                                     [ OK ]
 * Stopping Zentyal module: antivirus                                                                                                                                                                                                 [ OK ]
 * Stopping Zentyal module: firewall                                                                                                                                                                                                  [ OK ]
 * Stopping Zentyal module: network                                                                                                                                                                                                   [ OK ]
 * Stopping Zentyal module: apache                                                                                                                                                                                                    [ OK ]
Copying old ebox dirs to zentyal...
Importing old configuration...
Upgrading objects to new schema...
Upgrading ldap attributes (quotas from mail and users)...
Cannot restore slave machine when master is down: 192.168.1.247run-parts: ./post-upgrade/004_upgrade_ldap exited with return code 255
Adding quota objectclasses...
Creating new core tables...
Importing old quota config
Resetting data_version for all modules...
update-rc.d: warning: ebox start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: ebox stop runlevel arguments (none) do not match LSB Default-Stop values (0 1 6)
 Disabling system startup links for /etc/init.d/ebox ...

I've got an error for the LDAP upgrade, but it was expected, since the master was unreachable.

I've got a suspect: the first time I've done the migration, I've done it without reboot the server first.
Can it be that the script was not capable to handle the restart of apache server? ???



Thank you

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #7 on: December 02, 2011, 07:38:19 pm »
For me it didn't work a second time. What I do see is error messages about language settings not right. How do I fix those?
I attached the migrationlog. Maybe some bright mind can comment on that?

/edit: some diskspace issue maybe? If so, how can I fix this remotely? The server is a VPS. There is enough diskspace, but maybe one of the partitions is short of diskspace?

Code: [Select]
root@vps1744:/tmp/zentyal-migrate-2.0-to-2.2# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda2             50G  1.4G   46G   3% /
/dev                  247M  112K  247M   1% /dev
none                  247M     0  247M   0% /dev/shm
none                  247M  108K  247M   1% /var/run
none                  247M     0  247M   0% /var/lock
none                  247M     0  247M   0% /lib/init/rw
« Last Edit: December 02, 2011, 07:45:28 pm by robb »

gandalfmagic

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Re: Migration error while upgrading packages to version 2.2
« Reply #8 on: December 02, 2011, 08:54:03 pm »
Maybe you don't have the locales package installed, or maybe locale settings are wrong.

To resolve the warning you can try the following commands:
Code: [Select]
sudo apt-get install locales
sudo locale-gen en_US en_US.UTF-8 nl_NL nl_NL.UTF-8
sudo dpkg-reconfigure locales


Do you still have access to the /var/log/dpkg.log file?
I think is the only source of information to resolve the migration error, as posted by jsalamero.

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #9 on: December 02, 2011, 10:29:26 pm »
The locale issue is fixed with regenerating them.
I still get errormessages when zentyal-core is getting configured.

I attached the migrationlog from the point the errormessages are starting. That is when all zentyal 2.2 packages are already downloaded and zentyal-core gets configured. I also attached dpkg.log

gandalfmagic

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Re: Migration error while upgrading packages to version 2.2
« Reply #10 on: December 02, 2011, 11:50:18 pm »
I've just retried to migrate my cloned server, and it worked again.
I've compared my dpkg.log with the one from your server, and I see only a little difference:

Your log:
Code: [Select]
2011-12-02 15:15:29 status half-configured zentyal-core 2.2.4
2011-12-02 15:15:32 trigproc libc-bin 2.11.1-0ubuntu7.7 2.11.1-0ubuntu7.7
2011-12-02 15:15:32 status half-configured libc-bin 2.11.1-0ubuntu7.7
2011-12-02 15:15:43 status installed libc-bin 2.11.1-0ubuntu7.7
2011-12-02 15:18:06 startup packages configure
2011-12-02 15:18:06 configure zentyal-core 2.2.4 2.2.4
2011-12-02 15:18:06 status half-configured zentyal-core 2.2.4

My log (full version attached):
Code: [Select]
2011-11-30 21:33:26 status half-configured zentyal-core 2.2.4
2011-11-30 21:33:40 status installed zentyal-core 2.2.4
2011-11-30 21:33:40 status triggers-pending zentyal-core 2.2.4

As you can see, just before the end of your log, the zentyal-core package trigger libc-bin. In my migration logs this never happens.
I don't kown if this part is relevant or not, but is the only thing I've seen.

All the information in the log files are too much generic to understand where the error is raised.
The only solution to find a clue is to edit the zentyal-core.postinst script to make it write a simple debug log itself, then call a "dpkg-reconfigure zentyal-core" and see...

Maybe someone has a better idea?

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #11 on: December 02, 2011, 11:54:22 pm »
Maybe Jorge can give some pointers on this... :) I'm open for suggestions...

* robb pokes jsalamero :D

gandalfmagic

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Re: Migration error while upgrading packages to version 2.2
« Reply #12 on: December 04, 2011, 01:56:10 pm »
OK, by editing zentyal-core.postinst script, i've found the problem.

I was trying to do the final migration on my servers, but it didn't work again.
I still must understand why on the cloned server it's working, maybe it has something to do with LDAP sync.

So I've created the custom log file and here is the error:
Code: [Select]
usermod --home /var/lib/zentyal/ ebox
usermod: user ebox is currently logged in

Obviously I've manually modified the passwd file, and commented the line in the script to let the it continue, and it worked.

But, even if my servers are all up and running, when this server (slave mail) is going to update ldap configuration, it give me the error:

Code: [Select]
Upgrading ldap attributes (quotas from mail and users)...
Cannot restore slave machine when master is down: xxx.xxx.xxx.xxx

Here I cannot guess what is not working: maybe I have to launch the script on slaves before than master?
If someone need a log file, I will redo the migration when I can. This is a production server, and I cannot test on it.

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #13 on: December 04, 2011, 02:00:34 pm »
Quote
user ebox is currently logged in

I am positive I have seen this in my logs too...

exekias

  • Zentyal Staff
  • Zen Warrior
  • *****
  • Posts: 196
  • Karma: +21/-0
    • View Profile
    • The Big Bug Theory
Re: Migration error while upgrading packages to version 2.2
« Reply #14 on: December 04, 2011, 03:10:16 pm »
I think you found the problem,

Probably we will need to add some code to kill all ebox running processes. I will keep you updated


Thank you for your feedback!