Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: p1ur on August 03, 2007, 09:38:13 PM

Title: A bad upgrade gone worse
Post by: p1ur on August 03, 2007, 09:38:13 PM
Hi
My update from 7.1 to 7.2 went wrong :-(
I took a backup prior to the upgrade with dar2 (dmay's) and now I want to make a fresh install off the latest sme-version prior to 7.2 and then restore my backup.
But where do I find it the latest "old" version of sme?
And if you have some good advice, I'd love to hear about it.

Petur

For what its worth, here is what went wrong, and what I made to mess things up:
I have some contribs:
Disk ARchive
Sme7admin
phpmyadmin
smeserver-fetchmail
kronolith (not in use, but not removed :-(
groupoffice (not in use, but not removed :-(

The udgrade went wrong (no. I did not do a yum clean all), I don't know what went wrong. All I could see, was a message on the console (witch I didn't write down :-(
And all I could do (and did) was to turn off the power, and restart the server

It started with no problems as version 7.2. I was told there were new updates, so I did a new upgrade, and got the following errors:
Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-pear
Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-imap
Error: Missing Dependency: openssh = 3.9p1-8.RHEL4.17.1 is needed by package openssh-clients
Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-mbstring
Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-gd
Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-domxml
Error: Missing Dependency: openssh = 3.9p1-8.RHEL4.17.1 is needed by package openssh-server
Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-ldap
Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-mysql
================================================================
No new rpms were installed. No additional commands are required.
================================================================
So, after a little search I made the following commands:
rpm --nodeps -e php-pear-4.3.9-3.22.3
rpm --nodeps -e php-imap-4.3.9-3.22.3
rpm --nodeps -e openssh-clients-3.9p1-8.RHEL4.17.1
rpm --nodeps -e php-mbstring-4.3.9-3.22.3
rpm --nodeps -e php-gd-4.3.9-3.22.5
rpm --nodeps -e php-domxml-4.3.9-3.22.3
rpm --nodeps -e openssh-server-3.9p1-8.RHEL4.17.1
rpm --nodeps -e php-ldap-4.3.9-3.22.3
rpm --nodeps -e php-mysql-4.3.9-3.22.5

After that, the udgrade went fine, but I don't get any mails, webmail is not working, and there are probably more problems
Title: A bad upgrade gone worse
Post by: bpivk on August 03, 2007, 10:08:43 PM
p1ur could you please add your problems to this bug. http://bugs.contribs.org/show_bug.cgi?id=3185

I had the same problems and i'm working on them. Mail stoped working for me but i fixed that. Please post your issues to this bug and i'll try to help you with the info i gathered.
Title: Re: How to restore from a bad upgrade?
Post by: raem on August 04, 2007, 05:42:03 AM
p1ur

Quote
no. I did not do a yum clean all


Well you probably should have done that

Quote
Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-mysql
rpm --nodeps -e php-mysql-4.3.9-3.22.5
etc etc


That's telling you another package is needed, so you went an uninstalled all the packages that needed that package which has now broken your server. That was the wrong thing to do, you would probably have been much better off to install the required package
yum install php

As of now you could get yum to install all those packages

First check that all the correct repositories are enabled in server manager Software installer panel as per the FAQ.
Then do
yum clean all
then do
yum install php php-pear php-imap openssh-clients php-mbstring php-gd php-domxml openssh-server php-ldap php-mysql
Make sure you then do both
signal-event post-upgrade
reboot

If you prefer to reinstall
The latest "old" version is 7.1CD. If you install that and then run yum update, it will bring you to v7.2 (same place as you are now but a fully working version instead). Then you install dar2 and the other contribs you had previously installed and do a restore from your backup file.
Note after installing 7.1 from CD, you MUST follow the specific yum update instructions found in the FAQ and NOT do a general yum update first and enable the correct repositories as oer FAQ.
Title: Re: How to restore from a bad upgrade?
Post by: CharlieBrady on August 04, 2007, 07:03:43 AM
Quote from: "p1ur"

The udgrade went wrong (no. I did not do a yum clean all), I don't know what went wrong. All I could see, was a message on the console (witch I didn't write down :-(


You'll know what to do next time, right?

Quote

And all I could do (and did) was to turn off the power, and restart the server


That probably wasn't a good idea.

Quote

Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-pear
Error: Missing Dependency: php = 4.3.9-3.22.3 is needed by package php-imap
Error: Missing Dependency: openssh = 3.9p1-8.RHEL4.17.1 is needed by package openssh-clients


Those messages are an indication that you have had an interrupted upgrade, and you have multiple versions of some rpms installed - e.g. php-pear.

Quote

So, after a little search I made the following commands:
rpm --nodeps -e php-pear-4.3.9-3.22.3
rpm --nodeps -e php-imap-4.3.9-3.22.3
rpm --nodeps -e openssh-clients-3.9p1-8.RHEL4.17.1
rpm --nodeps -e php-mbstring-4.3.9-3.22.3
rpm --nodeps -e php-gd-4.3.9-3.22.5
rpm --nodeps -e php-domxml-4.3.9-3.22.3
rpm --nodeps -e openssh-server-3.9p1-8.RHEL4.17.1
rpm --nodeps -e php-ldap-4.3.9-3.22.3
rpm --nodeps -e php-mysql-4.3.9-3.22.5


You should never use --nodeps or --force unless you know exactly why you are using them.

Quote

After that, the udgrade went fine, but I don't get any mails, webmail is not working, and there are probably more problems


I'd advise you to diagnose exactly what is wrong before you undertake any more "corrective" action.

If you don't get any emails and webmail isn't working, then log files should contain messages which show what is going wrong.

What do these commands show:

rpm -qa | grep php
rpm -qa | grep openssh

?
Title: A bad upgrade gone worse
Post by: p1ur on August 04, 2007, 09:08:01 AM
Quote

I'd advise you to diagnose exactly what is wrong before you undertake any more "corrective" action.

OK
Quote

If you don't get any emails and webmail isn't working, then log files should contain messages which show what is going wrong.

Bear with me, What I can find is this.
In servermanager, view log files:
Aug  4 08:30:02 server su(pam_unix)[2174]: session opened for user qmailr by (uid=0)
Aug  4 08:30:18 server su(pam_unix)[2174]: session closed for user qmailr
In servermanager, Mail log file analysis, send mail style log
1186193789.916801500 qp 24690: to=remote.petur@carbel.dk, uid=101, ddelay=0.353056, xdelay=0.277957, stat=Sent (80.160.77.108_accepted_message./Remote_host_said:_250_Ok:_queued_as_AF4EBE3031E/)
1186193789.917625500 qp 24690: from=<anonymous@carbel.net>, uid=101, size=1276, nrcpts=1, deferrals=0, qtime=0.353880

In servermanager, Mail log file analysis, reasons for deferral
del    xdelay  reason
 39   2369.13  80.160.xx.xxx does not like recipient./Remote host said: 450 <anonymous@carbel.net>: Sender address rejected: Domain not found/Giving up on 80.160.xx.xxx./
 27   1631.17  80.160.xx.xxx does not like recipient./Remote host said: 450 <root@carbel.net>: Sender address rejected: Domain not found/Giving up on 80.160.xx.xxx./
811  16226.76  Sorry, I couldn't find any host by that name. (#4.1.2)/
 22    304.31  Sorry, I wasn't able to establish an SMTP connection. (#4.4.1)/

I have en external mailhotel, where mail.carbel.dk is. I use fetchmail to colletct my mail from there. The SME-server is internal (at home)
Server Mode   servergateway
Web server   www.carbel.net

Quote

What do these commands show:

rpm -qa | grep php
rpm -qa | grep openssh


[p1ur@server ~]# rpm -qa | grep php
php-mbstring-4.3.9-3.22.5
php-4.3.9-3.22.5
php-imap-4.3.9-3.22.5
php-domxml-4.3.9-3.22.5
php-pear-4.3.9-3.22.5
php-gd-4.3.9-3.22.5
e-smith-php-1.12.0-4.el4.sme
smeserver-phpmyadmin-2.6.4-pl4.dmay
php-mysql-4.3.9-3.22.5
php-ldap-4.3.9-3.22.5
[p1ur@server ~]# rpm -qa | grep openssh
e-smith-openssh-1.12.0-9.el4.sme
openssh-clients-3.9p1-8.RHEL4.20
openssh-3.9p1-8.RHEL4.20
openssh-server-3.9p1-8.RHEL4.20
Title: A bad upgrade gone worse
Post by: raem on August 06, 2007, 03:28:50 AM
p1ur

Quote
[p1ur@server ~]# rpm -qa | grep php
[p1ur@server ~]# rpm -qa | grep openssh


Those rpm versions match what's on my sme7.2 except that you have an old version of smeserver-phpmyadmin. The current one from dmay is
smeserver-phpmyadmin-2.10.0.2-0.dmay.noarch.rpm

So it seems you do have all the correct packages installed. Charlies analysis was correct (which it undoubtedly would be).
Title: Re: How to restore from a bad upgrade?
Post by: raem on August 06, 2007, 03:38:16 AM
p1ur

Quote
webmail is not working


http://wiki.contribs.org/Updating_to_SME_7.2#Webmail_.2F_Horde

http://wiki.contribs.org/Updating_to_SME_7.2
Title: I ruined my backup :-(
Post by: p1ur on August 13, 2007, 10:12:08 PM
Help plz

I have ruined my bach-up, witch was on a removable USB-Harddisk
Before I started a clean install on my harddisk, I tested the restore on a minor HD (where I just restored the most essentiel)
It went fine, so I changed to the hard disk with the bad upgrade, and made a clean install off SME 7.2
BUT - I didn't notice, that the USB-harddisk was attach, so the installations process has somehow included this harddisk as well. I think its been formatted and included in a raid.
Is there anyway, that I can get my data back?

P1ur
Title: Re: I ruined my backup :-(
Post by: cactus on August 13, 2007, 11:18:22 PM
Quote from: "p1ur"
Is there anyway, that I can get my data back?
I am afraid not as there is no such thing as undelete on linux and unix AFAIK. Sorry!