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

Upgrading Sophos Console 5.2.1 R2 to 5.4.1

Good morning

I been using the Sophos Enterprise Console for few years now but very new to the upgrade process.

I have read the https://www.sophos.com/en-us/medialibrary/PDFs/documentation/sec_54_ugeng.pdf and related documentation with regard to this. However during the upgrade I encountered few problems and had to revert back to 5.2.1 R2. Having tried again I manage to install 5.4.1, I can see all managed computers listed and connected! However I got two problems:

  1. Console no longer show previous groups structure, policies and various manage roles.
  2. All of computers reporting as not up to date since yesterday 18:56, short time after the installation of 5.4.1 completed (I guess related to missing update policies).

I do have backups of old databases which were done before I started any of this work.

I would be very grateful if one of the forum members can assist me in restoring missing groups structure, policies and various manage roles (can easily be recreated) to the 5.4.1 console.

Thank you

Sahan



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

    no longer show
    looks like you've "lost" the database (contents) in the process. You can either restore everything (losing all data - alerts, errors, events - collected by new 5.4.1) or nothing (and you'd have to manually redo the configuration).

    not up to date
    are they reporting updating errors?
    Apparently they can locate the server and as they are in Unassigned they won't receive a policy and therefore continue to use the one they've already had. Apparently SEC 5.4.1 (or rather its SUM) has successfully downloaded the software so something must have changed (e.g. previously the updated from ...\CIDs\S001\SAVSCFXP). Could you compare the value(s) in Primary server column (tab Update Details) with the information in View -> Bootstrap Locations ...?

    Christian

  • Thank you Christian.

    You are correct even just comparing the size of SOPHOS521.mdf and SOPHOS540.mdf I can see massive difference in size.

    I don't mind losing information in 5.4.1 since it only been up just over 12 hours.

    Can kindly ask you to give me some guidance on this please.

    Cheers

    Sahan

  • Hello Sahan,

    you're using the same DB instance so resetting the SOPHOS540 database should do. Stop the Sophos services, then run \sec_541\ServerInstaller\DB\Core\InstallDB.bat. Make sure the SOPHOS521 database is online (guess you haven't switched it off anyway). When you start the service the Management Service should perform the database upgrade.

    Christian

  • Hi Christian

    Stopping the Sophos services and running the \sec_541\ServerInstaller\DB\Core\InstallDB.bat SOPHOS\SOPHOS VIWSDB1 SOPHOS540 Sophos_InstallCore540DB.log runs fine.

    However then I can't start Sophos Management Service with Windows could not start the Sophos Management Service on VIAV1VM. Error 0x80004005: Unspecified error

    Feel a bit stuck

    Thanks

    Sahan

  • Hello Sahan,

    there should be some error details in the Windows event log, please see the Could not start ... article.

    Christian

  • Hi Christian

    Log Name: Application
    Source: Sophos Management Service
    Date: 19/01/2017 15:21:51
    Event ID: 8004
    Task Category: (2)
    Level: Error
    Keywords: Classic
    User: RDG-HOME\sophosdbuser
    Computer: viav1vm.rdg.ac.uk
    Description:
    Initialization failed.

    Step: Migrating data if necessary
    Error: std::runtime_error. Database upgrade failed. Please see KBA 113946.
    Data: ErrorUnexpected
    Event Xml:
    <Event xmlns="schemas.microsoft.com/.../event">
    <System>
    <Provider Name="Sophos Management Service" />
    <EventID Qualifiers="49152">8004</EventID>
    <Level>2</Level>
    <Task>2</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-01-19T15:21:51.000000000Z" />
    <EventRecordID>1422882</EventRecordID>
    <Channel>Application</Channel>
    <Computer>viav1vm.rdg.ac.uk</Computer>
    <Security UserID="S-1-5-21-1643737065-1150890963-312552118-148672" />
    </System>
    <EventData>
    <Data>
    Step: Migrating data if necessary
    Error: std::runtime_error. Database upgrade failed. Please see KBA 113946.
    Data: ErrorUnexpected</Data>
    </EventData>
    </Event>

    ErrorUnexpected - https://community.sophos.com/kb/en-us/111898#ErrorUnexpected - Refer to dropping the old database but I still need it to migrate groups and policies to new database.

    Database upgrade failed. Please see KBA 113946 - https://community.sophos.com/kb/en-us/113946 - Refer to running upgradedb.exe, is that my next step?

    upgradedb.exe -debug -sourceVersion=521

    Thanks

    Sahan

  • Hello Sahan.

    yep, running UpgradeDB is a good idea, dropping the 521 database - as you've correctly preceived - isn't. Don't despair, whatever you encounter will likely be a rather minor issue that can be overcome. As long as you have a database backup you can always go back to square one.
    Of course you endpoints want to update ASAP, so this should be resolved rather sooner than later.

    Christian

  • Good morning Christian

    Despair is actually what I am going through right now :). I assume you are not directly connected to Sophos but helping lost souls like me out the goodness of your heart and I am very grateful for your help. I have contacted Sophos support and my account manager but they really haven't been that helpful.

    Anyway back on subject, when I run the upgradedb I get following failure...

    C:\Program Files (x86)\Sophos\Enterprise Console>upgradedb.exe -debug -sourceVersion=521
    19.01.2017 17:10:52 Parsing command-line qualifiers ... successfully completed.
    19.01.2017 17:10:52 Validating parameter values ...
    19.01.2017 17:10:52 ... successfully completed.
    19.01.2017 17:10:52 Transferring data to the new database ...
    19.01.2017 17:11:41 Error: std::exception thrown SP Error: 55 (ErrorDataTransferFailed)
    19.01.2017 17:11:41 Exit code 5 (Failed to transfer data from the old database.)

    I am not an expert on SQL but we do have a very good in house DBA, but wouldn't know much about Sophos, is there anything I can potentially ask them to check from SQL side?

    Thank you

    Sahan

Reply
  • Good morning Christian

    Despair is actually what I am going through right now :). I assume you are not directly connected to Sophos but helping lost souls like me out the goodness of your heart and I am very grateful for your help. I have contacted Sophos support and my account manager but they really haven't been that helpful.

    Anyway back on subject, when I run the upgradedb I get following failure...

    C:\Program Files (x86)\Sophos\Enterprise Console>upgradedb.exe -debug -sourceVersion=521
    19.01.2017 17:10:52 Parsing command-line qualifiers ... successfully completed.
    19.01.2017 17:10:52 Validating parameter values ...
    19.01.2017 17:10:52 ... successfully completed.
    19.01.2017 17:10:52 Transferring data to the new database ...
    19.01.2017 17:11:41 Error: std::exception thrown SP Error: 55 (ErrorDataTransferFailed)
    19.01.2017 17:11:41 Exit code 5 (Failed to transfer data from the old database.)

    I am not an expert on SQL but we do have a very good in house DBA, but wouldn't know much about Sophos, is there anything I can potentially ask them to check from SQL side?

    Thank you

    Sahan

Children
  • Hello Sahan,

    you are not directly connected to Sophos
    correct.
    As for the upgradedb.exe error: I've just noticed ... InstallDB.bat SOPHOS\SOPHOS ... - did you check the Sophos_InstallCore540DB.log? Guess your database is not remote, is it? With SOPHOS\SOPHOS
    it would try to install on server SOPHOS. IIRC this has come up in one or more other threads - InstallDB.bat returns only errors encountered during SQL execution, i.e. errors thrown by the executed SQL commands but not errors from sqlcmd.exe (e.g. when it can't find the server or instance).
    So before suggesting some further action I'd like to verify that InstallDB.bat did indeed what it should have done. If you database is not on server SOPHOS but local please re-run InstallDB using .\SOPHOS as first parameter, check the log, the run UpgradeDB.exe.

    Christian

  • Hello Christian

    Database is on a SQL clustered instance, Sophos. Management server is viwsdb1.

    InstallDB .\SOPHOS SOPHOS540 Sophos_InstallCore540DB.log InstallDB.log
    Started
    20/01/2017
    10:26
    ==========
    HResult 0xFFFFFFFF, Level 16, State 1
    SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].

    InstallDB SOPHOS\SOPHOS VIWSDB1 SOPHOS540 Sophos_InstallCore540DB.log
    Started
    20/01/2017
    10:28
    ==========
    Tables ...
    Common functions ...
    Error codes ...
    Metadata ...
    Views ...
    Functions ...
    Procs ...
    Packages ...
    Computers ...
    Groups ...
    Reporter ...
    PurgeDB ...
    Data ...
    SetAccess ...
    DefaultValues ...
    DirectoryService ...
    WebControl ...
    SophosEncryption ...
    SophosPatch ...
    ReportingInterface ...
    Upgrade ...

    Thanks

     

    Sahan

  • Hello Sahan,

    on a SQL clustered instance
    I see, so yesterday's invocation with SOPHOS\SOPHOS is the correct one. Please try this once more (using SOPHOS\SOPHOS) and check/post the log.

    Christian

  • C:\sec_541\ServerInstaller\DB\Core>InstallDB.bat SOPHOS\SOPHOS VIWSDB1 SOPHOS540 Sophos_InstallCore540DB.log

    Succeeded

     

    InstallDB SOPHOS\SOPHOS VIWSDB1 SOPHOS540 Sophos_InstallCore540DB.log
    Started
    20/01/2017
    11:30
    ==========
    Tables ...
    Common functions ...
    Error codes ...
    Metadata ...
    Views ...
    Functions ...
    Procs ...
    Packages ...
    Computers ...
    Groups ...
    Reporter ...
    PurgeDB ...
    Data ...
    SetAccess ...
    DefaultValues ...
    DirectoryService ...
    WebControl ...
    SophosEncryption ...
    SophosPatch ...
    ReportingInterface ...
    Upgrade ...

    Cheers

    Sahan

  • Hello Sahan,

    looks ok, Could you now try the upgradeDB.exe once more?

    Christian

  • Hi Christian

    C:\Program Files (x86)\Sophos\Enterprise Console>upgradedb.exe -debug -sourceVersion=521
    20.01.2017 11:55:32 Parsing command-line qualifiers ... successfully completed.
    20.01.2017 11:55:32 Validating parameter values ...
    20.01.2017 11:55:32 ... successfully completed.
    20.01.2017 11:55:32 Transferring data to the new database ...
    20.01.2017 11:55:37 Error: std::exception thrown SP Error: 55 (ErrorDataTransferFailed)
    20.01.2017 11:55:37 Exit code 5 (Failed to transfer data from the old database.)

    When I am running this from the management server, on the database I can see the SOPHOS540.mdf and SOPHOS540_log.LDF files changing...

    I bet if you are sitting at my desk you most likely have it fix in 2 mins :)

    Thanks

    Sahan

  • Hello Sahan,

    you most likely have it fix in 2 mins
    whenever I had the 55 error it worked with the first try [:D]. Seriously, I did do this one or two times and the Drop-Install-Upgrade sequence did it. Haven't heard of such a persistent problem. Now Using the UpgradeDB.exe tool ... tells which SQL procedure is run and perhaps your database gurus could run it directly.

    Christian

  • Thank you for your help so far...

    I will catch up dba's after their lunch and let you know how we get on.

    Cheers

    Sahan

  • Hello Sahan,

    just to make sure (never forget to ask: Is the power cable plugged in): You are running the latest UpgradeDB.exe (mine is 5.4.0.574) and the DataBaseConnectionMS string points to the correct server\instance and database (SOPHOS540).

    Christian

  • Yes I got the same version of UpgradeDB.exe and DatabaseConnectionMS points to Provider=SQLOLEDB;Integrated Security=SSPI;Initial Catalog=SOPHOS540;Data Source=SOPHOS\SOPHOS;

    Luckily we do have a 2nd update manager and clients seems to be updating themselves, just blind to any alerts, etc.

    Just waiting for the DBA to finish something.

    Cheers

    Sahan