Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Problem connetting to MSSQL named instance from Flexmonster data server 2.8.1.16 from Debian

Answered
massimo besozzi asked on October 1, 2020

Hi ,
I have a problem connetting to MSSQL named instance from Flexmonster data server 2.8.1.16 from Debian,
Is not a network problems because from that machine I have another service that can connect to MSSQL
For me all its ok,I whould like to have an help!!
I have a
the error:
2020-10-01 14:20:00.3728|FATAL|Flexmonster.DataServer.Program|Cannot connect to the database using “Server=($HOST_IP)\$INSTANCENAME;Uid=$user;Pwd=$pswd;Database=dbname”. Please check connection string. Details: Cannot connect to SQL Server Browser. Ensure SQL Server Browser has been started.
 
my datasource in config files
“DataSources”: [
{
“Type”: “database”,
“DatabaseType”: “mssql”,
“ConnectionString”: “Server=servername\\instancename;Uid=XXXXX;Pwd=XXXXX;Database=XXXXX”,
“Indexes”: {
“dp_4”: {
“Query”: “select * from [dbo].[XXXXXXX] where AAAAAAA = 4”
},
“ind_6”: {
“Query”: “select * from [dbo].[YYYYYYYYYYYYY] where AAAAAAA = 6”
}
}
}
],

10 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster October 5, 2020

Hi Massimo,
 
Thank you for posting to our forum.
 
Taking into account everything works as expected on Windows, it seems to us that the issue might lie in different connection string requirements in Debian.
 
With that in mind, we would suggest trying out different connection string formats to connect to your MS SQL instance. Here’s a list of available types: https://www.connectionstrings.com/sql-server/.
 
Please let us know if this helps.
 
Regards,
Mykhailo

Public
massimo besozzi October 5, 2020

Hello,
which provider uses flexmonster-data-server to connect to MMSQL?
Are there any prerequisites for the connection or just unpack the linux zip from your site?
I have to install whit the flexmonster cli tools?
 
Regards ,
Massimo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster October 6, 2020

Hi Massimo,
 
Please note that you don’t need to install any additional components apart from the Data Server in order to connect to your MSSQL instance – instead, what we’re talking about is the correct "ConnectionString" parameter value inside your flexmonster-config.json file.
 
To be more specific, after trying different connection string formats we’ve discovered that the Standard Security format works well with Linux distributions:
 

"ConnectionString": "Server=localhost;Uid=SA;Pwd=password;Database=TestDB"

 
Feel free to try this on your side and please let us know if this fixes the issue for you.
 
Looking forward to your response.
 
Kind regards,
Mykhailo

Public
massimo besozzi October 6, 2020

Mykhailo ,
 
you cannot connect to an mssql named instance whitout define the instance name!!!!!!!

"ConnectionString": "Server=localhost;Uid=SA;Pwd=password;Database=TestDB"

"ConnectionString": "Server=localhost\instancename;Uid=SA;Pwd=password;Database=TestDB"
 

 

Public
massimo besozzi October 7, 2020

Hi Mykhailo ,
Flexsmonster-data-server cannot conntect to Mssql name instance server.
If a make a netstat on db machine i have this:

TCP DBIP:49369 FMDS_IP:42150 FIN_WAIT_2

 
The connection is not opened and flexmonsted-data-server is in a strange state is not started but It use 95% of CPU as you can see:
 
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14214 root 20 0 2964480 67876 43644 R 99.3 3.4 15:04.13 flexmonster-dat
 
I would say it is a flexmonster data server bug !!!!!Where can I report it?
 

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster October 7, 2020

Hi Massimo,
 
Thank you for your response & for providing further details on the issue in question.
 
First of all, we would like to confirm that the support forum is the correct place to report & discuss Flexmonster bugs and issues – here we always try to assist our users with the necessary support.
 
To reiterate our experience with Linux-based platforms, we’ve managed to deploy an MS SQL instance and connect it to Flexmonster through the Data Server in a way mentioned above with no issues emerging.
 
However, you’re saying setting up named instances on your side is not successful. Since working with multiple instances is a Windows-only feature, we assume your use case involves deploying an MS SQL instance on a Windows machine and connecting to it from Debian – could you please confirm whether this is correct or if your situation is actually different?
 
Knowing this will greatly help us to understand the general picture better and get to the core of the issue faster. Any additional details you think might be helpful would also be highly appreciated.
 
Thank you for your patience and looking forward to your response.
 
Best regards,
Mykhailo

Public
massimo besozzi October 8, 2020

Hi Mykhailo ,
below are the specifications of the two environments (database and flexmonster data server).
DATABASE
OS -> Windows Server Standard SP2 (Version 6.0.6003)
DB -> Microsoft SQL Server Business Intelligence (64-bit) (version 12.0.5223.6) (Named Instance)
Flexmonster Data Server
OS –> SMP  Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
KERNEL –> Linux 4.19.0-8-amd64 #1
Flexmonster Data Server –> (2.8.16) I have tried also 2.8.17
I have removed all firewall rules on the Hosts.
Beside th flexmoster-config.json file :


"DataSources": [
{
"Type": "database",
"DatabaseType": "mssql",
"ConnectionString": "Server=$hostname\\$instancename;Uid=xxxxx;Pwd=xxxxx;Database=databasename",
"Indexes": {
"dp_4": {
"Query": "select * from tablename where ID_GROUP = 4"
},
"dp_3": {
"Query": "select * from tablename where ID_GROUP = 3"
},
"dp_5": {
"Query": "select * from tablename where ID_GROUP = 5"
},
"dp_6": {
"Query": "select * from tablename where ID_GROUP = 6"
},
"ind_4": {
"Query": "select * from tablename2 where ID_GROUP = 4"
},
"ind_3": {
"Query": "select * from tablename2 where ID_GROUP = 3"
},
"ind_5": {
"Query": "select * from tablename2 where ID_GROUP = 5"
},
"ind_6": {
"Query": "select * from tablename2 where ID_GROUP = 6"
}
}
}
],
"Security": {
"Authorization": {
"Enabled": false
},
"CORS": {
"AllowOrigin": "*"
},
"HSTS": {
"MaxAge": 31536000,
"IncludeSubDomains": true
},
"Headers": {
"Content-Security-Policy": "default-src 'self'",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "SAMEORIGIN",
"X-XSS-Protection": "1; mode=block"
}
},
"DataStorageOptions": {
"DataRefreshTime": 60,
"CacheSizeLimit": 15000
},
"Port": "9500"
}

 
 
 

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster October 13, 2020

Hi Massimo,
 
We will need a little bit more time to take a deeper look at this issue and see whether anything can be done on our side.
 
We’ll return to you with the results of our research ETA Nov 16th.
 
Please let us know if there’s anything else we can help you with in the meantime.
 
Regards,
Mykhailo

Public
massimo besozzi 2 days ago

Hi ,
while i’m waiting for your response ,i have installed Flexmonster data server in a windows machine.
If i test connection with browser on localhost all it’s OK when I connect from remote host (by name or IP address) i receive this error :”ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY”.I’m using https connection with a self signed cert.
 
What I’m wrong???
 
 

{
"DataSources": [
{
"Type": "database",
"DatabaseType": "mssql",
"ConnectionString": "Server=$databaseip\\$instanceName;Uid=XXXXX;Pwd=XXXXX;Database=$dbname",
"Indexes": {
"dp_4": {
"Query": "select * from [dbo].[table] "
}
}
}
],
"Security": {
"Authorization": {
"Enabled": true
},
"CORS": {
"AllowOrigin": "https://$apllicationCallerHost"
},
"HSTS": {
"MaxAge": 31536000,
"IncludeSubDomains": true
},
"Headers": {
"Content-Security-Policy": "default-src 'self'",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "SAMEORIGIN",
"X-XSS-Protection": "1; mode=block"
}
},
"DataStorageOptions": {
"DataRefreshTime": 60,
"CacheSizeLimit": 15000
},
"Port": "443"
,
"HTTPS": {
"Enabled": true,
"Certificate": {
"Subject": "$certsubject",
"Store": "My",
"Location": "LocalMachine",
"AllowInvalid": true
}
}
}
Public
Mykhailo Halaida Mykhailo Halaida Flexmonster 1 day ago

Hi Massimo,
 
Please see our response in the parallel forum thread: https://www.flexmonster.com/question/flexmoster-data-server-https-problems/
 
Best regards,
Mykhailo

Please login or Register to Submit Answer