We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

DataServer error on mysql connexion

Open
viguier asked on January 26, 2022

Hi
I have an error when the DataServer try to connect to our mysql database:
2022-01-26 20:34:57.5931|INFO|Flexmonster.DataServer.HostedServices.MonitorUserUpdateService|Monitor User Storage Service is running
2022-01-26 20:34:58.1328|INFO|Flexmonster.DataServer.FlexmonsterPrepopulatingCacheService|Prepopulation service start working
2022-01-26 20:34:58.1479|INFO|Flexmonster.DataServer.Core.DataStorages.DataStorage|Start loading index index_database
2022-01-26 20:34:58.2441|ERROR|Flexmonster.DataServer.Core.IPrepopulatingService|Index index_database cannot be loaded. Details: Cannot load data from database executing query "SELECT ID,NAME FROM TASK  LIMIT 10;". Please check query or connection string. 
    at Flexmonster.DataServer.Core.DataLoaders.DataLoader.Load(String index)
   at Flexmonster.DataServer.Core.DataStorages.DataStorage.GetOrAddAsync(String cacheKey)
   at Flexmonster.DataServer.FlexmonsterPrepopulatingCacheService.<>c__DisplayClass4_0.<<Prepopulate>b__1>d.MoveNext()
2022-01-26 20:34:58.2857|INFO|Flexmonster.DataServer.Startup|Flexmonster Data Server v. 2.9.17
2022-01-26 20:34:58.3076|INFO|Flexmonster.DataServer.Startup|Flexmonster Data Server is now listening on: http://localhost:9500
2022-01-26 20:34:58.3076|INFO|Flexmonster.DataServer.Startup|Application started. Press Ctrl+C to shut down
2022-01-26 20:34:58.3076|INFO|Flexmonster.DataServer.Startup|Hosting environment: Production
2022-01-26 20:34:58.3076|INFO|Flexmonster.DataServer.Startup|Content root path: /data/BeOtic/flexmonster
My flexmonster-config.json:
{
    "DataSources": [{
       "Type": "database",
       "DatabaseType": "mysql",
       "ConnectionString":
"Server=localhost;Port=3306;Database=beop362;Uid=MyUSer;Pwd=MyPassword;PipeName=MYSQL;CommandTimeout=200;",
       "Indexes": {
         "index_database": {
           "Query": "SELECT ID,NAME FROM TASK  LIMIT 10;"
         }
       }
     }],
    "Security":
    {
        "Authorization":
        {
            "Enabled": false
        },
        "CORS":
        {
            "AllowOrigin": "*"
        }
    },
    "DataStorageOptions":
    {
        "DataRefreshTime": "60"
    },
    "Port": "9500"
}
 
I already check my mysql server using connexion from native mysql client or from tomcat (localhost, port, user, password)
 

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster January 31, 2022

Hello, 
 
Thank you for providing detailed information.
 
We haven’t managed to reproduce the issue on our side. However, a similar case was resolved recently: https://www.flexmonster.com/question/unable-to-load-mysql-data-since-version-2-9-1/. We kindly suggest trying the approaches mentioned in the thread above.
 
Please let us know if it helps.
 
Kind regards,
Nadia

Please login or Register to Submit Answer