# Connection error for metricbeat with mssql server

**URL:** <https://discuss.elastic.co/t/connection-error-for-metricbeat-with-mssql-server/188443>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 2, 2019, 6:56am UTC](https://discuss.elastic.co/t/connection-error-for-metricbeat-with-mssql-server/188443 "2019-07-02T06:56:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suraj\_Customer\_Exp\_L](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suraj_customer_exp_l/32/44972_2.png) [@Suraj\_Customer\_Exp\_L](https://discuss.elastic.co/u/Suraj_Customer_Exp_L)\
**Post date:** [July 2, 2019, 6:56am UTC](https://discuss.elastic.co/t/connection-error-for-metricbeat-with-mssql-server/188443/1 "2019-07-02T06:56:09Z")

</div>

i can't able to connect mssql server with metricbeat and fetch data into kibana.

i have configured mssql.yml file as

- module: mssql  
metricsets:
  - "transaction\_log"
  - "performance"  
hosts: ["sqlserver://user:password@192.168.1.212:1433"]  
period: 10s

i am getting error when running "./metricbeat -e"  
2019-07-02T12:19:36.716+0530 INFO module/wrapper.go:244 Error fetching data for metricset mysql.status: dial tcp 127.0.0.1:3306: connectex: No connection could be made because the target machine actively refused it.

logs:  
2019-07-02T12:19:35.706+0530 INFO helper/privileges\_windows.go:87 SeDebugPrivilege is enabled. SeDebugPrivilege=(Enabled)  
2019-07-02T12:19:35.712+0530 INFO cfgfile/reload.go:172 Config reloader started  
2019-07-02T12:19:35.715+0530 WARN [cfgwarn] transaction\_log/transaction\_log.go:58 BETA: The mssql transaction\_log metricset is beta.  
2019-07-02T12:19:35.753+0530 WARN [cfgwarn] performance/performance.go:52 BETA: The mssql performance metricset is beta.  
2019-07-02T12:19:35.780+0530 INFO cfgfile/reload.go:227 Loading of config files completed.  
2019-07-02T12:19:36.716+0530 INFO module/wrapper.go:244 Error fetching data for metricset mysql.status: dial tcp 127.0.0.1:3306: connectex: No connection could be made because the target machine actively refused it.  
2019-07-02T12:19:38.576+0530 INFO add\_cloud\_metadata/add\_cloud\_metadata.go:347 add\_cloud\_metadata: hosting provider type not detected.  
2019-07-02T12:19:39.578+0530 INFO pipeline/output.go:95 Connecting to backoff(elasticsearch([http://localhost:9200](http://localhost:9200)))  
2019-07-02T12:19:39.581+0530 INFO elasticsearch/client.go:735 Attempting to connect to Elasticsearch version 7.2.0  
2019-07-02T12:19:39.622+0530 INFO [index-management] idxmgmt/std.go:252 Auto ILM enable success.  
2019-07-02T12:19:39.624+0530 INFO [index-management.ilm] ilm/std.go:134 do not generate ilm policy: exists=true, overwrite=false  
2019-07-02T12:19:39.625+0530 INFO [index-management] idxmgmt/std.go:265 ILM policy successfully loaded.  
2019-07-02T12:19:39.628+0530 INFO [index-management] idxmgmt/std.go:394 Set setup.template.name to '{metricbeat-7.2.0 {now/d}-000001}' as ILM is enabled.  
2019-07-02T12:19:39.629+0530 INFO [index-management] idxmgmt/std.go:399 Set setup.template.pattern to 'metricbeat-7.2.0-\*' as ILM is enabled.  
2019-07-02T12:19:39.630+0530 INFO [index-management] idxmgmt/std.go:433 Set settings.index.lifecycle.rollover\_alias in template to {metricbeat-7.2.0 {now/d}-000001} as ILM is enabled.  
2019-07-02T12:19:39.631+0530 INFO [index-management] idxmgmt/std.go:437 Set settings.index.lifecycle.name in template to {metricbeat-7.2.0 {"policy":{"phases":{"hot":{"actions":{"rollover":{"max\_age":"30d","max\_size":"50gb"}}}}}}} as ILM is enabled.  
2019-07-02T12:19:39.639+0530 INFO template/load.go:88 Template metricbeat-7.2.0 already exists and will not be overwritten.  
2019-07-02T12:19:39.640+0530 INFO [index-management] idxmgmt/std.go:289 Loaded index template.  
2019-07-02T12:19:39.641+0530 INFO [index-management] idxmgmt/std.go:300 Write alias successfully generated.  
2019-07-02T12:19:39.642+0530 INFO pipeline/output.go:105 Connection to backoff(elasticsearch([http://localhost:9200](http://localhost:9200))) established  
2019-07-02T12:19:47.720+0530 INFO module/wrapper.go:244 Error fetching data for metricset mysql.status: dial tcp 127.0.0.1:3306: connectex: No connection could be made because the target machine actively refused it.

---

<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:** [July 30, 2019, 6:56am UTC](https://discuss.elastic.co/t/connection-error-for-metricbeat-with-mssql-server/188443/2 "2019-07-30T06:56:09Z")

</div>

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