# Metricbeat MSSQL module How to configure SQL server connection on other TCP listening ports

**URL:** <https://discuss.elastic.co/t/metricbeat-mssql-module-how-to-configure-sql-server-connection-on-other-tcp-listening-ports/179936>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [May 7, 2019, 10:36am UTC](https://discuss.elastic.co/t/metricbeat-mssql-module-how-to-configure-sql-server-connection-on-other-tcp-listening-ports/179936 "2019-05-07T10:36:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerome\_Cabaret](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerome_cabaret/32/44982_2.png) [@Jerome\_Cabaret](https://discuss.elastic.co/u/Jerome_Cabaret)\
**Post date:** [May 7, 2019, 10:36am UTC](https://discuss.elastic.co/t/metricbeat-mssql-module-how-to-configure-sql-server-connection-on-other-tcp-listening-ports/179936/1 "2019-05-07T10:36:07Z")

</div>

How to configure the hosts with a different tcp listen port

=========================================================

- module: mssql  
metricsets:

2019-05-07T12:40:06.656+0200 ERROR instance/beat.go:802 Exiting: 1 error: 2 errors: could not create connection to db: error doing ping to db: Invalid tcp port '51964)': strconv.ParseUint: parsing "51964)": invalid syntax; could  
not create connection to db: error doing ping to db: Invalid tcp port '51964)': strconv.ParseUint: parsing "51964)": invalid syntax  
Exiting: 1 error: 2 errors: could not create connection to db: error doing ping to db: Invalid tcp port '51964)': strconv.ParseUint: parsing "51964)": invalid syntax; could not create connection to db: error doing ping to db: Invalid tcp  
port '51964)': strconv.ParseUint: parsing "51964)": invalid syntax  
PS C:\Program Files\metricbeat\>

---

<div class="post-metadata">

**Author:** ![Tommy\_Bollhofer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tommy_bollhofer/32/45762_2.png) [@Tommy\_Bollhofer](https://discuss.elastic.co/u/Tommy_Bollhofer)\
**Post date:** [May 7, 2019, 6:46pm UTC](https://discuss.elastic.co/t/metricbeat-mssql-module-how-to-configure-sql-server-connection-on-other-tcp-listening-ports/179936/2 "2019-05-07T18:46:22Z")

</div>

Correct format appears to be:

["sqlserver://user:password@localhost:51964"]

---

<div class="post-metadata">

**Author:** ![kranth.pothuganti](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@kranth.pothuganti](https://discuss.elastic.co/u/kranth.pothuganti)\
**Post date:** [May 10, 2019, 7:08am UTC](https://discuss.elastic.co/t/metricbeat-mssql-module-how-to-configure-sql-server-connection-on-other-tcp-listening-ports/179936/3 "2019-05-10T07:08:43Z")

</div>

How can i ask the metric beat to use windows authentication instead of sql authentication?

---

<div class="post-metadata">

**Author:** ![CristianoFerreira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cristianoferreira/32/47529_2.png) [@CristianoFerreira](https://discuss.elastic.co/u/CristianoFerreira)\
**Post date:** [May 14, 2019, 4:42pm UTC](https://discuss.elastic.co/t/metricbeat-mssql-module-how-to-configure-sql-server-connection-on-other-tcp-listening-ports/179936/4 "2019-05-14T16:42:50Z")

</div>

Hi, I have the same issue and the format : `hosts: ["sqlserver://user:password@localhost:1433"]` didn't work.  
Have this issue been solved ?

---

<div class="post-metadata">

**Author:** ![yeo34](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yeo34/32/46745_2.png) [@yeo34](https://discuss.elastic.co/u/yeo34)\
**Post date:** [May 23, 2019, 6:13pm UTC](https://discuss.elastic.co/t/metricbeat-mssql-module-how-to-configure-sql-server-connection-on-other-tcp-listening-ports/179936/5 "2019-05-23T18:13:34Z")

</div>

Hi ,

I have a two instance in sql. I done configuration but didnt it. You can see below error messages.

["sqlserver://user:password@localhost:1433"]

Exiting: 1 error: 2 errors: could not create connection to db: error doing ping to db: Unable to open tcp connection with host 'localhost:51964': dial tcp [::1]:51964: connectex: No connection could be made because the target machine actively refused it.

How can i resolve ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 20, 2019, 6:13pm UTC](https://discuss.elastic.co/t/metricbeat-mssql-module-how-to-configure-sql-server-connection-on-other-tcp-listening-ports/179936/6 "2019-06-20T18:13:49Z")

</div>

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