E! Error in plugin [inputs.sqlserver]: existing connection was forcibly closed by the remote host

Hello,

Upon testing mssql plugin with telegraf ( telegraf.exe --config telegraf.conf --test ) i get the following error:

2020-03-09T15:27:53Z E! Error in plugin [inputs.sqlserver]: write tcp [::1]:58732->[::1]:1433: wsasend: An existing connection was forcibly closed by the remote host.

go version 1.10.2
sql server version 2017
windows server 2010 Enterprise

telegraf.conf
[[inputs.sqlserver]]
servers = [
  "Server=127.0.0.1;Port=1433;Database=Master;User Id=telegraf;app name=telegraf;log=1;"
   ]

Do i need to upgrade “go” to make it work with MSSQL SERVER 2017 or is this related to TLS version.
Ref: #467

Thanks
Ashish

The Telegraf executable does not need external updates or similar.
Also that is a “generic” network error which might depend on lots of things (just do a quick search about it).

I don’t know if that’s a TLS problem, but I hope you will find out soon if that’s the case.

Just to check, can you try to change the auth method or reduce the number of queries sent to sql server?

  • Have you tried to use AD authentication? (remove the “user id” parameter and it will connect using the current AD user)
  • Can you try to run it with only the ‘ServerProperties’ query enabled? (exclude all the others)

I don’t think this will help but maybe we will see something different

Thank you for your response!
But it was fixed by upgrading go and pulled the latest repo of telegraf due to using sql server 2017.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.