Symptom:
Following a database move to a new SQL Server, the ScoutServer service starts and stops within the same second. The eluxd.log shows:
CScoutLicenseManager::ReadFromDB : Database GUID is different
CScoutLicenseManager: Initialization failed
Scout Enterprise server started
Scout server publisher thread started
Scout Enterprise server terminating
No CScoutLicenseManager::WriteToDB lines and no AlwaysOn detection lines are logged.
What is not the problem:
The following all verify as healthy and can be ruled out:
• ODBC Driver 18 is present and in use; all database connections succeed.
• The database schema version actual equals required, and all checked columns are present.
• The Database Connection Editor (sepe.exe) has both the Console tab and the Server tab pointing at the correct server and database.
• The Scout Server service account, the Console login and the installer account are identical and hold sufficient rights.
Expected behaviour versus actual behaviour:
The GUID check firing after a restore is by design. SQL Server assigns the restored database a new internal identifier while Scout's licence data still holds the old one. Normally the Scout Console then displays "The checksum is [value]. Please enter the validation code:", the validation code re-stamps the GUID, and the server starts. On affected builds that dialog never appears, leaving no supported way to recover the installation.
The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.
Citrix is not responsible for and does not endorse or accept any responsibility for the contents or your use of these third party Web sites. Citrix is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement by Citrix of the linked Web site. It is your responsibility to take precautions to ensure that whatever Web site you use is free of viruses or other harmful items.
Restoring the Scout Enterprise database onto a different SQL Server causes SQL Server to assign the database a new internal identifier. The licence data held in the ScoutLicense table still carries the identifier of the original database, so at start-up CScoutLicenseManager::ReadFromDB detects the mismatch, logs "Database GUID is different", fails initialisation and terminates the Scout Server service. This check is working as designed and is the expected safeguard after a database move.
The actual defect is in the recovery path. At start-up the server is supposed to persist a "licence needs repair" flag by calling setDatabaseGuidValid(false) followed by WriteToDB(), and the Scout Console reads that flag in order to present the checksum and validation-code repair dialog. In CScoutLicenseManager::WriteToDB() the licence manager is serialised by way of a copy, the copy constructor delegates to operator=, and operator= never copied the m_DatabaseGuidValid member. The flag was therefore always written back as valid, so ScoutConsole saw a healthy licence and never offered the repair dialog. Without that dialog the database GUID cannot be re-stamped and the service cannot be started.
Affected builds are 15.2508.1001 and 15.2605 through 15.2609. Builds 15.2601 and 15.2603 are not affected. The defect is corrected in Scout 15.2611.
Permanent fix:
Upgrade to Scout 15.2611 or later. On 15.2611 the repair flow behaves as designed: point ScoutServer at the restored database, the service stops with "Database GUID is different", the Console displays the repair dialog, entering the validation code re-stamps the GUID, and the service starts.
Workaround for 15.2508.1001 and 15.2605 through 15.2609:
This resets the LS licence row so that ScoutServer takes the new-installation path and stamps the live database GUID itself, with no Console repair required. Where more than one copy of the database exists, apply it first to a copy that will not be retained.
1. Confirm that eluxd.ini and the Console tab of the Database Connection Editor (sepe.exe) point at the intended database. Stop the ScoutServer, ScoutBoardDBLayer and ScoutBoard services, and close all Scout Consoles.
2. Take a full backup of that database.
3. Inspect the licence rows:
SELECT ScoutLicenseID, Modified, DATALENGTH(LicenseBlob) AS blob_len FROM ScoutLicense;
Continue only if a row with ScoutLicenseID = 200 exists and blob_len is greater than 5. Otherwise stop and escalate with this output.
4. Reset the LS licence row to its new-installation state:
UPDATE ScoutLicense SET LicenseBlob = 0x8886726839 WHERE ScoutLicenseID = 200;
5. Start the ScoutServer service. It should stay running, and eluxd.log should show the License Server and LAS lines with no "Database GUID is different".
6. Restart the ScoutServer service once more to confirm it still starts, then start the ScoutBoard services and open the Console.
Order of operations when this forms part of a database move:
Restore the backup onto the new SQL Server. Run the SQL above against the restored database on the new server, never against the original. Re-point the installation using sepe.exe, updating both the Console tab and the Server tab. Start the services. Reconfigure the Citrix License Server in ScoutBoard only if its address or port has changed.
Optional check: ZeroMQ public keys
Compare the DBLayerPublicKey and ScoutServerPublicKey values in C:\Users\Public\Documents\Unicon\Scout\ScoutBoard\dblayer.ini, under the [Certificates] section, against the values held in the database:
SELECT [SystemID],[ParamName],[ParamVal] FROM [ScoutDatabaseName].[dbo].[System] WHERE [ParamName] = 'DBLayerPublicKey' OR [ParamName] = 'ScoutServerPublicKey';
If the values match, no change is needed. If they differ, the database is the source of truth: copy the ParamVal strings into dblayer.ini and save the file.
Prerequisites:
Microsoft ODBC Driver 18 for SQL Server must be installed on the Scout server. The Scout SQL login must exist on the target instance with the db_owner role on the restored database, and any orphaned users must be remapped.
Side effects:
The stored License Server state, such as last contact and grace period, is rebuilt on first contact with the License Server, and the licence log shows the standard new-installation entries. Devices and configuration are not affected.
If the service still stops:
Collect a fresh eluxd.log and the output of the query in step 3, and escalate.
After the Scout Enterprise database is backed up and restored onto a different Microsoft SQL Server host or instance, the Scout Server service starts and immediately terminates. The eluxd.log records "CScoutLicenseManager::ReadFromDB : Database GUID is different" followed by "CScoutLicenseManager: Initialization failed". The Scout Console should present the checksum/validation-code repair dialog to re-stamp the licence, but on affected builds it never appears, so the licence cannot be rebound and the server cannot be started. This is a known defect, fixed in Scout 15.2611. A supported SQL workaround unblocks earlier builds.
Version matrix:
• Affected: 15.2508.1001, and 15.2605 through 15.2609
• Not affected: 15.2601, 15.2603
• Fixed in: Scout 15.2611
Expected behaviour on a fixed build:
Point ScoutServer at a restored database. The service stops with "Database GUID is different". ScoutConsole then displays "The checksum is [value]. Please enter the validation code:". Entering the validation code re-stamps the GUID and the service starts.
Prerequisites for any Scout database move:
• Microsoft ODBC Driver 18 for SQL Server installed on the Scout server.
• The Scout SQL login present on the target instance, holding db_owner on the restored database, with orphaned users remapped.
• The Database Connection Editor (sepe.exe) updated on both the Console tab and the Server tab. Updating only one leaves the other component pointing at the old host.
Reference documentation:
• Troubleshooting an installation with Microsoft SQL Server: https://docs.citrix.com/en-us/unicon-elux-scout/2508.5-2603/short_guides/installation/install_trouble#troubleshooting-for-an-installation-with-microsoft-sql-server
• SQL roles and permissions for users of the Scout Enterprise Management Suite: https://docs.citrix.com/en-us/unicon-elux-scout/2605/short_guides/installation/support_database/db_sql_roles#permissions-for-users-of-the-scout-enterprise-management-suite
• Scout logging options, for collecting eluxd.log: https://docs.citrix.com/en-us/unicon-elux-scout/2607/admin_guides/scout/opti_log/logging_options.html
• Download ODBC Driver for SQL Server (Microsoft): https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server
Feedback submitted!