Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Django on February 19, 2020, 08:18:29 AM

Title: Unable to connect framework 8.5 with MSSQL
Post by: Django on February 19, 2020, 08:18:29 AM
Hi all,

I am not able to connect config server 8.5 with MSSQL. Scripts i have executed.

'Cannot connect to Database 'ConfigDB' at host 'WIN-XXXXXXXX, port -1, reason 'Server not found'.

is the error i am getting. Any one please help me from where it is taking port -1.
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Kubig on February 19, 2020, 10:30:44 AM
Did you configure the confserv.conf file with proper connection string information?
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Django on February 19, 2020, 10:55:23 AM
Yes I have configured it. Below is the detail of dbserver section of this file. Do I need to add some more configuration in this section?

[dbserver]
dbengine =mssql
dbserver =WIN-XXXXX
dbname =ConfigDB
username =
password =XXXX
response-timeout=
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Kubig on February 19, 2020, 12:57:45 PM
I do not see any MSSQL port configured within dbserver section. I suggest you to check your configuration again as it seems there is something wrong
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Django on February 19, 2020, 02:14:53 PM
This is all the configuration which i defined inside confserv.cfg file

[confserv]
port =2020
management-port =4581
server = dbserver
encryption = false
encoding = utf-8
multi-languages = true
langid = 1033

[log]
verbose = all
all = C:logsconfigserverconfsip

[dbserver]
dbengine =mssql
dbserver =WIN-xxxx
dbname =ConfigDB
username =xx
password =xxxx
response-timeout = 600
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Janis on February 19, 2020, 08:54:24 PM
Have you tried to connect to server with MSSQL Studio using exactly same information?
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: cavagnaro on February 19, 2020, 09:38:19 PM
Are u using standard sql instance?
TCP ip enabled?


Enviado de meu SM-N9600 usando o Tapatalk

Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Django on February 20, 2020, 06:13:53 AM
@Janis- yes i am able to connect mssql studio with the same creds.
@cavagnaro- yes TCP IP is enabled

Have you faced this issue at the deployment of framewore 8.5?
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Janis on February 20, 2020, 06:58:42 AM
Yes, when encryption was true with unencrypted password. :) Error message was same as yours, nothing about wrong password.
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Janis on February 20, 2020, 07:10:05 AM
I'd recommend to use Wireshark on port 1433. You will see more information about your problem.
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: borkokrz on February 20, 2020, 08:42:41 AM
I've had similar problems after some hardening done by the administrators of MSSQL 2014. I've even could not connect from HeidiSQL from the configuration server host or add new ODBC connection from that CS host to DB. I've had to update Microsoft OLE DB 18.3.0 Driver for SQL Server and Microsoft SQL Server 2012 Native Client and use alternative version of ODBC client as described here: https://docs.genesys.com/Documentation/FR/Current/DBConn/MSSQL#nextVersion

Even now I've in the logs [i]port -1[/i], so I think this is not a source of a problem. Can you post detailed logs from dbthread?
05:24:38.803 Trc 04500 Connecting to Database 'cfg_db' at host 'cxxxs3xxx1', port -1
05:24:39.787 Std 04503 Connected to Database 'cfg_db' at host 'cxxxs3xxx1', port -1
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Django on February 20, 2020, 10:18:29 AM
In MSSQL ERRORLOG I am getting below error

14:35:50.77 Logon      Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'ConfigDB'. [CLIENT: xx.xx.xx.xx]
2020-02-20
14:36:00.80 Logon      Error: 18456, Severity: 14, State: 38

is there some more configuration for MSSQL for connecting with dbserver except the script part which i have executed.
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Janis on February 20, 2020, 10:26:57 AM
Nothing to do in Genesys. Check MSSQL side.
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: cavagnaro on February 20, 2020, 10:55:24 AM
The user you are using is as dbo or db_owner?


Enviado de meu SM-N9600 usando o Tapatalk

Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: G on February 21, 2020, 09:02:16 PM
[quote author=Django link=topic=11542.msg52544#msg52544 date=1582193909]
In MSSQL ERRORLOG I am getting below error

14:35:50.77 Logon      Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'ConfigDB'. [CLIENT: xx.xx.xx.xx]
2020-02-20
14:36:00.80 Logon      Error: 18456, Severity: 14, State: 38

is there some more configuration for MSSQL for connecting with dbserver except the script part which i have executed.
[/quote]

Looks like the sa user does not have proper security access to the ConfigDB database.
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Django on February 26, 2020, 09:18:54 AM
Thanks.
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: cavagnaro on February 26, 2020, 11:06:21 AM
Fixed?

Enviado de meu SM-N9600 usando o Tapatalk

Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: cavagnaro on February 26, 2020, 11:07:21 AM
[quote author=Janis link=topic=11542.msg52541#msg52541 date=1582182605]
I'd recommend to use Wireshark on port 1433. You will see more information about your problem.
[/quote]SQL is encrypted... You can't see the negotiation using standard Wireshark

Enviado de meu SM-N9600 usando o Tapatalk

Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Janis on February 26, 2020, 11:12:11 AM
I was able to get the error from there when password was wrong in the .cfg file.
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: cavagnaro on February 26, 2020, 11:14:30 AM
Wasn't SQL Profiler?

Enviado de meu SM-N9600 usando o Tapatalk

Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Janis on February 26, 2020, 11:20:55 AM
No. But you are very likely right in case when login was successful but later do not have some internal rights in MSSQL like it was in this case. Checking MSSQL logs would be more universal method.
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: cavagnaro on February 26, 2020, 11:24:12 AM
Not because rights, it is because sql natively encrypts all communications even before login... So... Kinda hard to imagine how you could catch a wrong password using Wireshark. Because of the protocol, not because of the negotiation.


Enviado de meu SM-N9600 usando o Tapatalk

Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: Janis on February 26, 2020, 11:39:17 AM
Made a quick test. Here is the content of captured packet received from MSSQL server:


[code]H*~
)CT%E\@:_C9 jPhmTHLogin failed for user 'sa'. MSSQL2012[/code]
Title: Re: Unable to connect framework 8.5 with MSSQL
Post by: cavagnaro on February 26, 2020, 11:40:37 AM
[emoji102] Welp... Hehe what a surprise
Thanks for taking the time to show me! Appreciate it
Thanks!

Enviado de meu SM-N9600 usando o Tapatalk