Issue:
We continuously see MYSQL errors in the install log for a particular lab environment (3 Different DMS's i.e. DEV, QA, STG) that has been in place for years and has been through many upgrades since inception. This applies to all Dataminer versions starting from 9 to the latest available to date 10.3.11(RC).
I hope there is a simple config change we need to tweak, feature request to submit or an update to our documentation I can suggest. The error and details are below...
2023-09-23 13:49:40|progress|Checking local database...
2023-09-23 13:49:40|progress|Checking central database...
2023-09-23 13:49:43|error|Checking central database failed: MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.
2023-09-23 13:49:43|progress| at MySql.Data.MySqlClient.NativeDriver.Open()
2023-09-23 13:49:43|progress| at MySql.Data.MySqlClient.Driver.Open()
2023-09-23 13:49:43|progress| at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
2023-09-23 13:49:43|progress| at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
2023-09-23 13:49:43|progress| at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
2023-09-23 13:49:43|progress| at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
2023-09-23 13:49:43|progress| at MySql.Data.MySqlClient.MySqlPool.GetConnection()
2023-09-23 13:49:43|progress| at MySql.Data.MySqlClient.MySqlConnection.Open()
2023-09-23 13:49:43|progress| at Skyline.DataMiner.SLDatabase.SLMySQL.GetConnectionFromPool(Boolean allowSolve, String connectString)
2023-09-23 13:49:43|progress| at Skyline.DataMiner.SLDatabase.SLMySQL.VerifyTablesCentralDBInner(Boolean preview)
2023-09-23 13:49:43|progress| at Skyline.DataMiner.SLDatabase.SLMySQL.VerifyTablesCentralDB(Boolean preview)
2023-09-23 13:49:43|progress| at SLUpgradeDatabase.Program.MainProtected(String[] args)
2023-09-23 13:49:43|step|Step 23/32: ExecuteUpgradeActions
Setup:
We have a standalone dma for development with a local windows cassandra installed/used and offloading dataavg only to file/s.
DB.XML:
<?xml version="1.0"?>
<DataBases xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.skyline.be/config/db">
<DataBase active="true" local="true" type="Cassandra">
<ConnectString/>
<DBServer>localhost</DBServer>
<DSN/>
<DB>mydbname</DB>
<UID>xxxx</UID>
<PWD>xxxx</PWD>
</DataBase>
<DataBase active="True" local="false" type="MySQL">
<OffloadInterval>5</OffloadInterval>
<FileCache enabled="true">
<MaxSizeKB>10000000</MaxSizeKB>
</FileCache>
<Offloads>
<Offload state="active" local="dataavg" remote="dataavg" record="5" oldstyle="true"/>
</Offloads>
</DataBase>
</DataBases>
The DB.xml tag "<DataBase active="True" local="false" type="MySQL">" indicates that a MySQL central database (local="false") is configured an active (active="true").
This section will be the reason why the upgrade tries to apply updates there, even though no actual host is configured in there.
Removing this entire section of the DB.xml file (while DataMiner is stopped) should avoid these upgrade action errors.
I was confused here for a while by not having a central database but still expecting offload to work.
I believe this system is using the “Offloading files to a file cache” feature (docs: https://docs.dataminer.services/user-guide/Reference/Skyline_DataMiner_Folder/More_information_on_certain_files_and_folders/DB_xml.html#offloading-files-to-a-file-cache )
In that case, the solution will be to remove the type=”MySQL” part of the central database tag in DB.xml so no code interprets this as an actual central database.
Thanks for the reply but if I remove that section then we no longer would be offloading the avg table. When I set the MYSQL to active=disabled, no elements showed in Dataminer after restart. Interestingly enough this happens even though its configured cassandra. Do I need to move the offload config under the cassandra tag vs keeping it under the MYSQL as a 2nd db, etc? Our documentation doesn’t mention an example where we use a cassandra & offload a table, etc. It only gives an example like what we have setup of a example for offload only which is what we have followed.