This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Upgrade from 4.7 to 5.0 Console Fail. Management service refuses to start.

Just attempted to upgrade to Management console version 5.0 from 4.7

Installation appeared to go perfectly. Followed upgrade guide to the letter.

However, the management service now refuses to start.

A little investigation into the event logs shows.....

Sophos Managements Service :

Initialization failed.
Step: Migrating data if necessaryError: std::runtime_error. Database upgrade failed. Please see KBA 113946.Data: ErrorUnexpected

It would appear the database has not been upgraded. 

After more diggings I've checked the database instances using :

sqlcmd -E -S .\sophos -Q "select name from sysdatabases"

This returns all databases including SOPHOS45, SOPHOS47 (current version) and SOPHOS50

More digging I have tried to update the database manually....

upgradedb.exe -debug -sourceVersion=47

returns.....

25.04.2012 11:39:20      ... successfully completed.25.04.2012 11:39:20 Validating parameter values ...25.04.2012 11:39:20      ... successfully completed.25.04.2012 11:39:20 Transferring data to the new database ...25.04.2012 11:39:23 Error: std::exception thrown  SP Error: 55 (ErrorDataTransferFailed)25.04.2012 11:39:23 Exit code 5 (Failed to transfer data from the old database.)

Help please????? Thanks.

:24119


This thread was automatically locked due to age.
  • Hello mpendlebury ,

    I'd just "reset" the SOPHOS50 database using InstallDB.bat and then run upgradedb.exe again (you have backed up your SOPHOS47 database, haven't you). BTW: you don't need the SOPHOS45 database so you can drop it.

    Christian

    :24121
  • Hi Christian, thanks for the reply.

    Yes I have a backup of the 4.7 database. 

    Will try as directed.

    I'm thinking it's permission / credentials based somewhere along the line as I created a new user as advised (old instance was running as admin) and a little more digging I've found that this user needs to belong to Sophos DB Admins on the local machine where the instance runs. Now added.

    Fingers crossed.

    Thanks.

    :24123
  • Hi Christian.....looking good!!!!

    Added new user to local Sophos DB Admin group.

    Reset database as suggested. Success.

    Ran manual upgrade again. Success.

    Service now starts.

    Management console connects.

    restarted server to be sure.

    Management service fails to start.

    Sophos related services either start as Domain\sophosadmin (new user I created)

    or Local System

    Setting Sophos Management Service to Local System and starting appears to work.

    Is this correct?

    Thanks for you help. M.

    :24125
  • Hello M,

    Sophos Mangement Service runs as Local System (the Sophos Management Host with the management user). So it seems to be correct. Had a similar problem on one of the servers going from 4.7 to 5.0 so it might be a glitch. Had no problems since then (and it was some time ago, upgraded as soon as 5.0 became available).

    Christian

    :24131
  • Thanks for the help. :smileyvery-happy:

    First real issue I've had with a upgrade and felt it was credentials logging into database all along. I've responded to sophos instructing of fix (in this case) so they may look into it to see if there is a wrinkle with service startup also.

    I've enquired if there is a script or test to run to double check all services are working as they should. (this may already exist as I haven't looked yet)

    Thanks again for your help QC.

    :24135
  • I'm now also having this problem, I'm pretty new to the whole upgrade process, I've upgraded 4.5 to 4.7 before and it went fine, but this time, simply cannot get it to work.

    I have tried upgradedb.bat and no luck, including resetting the db and using the cmd upgrade.

    I simply get this in the event viewer.

    Initialization failed.
    
    Step: Migrating data if necessary
    Error: std::runtime_error. Database upgrade failed. Please see KBA 113946.
    Data: Could not find stored procedure 'dbo.FromXTo4'.
    :33943
  • Hello fvd_rs,

    why did you have to resort to the manual DB upgrade (and why not upgrading to 5.1)?

    Anyway - did you run InstallDB.bat? Looks like the database is not correctly initialized.

    Christian

    :33949
  • I have tried that too and it hasn't helped....

    It has also failed to upgrade now from 5.0 to 5.1, or at least I still have the same problem, whereby i cannot start the management service.

    :34985
  • HI,

    What is the error in the application event log from the management service when it fails to start?

    KB: http://www.sophos.com/en-us/support/knowledgebase/111898.aspx should help based on the error.

    The management service will not start if it unsure of the state of the database.  The "upgradestatus" value in the "upgrade" table of the "new" database should be 2. 

    sqlcmd -E -S .\sophos -d sophos51 -Q "select upgradestatus from upgrade"

    should return 2 if you're upgrading to SEC 5.1 for example.   It is set to 2 when the migration of the data from the old to new database is complete.  UpgradeDB.exe (http://www.sophos.com/en-us/support/knowledgebase/65420.aspx) is the tool that runs as part of the management server upgrade.  It connects to the newly created database (e.g. SOPHOS51 if you're upgrading to SEC 5.1) and calls the stored procedure as metnioned in the article.

    Regards,

    Jak

    :34987