Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No instance matching XYZ returned from the host #772

Closed
adcorduneanu opened this issue Oct 29, 2022 · 2 comments
Closed

No instance matching XYZ returned from the host #772

adcorduneanu opened this issue Oct 29, 2022 · 2 comments

Comments

@adcorduneanu
Copy link

adcorduneanu commented Oct 29, 2022

I'm trying to integrate my k6 project with MSSQL, and seems there is a problem with the current setup of this implementation that's used in xk6-sql setup.

My MSSQL instance is a named instance on the current server and seems this is not accessible from the Go implementation, even that one works from anywhere else - visual studio, ssms, real apps, you name it...

I tried tampering with the connection string in all 3 formats, but nothing changed.

A screenshot proving the issue.
image
image
image

Win OS used - v10 21H2
Go version - version go1.19.2 windows/amd64
This software version, used in xk6 - v0.12.0

Choco command to setup a similar SQL setup

choco install "sql-server-2019" -y --params='"/INSTANCENAME:SQL2012  /SkipRules:RebootRequiredCheck /IACCEPTSQLSERVERLICENSETERMS /Q /INDICATEPROGRESS /FEATURES:SQLEngine,FULLTEXT,AS,IS,BC,Conn  /SQLCOLLATION:Latin1_General_100_CI_AS /ASSERVERMODE:MULTIDIMENSIONAL /ASSYSADMINACCOUNTS:Users /ASCOLLATION:Latin1_General_100_CI_AS /FILESTREAMLEVEL:2 /FILESTREAMSHARENAME:SQL2012_Filestream /SQLMAXMEMORY:6144"'

Actual behavior
Using a named instance does not work

Expected behavior
Using named instances should work

Additional stuff
For xk6-sql just followed the steps described here and as a code example, I followed this example.

@NikitaDef
Copy link
Contributor

I'm trying to integrate my k6 project with MSSQL, and seems there is a problem with the current setup of this implementation that's used in xk6-sql setup.

My MSSQL instance is a named instance on the current server and seems this is not accessible from the Go implementation, even that one works from anywhere else - visual studio, ssms, real apps, you name it...

I tried tampering with the connection string in all 3 formats, but nothing changed.

A screenshot proving the issue. image image image

Win OS used - v10 21H2 Go version - version go1.19.2 windows/amd64 This software version, used in xk6 - v0.12.0

Choco command to setup a similar SQL setup

choco install "sql-server-2019" -y --params='"/INSTANCENAME:SQL2012  /SkipRules:RebootRequiredCheck /IACCEPTSQLSERVERLICENSETERMS /Q /INDICATEPROGRESS /FEATURES:SQLEngine,FULLTEXT,AS,IS,BC,Conn  /SQLCOLLATION:Latin1_General_100_CI_AS /ASSERVERMODE:MULTIDIMENSIONAL /ASSYSADMINACCOUNTS:Users /ASCOLLATION:Latin1_General_100_CI_AS /FILESTREAMLEVEL:2 /FILESTREAMSHARENAME:SQL2012_Filestream /SQLMAXMEMORY:6144"'

Actual behavior Using a named instance does not work

Expected behavior Using named instances should work

Additional stuff For xk6-sql just followed the steps described here and as a code example, I followed this example.

Hi, I guess, it depends on that code lines.

go-mssqldb/tds.go

Line 1054 in e538731

if len(p.Instance) > 0 && p.Port != 0 && uint64(p.LogFlags)&logDebug != 0 {

Remove port in connection string.

@adcorduneanu
Copy link
Author

adcorduneanu commented Oct 29, 2022

Hi @NikitaDef,

Thank you for your help.

I will close the issue as this one is fixed - for me, at least.

To provide some insights for those who might encounter the same issue - this was not a server setup, but a development computer, and until now I didn't require my SQL server to be exposed over TCP.

After the modification of the TCP configuration, and a computer restarts it worked, as this didn't work with only service restart.
image

What it's weird is the fact that even if it's local, and any other client connects, this one doesn't as it treats it as a remote, even isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants