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

sqlserver "panic: Not implemented" #9266

Closed
biohazardxxx opened this issue May 12, 2021 · 3 comments · Fixed by #9358
Closed

sqlserver "panic: Not implemented" #9266

biohazardxxx opened this issue May 12, 2021 · 3 comments · Fixed by #9358
Labels
area/sqlserver bug unexpected problem or unintended behavior platform/windows

Comments

@biohazardxxx
Copy link

Relevant telegraf.conf:

[[inputs.sqlserver]]
  ## Specify instances to monitor with a list of connection strings.
  ## All connection parameters are optional.
  ## By default, the host is localhost, listening on default port, TCP 1433.
  ##   for Windows, the user is the currently running AD user (SSO).
  ##   See https://github.com/denisenkom/go-mssqldb for detailed connection
  ##   parameters.
  servers = [
    "Server=xxxxx.database.windows.net;Port=1433;User Id=telegraf;Password=xxxx;app name=telegraf;log=1;",		
   ]

  ## This enables a specific set of queries depending on the database type. If specified, it replaces azuredb = true/false and query_version = 2
  ## In the config file, the sql server plugin section should be repeated  each with a set of servers for a specific database_type.
  ## Possible values for database_type are  
  ## "AzureSQLDB" 
  ## "SQLServer"
  ## "AzureSQLManagedInstance"
  database_type = "AzureSQLManagedInstance"
  
  ## Optional parameter, setting this to 2 will use a new version
  ## of the collection queries that break compatibility with the original
  ## dashboards.
  ## query_version = 2

  ## If you are using AzureDB, setting this to true will gather resource utilization metrics
  ## azuredb = true

  ## If you would like to exclude some of the metrics queries, list them here
  ## Possible choices:
  ## - PerformanceCounters
  ## - WaitStatsCategorized
  ## - DatabaseIO
  ## - DatabaseProperties
  ## - CPUHistory
  ## - DatabaseSize
  ## - DatabaseStats
  ## - MemoryClerk
  ## - VolumeSpace
  # exclude_query = [ 'DatabaseIO' ]

System info:

  • Windows Server 2012 R2
  • telegraf-1.18.2_windows_amd64
  • AzureSQLManagedInstance

Actual behavior:

D:\telegraf>D:\telegraf\telegraf.exe --console --config D:\
telegraf\telegrafSQL.conf 
2021-05-12T11:40:24Z I! Starting Telegraf 1.18.2
panic: Not implemented

goroutine 59 [running]:
github.com/denisenkom/go-mssqldb.timeoutConn.SetWriteDeadline(...)
        /go/pkg/mod/github.com/denisenkom/[email protected]
a521ff4/net.go:102
crypto/tls.(*Conn).SetWriteDeadline(...)
        /usr/local/go/src/crypto/tls/conn.go:150
crypto/tls.(*Conn).closeNotify(0xc00010f880, 0x0, 0x0)
        /usr/local/go/src/crypto/tls/conn.go:1360 +0x10d
crypto/tls.(*Conn).Close(0xc00010f880, 0x0, 0x0)
        /usr/local/go/src/crypto/tls/conn.go:1330 +0xe5
github.com/denisenkom/go-mssqldb.(*Conn).Close(0xc000314cc0, 0x0, 0x0)
        /go/pkg/mod/github.com/denisenkom/[email protected]
a521ff4/mssql.go:359 +0x42
database/sql.(*driverConn).finalClose.func2()
        /usr/local/go/src/database/sql/sql.go:592 +0x50
database/sql.withLock(0x409ee50, 0xc000188870, 0xc0009e5c80)
        /usr/local/go/src/database/sql/sql.go:3294 +0x70
database/sql.(*driverConn).finalClose(0xc000188870, 0xc000188890, 0x3b68a38)
        /usr/local/go/src/database/sql/sql.go:590 +0x145
database/sql.(*DB).Close(0xc0001132b0, 0x0, 0x0)
        /usr/local/go/src/database/sql/sql.go:847 +0x288
github.com/influxdata/telegraf/plugins/inputs/sqlserver.(*SQLServer).gatherServe
r(0xc000258180, 0xc00027a631, 0x85, 0x398c53b, 0x14, 0x3ae7c73, 0x3e7, 0x0, 0xc0
004e5540, 0x13, ...)
        /go/src/github.com/influxdata/telegraf/plugins/inputs/sqlserver/sqlserve
r.go:268 +0x3e5
github.com/influxdata/telegraf/plugins/inputs/sqlserver.(*SQLServer).Gather.func
1(0xc0005e8030, 0x40fa718, 0xc0002e4a60, 0xc000258180, 0xc00027a631, 0x85, 0x398
c53b, 0x14, 0x3ae7c73, 0x3e7, ...)
        /go/src/github.com/influxdata/telegraf/plugins/inputs/sqlserver/sqlserve
r.go:231 +0xe5
created by github.com/influxdata/telegraf/plugins/inputs/sqlserver.(*SQLServer).
Gather
        /go/src/github.com/influxdata/telegraf/plugins/inputs/sqlserver/sqlserve
r.go:229 +0x186

Additional info:

It works ok with telegraf-1.16.1_windows_amd64

Same error with the new type of config as described on current README

  database_type = "AzureSQLManagedInstance"

  include_query = []
  exclude_query = ["SQLServerAvailabilityReplicaStates", "SQLServerDatabaseReplicaStates"]
  azuredb = true
@biohazardxxx biohazardxxx added the bug unexpected problem or unintended behavior label May 12, 2021
@jjh74
Copy link
Contributor

jjh74 commented Jun 1, 2021

Recent go-mssqldb(v0.10.0) might have a fix for this(denisenkom/go-mssqldb#642)

@ghost
Copy link

ghost commented Jun 7, 2021

This issue is reproduced at the SQL server with a self-signed certificate. As jjh75 mentions this issue could be fixed with an update to go-mssqldb(v0.10.0), it there any chances to have this fix in the next release?

@Purneau
Copy link

Purneau commented Jun 17, 2021

I can confirm this issue is also present on linux and also solved for linux in the nightly build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sqlserver bug unexpected problem or unintended behavior platform/windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants