# Connection refused connecting to https://chefserver

**URL:** <https://discourse.chef.io/t/connection-refused-connecting-to-https-chefserver/12874>\
**Category:** Chef Infra (archive)\
**Created:** [April 5, 2018, 11:46am UTC](https://discourse.chef.io/t/connection-refused-connecting-to-https-chefserver/12874 "2018-04-05T11:46:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![waikar](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@waikar](https://discourse.chef.io/u/waikar)\
**Post date:** [April 5, 2018, 11:46am UTC](https://discourse.chef.io/t/connection-refused-connecting-to-https-chefserver/12874/1 "2018-04-05T11:46:46Z")

</div>

While connecting to Chef server by chef-client, The chef node is getting below issue.

* * *

[2018-04-05T07:34:16+00:00] INFO: \*\*\* Chef 12.21.3 \*\*\*  
[2018-04-05T07:34:16+00:00] INFO: Platform: x64-mingw32  
[2018-04-05T07:34:16+00:00] INFO: Chef-client pid: 3340  
[2018-04-05T07:34:16+00:00] INFO: The plugin path C:\chef\ohai\plugins does not exist. Skipping…  
[2018-04-05T07:34:33+00:00] ERROR: Connection refused connecting to https:///organizations/harshal/nodes/1430404\_VisServer, retry 1/5  
[2018-04-05T07:34:39+00:00] ERROR: Connection refused connecting to https:///organizations/harshal/nodes/1430404\_VisServer, retry 2/5  
[2018-04-05T07:34:45+00:00] ERROR: Connection refused connecting to https:///organizations/harshal/nodes/1430404\_VisServer, retry 3/5  
[2018-04-05T07:34:51+00:00] ERROR: Connection refused connecting to https:///organizations/harshal/nodes/1430404\_VisServer, retry 4/5  
[2018-04-05T07:34:57+00:00] ERROR: Connection refused connecting to https:///organizations/harshal/nodes/1430404\_VisServer, retry 5/5  
e[0m  
================================================================================e[0m  
e[31mChef encountered an error attempting to load the node data for "1430404\_VisServer"e[0m  
================================================================================e[0m

e[0mNetworking Error:e[0m  
-----------------e[0m  
No connection could be made because the target machine actively refused it. - Connection refused connecting to https:///organizations/harshal/nodes/1430404\_VisServer, giving up  
e[0m  
e[0mYour chef\_server\_url may be misconfigured, or the network could be down.  
e[0m  
e[0mRelevant Config Settings:e[0m  
-------------------------e[0m  
chef\_server\_url “https:///organizations/harshal/”  
e[0m  
e[0mSystem Info:e[0m  
------------e[0m  
chef\_version=12.21.3  
e[0mruby=ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]  
e[0mprogram\_name=C:/opscode/chef/bin/chef-client  
e[0mexecutable=C:/opscode/chef/bin/chef-cliente[0m

e[0m[2018-04-05T07:35:03+00:00] ERROR: Running exception handlers  
[2018-04-05T07:35:03+00:00] ERROR: Exception handlers complete  
[2018-04-05T07:35:04+00:00] FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out  
[2018-04-05T07:35:04+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report  
[2018-04-05T07:35:04+00:00] FATAL: Errno::ECONNREFUSED: No connection could be made because the target machine actively refused it. - Connection refused connecting to https:///organizations/harshal/nodes/1430404\_VisServer, giving up

* * *

Also you can take a look at erchef.log which I got inside the chef server machine  
2018-04-03 07:56:55.138 [error] gen\_server \<0.1429.0\> terminated with reason: socket\_closed\_unexpectedly  
2018-04-03 07:56:55.138 [error] CRASH REPORT Process \<0.1429.0\> with 0 neighbours exited with reason: socket\_closed\_unexpectedly in gen\_server:terminate/7 line 826  
2018-04-03 07:56:55.138 [error] Supervisor {\<0.1427.0\>,amqp\_connection\_sup} had child at module undefined at \<0.1429.0\> exit with reason socket\_closed\_unexpectedly in context child\_terminated  
2018-04-03 07:56:55.138 [error] Supervisor {\<0.1427.0\>,amqp\_connection\_sup} had child at module undefined at \<0.1429.0\> exit with reason reached\_max\_restart\_intensity in context shutdown  
2018-04-03 07:56:55.139 [error] gen\_server \<0.1498.0\> terminated with reason: socket\_closed\_unexpectedly  
2018-04-03 07:56:55.139 [error] gen\_server \<0.1506.0\> terminated with reason: {server\_initiated\_close,320,\<\<“CONNECTION\_FORCED - broker forced connection closure with reason ‘shutdown’”\>\>}  
2018-04-03 07:56:55.139 [error] CRASH REPORT Process \<0.1506.0\> with 0 neighbours exited with reason: {server\_initiated\_close,320,\<\<“CONNECTION\_FORCED - broker forced connection closure with reason ‘shutdown’”\>\>} in gen\_server:terminate/7 line 826  
2018-04-03 07:56:55.139 [error] CRASH REPORT Process \<0.1498.0\> with 0 neighbours exited with reason: socket\_closed\_unexpectedly in gen\_server:terminate/7 line 826  
2018-04-03 07:56:55.139 [error] Supervisor {\<0.1505.0\>,amqp\_channel\_sup} had child at module undefined at \<0.1506.0\> exit with reason {server\_initiated\_close,320,\<\<“CONNECTION\_FORCED - broker forced connection closure with reason ‘shutdown’”\>\>} in context child\_terminated  
2018-04-03 07:56:55.139 [error] Supervisor {\<0.1505.0\>,amqp\_channel\_sup} had child at module undefined at \<0.1506.0\> exit with reason reached\_max\_restart\_intensity in context shutdown  
2018-04-03 07:56:55.139 [error] Supervisor {\<0.1496.0\>,amqp\_connection\_sup} had child at module undefined at \<0.1498.0\> exit with reason socket\_closed\_unexpectedly in context child\_terminated  
2018-04-03 07:56:55.139 [error] Supervisor {\<0.1496.0\>,amqp\_connection\_sup} had child at module undefined at \<0.1498.0\> exit with reason reached\_max\_restart\_intensity in context shutdown  
2018-04-03 07:56:56.140 [warning] Could not start the network driver: econnrefused  
2018-04-03 07:56:56.140 [error] gen\_server \<0.3122.0\> terminated with reason: econnrefused in amqp\_network\_connection:do\_connect/1 line 337  
2018-04-03 07:56:56.140 [error] CRASH REPORT Process \<0.3122.0\> with 0 neighbours exited with reason: econnrefused in gen\_server:terminate/7 line 826  
2018-04-03 07:56:56.140 [error] Supervisor {\<0.3120.0\>,amqp\_connection\_sup} had child at module undefined at \<0.3122.0\> exit with reason econnrefused in context child\_terminated  
2018-04-03 07:56:56.140 [error] Supervisor {\<0.3120.0\>,amqp\_connection\_sup} had child at module undefined at \<0.3122.0\> exit with reason reached\_max\_restart\_intensity in context shutdown  
2018-04-03 07:56:56.140 [error] “Could not connect, scheduling reconnect.”, error: {{error,{badmatch,{error,{auth\_failure\_likely,{econnrefused,{gen\_server,call,[\<0.3122.0\>,connect,infinity]}}}}},[{bunny\_util,connect,1,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/bunny\_util.erl"},{line,191}]},{gen\_bunny\_mon,do\_connect,3,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/gen\_bunny\_mon.erl"},{line,192}]},{gen\_bunny\_mon,handle\_info,2,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/gen\_bunny\_mon.erl"},{line,134}]},{gen\_server,try\_dispatch,4,[{file,“gen\_server.erl”},{line,615}]},{gen\_server,handle\_msg,5,[{file,“gen\_server.erl”},{line,681}]},{proc\_lib,init\_p\_do\_apply,3,[{file,“proc\_lib.erl”},{line,240}]}]},{connection\_info,{network,{127,0,0,1},5672,{\<\<“actions”\>\>,\<\<“6d0516cd7492abac1fa77eb5437a32259dfe088f7829fff5b0f0f1446b9e95b2262c7617e4e1d974d78690466b0f2d1b2ac0”\>\>},\<\<"/analytics"\>\>}}}  
2018-04-03 07:56:56.140 [warning] Could not start the network driver: econnrefused  
2018-04-03 07:56:56.140 [error] gen\_server \<0.3125.0\> terminated with reason: econnrefused in amqp\_network\_connection:do\_connect/1 line 337  
2018-04-03 07:56:56.140 [error] CRASH REPORT Process \<0.3125.0\> with 0 neighbours exited with reason: econnrefused in gen\_server:terminate/7 line 826  
2018-04-03 07:56:56.141 [error] Supervisor {\<0.3123.0\>,amqp\_connection\_sup} had child at module undefined at \<0.3125.0\> exit with reason econnrefused in context child\_terminated  
2018-04-03 07:56:56.141 [error] Supervisor {\<0.3123.0\>,amqp\_connection\_sup} had child at module undefined at \<0.3125.0\> exit with reason reached\_max\_restart\_intensity in context shutdown  
2018-04-03 07:56:56.141 [error] “Could not connect, scheduling reconnect.”, error: {{error,{badmatch,{error,{auth\_failure\_likely,{econnrefused,{gen\_server,call,[\<0.3125.0\>,connect,infinity]}}}}},[{bunny\_util,connect,1,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/bunny\_util.erl"},{line,191}]},{gen\_bunny\_mon,do\_connect,3,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/gen\_bunny\_mon.erl"},{line,192}]},{gen\_bunny\_mon,handle\_info,2,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/gen\_bunny\_mon.erl"},{line,134}]},{gen\_server,try\_dispatch,4,[{file,“gen\_server.erl”},{line,615}]},{gen\_server,handle\_msg,5,[{file,“gen\_server.erl”},{line,681}]},{proc\_lib,init\_p\_do\_apply,3,[{file,“proc\_lib.erl”},{line,240}]}]},{connection\_info,{network,{127,0,0,1},5672,{\<\<“chef”\>\>,\<\<“1198289e794372673db73474942ece319d50d9bc15c5e1a455965c790473a95dcec5c604a3e2b22698ae0fafed9f9e028933”\>\>},\<\<"/chef"\>\>}}}  
2018-04-03 07:56:57.142 [warning] Could not start the network driver: econnrefused  
2018-04-03 07:56:57.142 [error] gen\_server \<0.3128.0\> terminated with reason: econnrefused in amqp\_network\_connection:do\_connect/1 line 337  
2018-04-03 07:56:57.142 [error] CRASH REPORT Process \<0.3128.0\> with 0 neighbours exited with reason: econnrefused in gen\_server:terminate/7 line 826  
2018-04-03 07:56:57.142 [error] Supervisor {\<0.3126.0\>,amqp\_connection\_sup} had child at module undefined at \<0.3128.0\> exit with reason econnrefused in context child\_terminated  
2018-04-03 07:56:57.142 [error] Supervisor {\<0.3126.0\>,amqp\_connection\_sup} had child at module undefined at \<0.3128.0\> exit with reason reached\_max\_restart\_intensity in context shutdown  
2018-04-03 07:56:57.143 [error] “Could not connect, scheduling reconnect.”, error: {{error,{badmatch,{error,{auth\_failure\_likely,{econnrefused,{gen\_server,call,[\<0.3128.0\>,connect,infinity]}}}}},[{bunny\_util,connect,1,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/bunny\_util.erl"},{line,191}]},{gen\_bunny\_mon,do\_connect,3,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/gen\_bunny\_mon.erl"},{line,192}]},{gen\_bunny\_mon,handle\_info,2,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/gen\_bunny\_mon.erl"},{line,134}]},{gen\_server,try\_dispatch,4,[{file,“gen\_server.erl”},{line,615}]},{gen\_server,handle\_msg,5,[{file,“gen\_server.erl”},{line,681}]},{proc\_lib,init\_p\_do\_apply,3,[{file,“proc\_lib.erl”},{line,240}]}]},{connection\_info,{network,{127,0,0,1},5672,{\<\<“actions”\>\>,\<\<“6d0516cd7492abac1fa77eb5437a32259dfe088f7829fff5b0f0f1446b9e95b2262c7617e4e1d974d78690466b0f2d1b2ac0”\>\>},\<\<"/analytics"\>\>}}}  
2018-04-03 07:56:57.143 [warning] Could not start the network driver: econnrefused  
2018-04-03 07:56:57.143 [error] gen\_server \<0.3131.0\> terminated with reason: econnrefused in amqp\_network\_connection:do\_connect/1 line 337  
2018-04-03 07:56:57.143 [error] CRASH REPORT Process \<0.3131.0\> with 0 neighbours exited with reason: econnrefused in gen\_server:terminate/7 line 826  
2018-04-03 07:56:57.143 [error] Supervisor {\<0.3129.0\>,amqp\_connection\_sup} had child at module undefined at \<0.3131.0\> exit with reason econnrefused in context child\_terminated  
2018-04-03 07:56:57.143 [error] Supervisor {\<0.3129.0\>,amqp\_connection\_sup} had child at module undefined at \<0.3131.0\> exit with reason reached\_max\_restart\_intensity in context shutdown  
2018-04-03 07:56:57.143 [error] “Could not connect, scheduling reconnect.”, error: {{error,{badmatch,{error,{auth\_failure\_likely,{econnrefused,{gen\_server,call,[\<0.3131.0\>,connect,infinity]}}}}},[{bunny\_util,connect,1,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/bunny\_util.erl"},{line,191}]},{gen\_bunny\_mon,do\_connect,3,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/gen\_bunny\_mon.erl"},{line,192}]},{gen\_bunny\_mon,handle\_info,2,[{file,"/var/cache/omnibus/src/oc\_erchef/\_build/default/lib/gen\_bunny/src/gen\_bunny\_mon.erl"},{line,134}]},{gen\_server,try\_dispatch,4,[{file,“gen\_server.erl”},{line,615}]},{gen\_server,handle\_msg,5,[{file,“gen\_server.erl”},{line,681}]},{proc\_lib,init\_p\_do\_apply,3,[{file,“proc\_lib.erl”},{line,240}]}]},{connection\_info,{network,{127,0,0,1},5672,{\<\<“chef”\>\>,\<\<“1198289e794372673db73474942ece319d50d9bc15c5e1a455965c790473a95dcec5c604a3e2b22698ae0fafed9f9e028933”\>\>},\<\<"/chef"\>\>}}}  
2018-04-03 07:56:58.143 [warning] Could not start the network driver: econnrefused

* * *

While searching for the solution, I came across two configuration variable rabbitmq[‘rabbit\_mgmt\_http\_max\_count’] with default value 100 and rabbitmq[‘rabbit\_mgmt\_timeout’] with default value 30000

But I am confused what value should I give to overwrite default so that Error would not come again?

---

<div class="post-metadata">

**Author:** ![btm](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/btm/32/1089_2.png) [@btm](https://discourse.chef.io/u/btm)\
**Post date:** [April 5, 2018, 3:49pm UTC](https://discourse.chef.io/t/connection-refused-connecting-to-https-chefserver/12874/2 "2018-04-05T15:49:02Z")

</div>

> [@waikar](#):
>
> chef\_server\_url “https:///organizations/harshal/”

It doesn't look like your `client.rb` contains a valid URL to your Chef Server, it is missing the hostname. Typically that file is `C:/chef/client.rb` on Windows.

---

<div class="post-metadata">

**Author:** ![waikar](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@waikar](https://discourse.chef.io/u/waikar)\
**Post date:** [April 6, 2018, 4:38am UTC](https://discourse.chef.io/t/connection-refused-connecting-to-https-chefserver/12874/3 "2018-04-06T04:38:20Z")

</div>

chef server url is correct: while uploading the post, there it was not allowing a hyperlink in the post hence removed the URL:

The URL is like this: [https://chefserver-hhw0403.useastad01.awssisw.com/organizations/harshal/nodes/1430403\_VisServer](https://chefserver-hhw0403.useastad01.awssisw.com/organizations/harshal/nodes/1430403_VisServer)

---

<div class="post-metadata">

**Author:** ![waikar](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@waikar](https://discourse.chef.io/u/waikar)\
**Post date:** [April 6, 2018, 4:40am UTC](https://discourse.chef.io/t/connection-refused-connecting-to-https-chefserver/12874/4 "2018-04-06T04:40:03Z")

</div>

chef server url is correct: while uploading the post, there it was not allowing a hyperlink in the post hence removed the URL:

The URL is like this: [https://chefserver-hhw0403.useastad01.awssisw.com/organizations/harshal/nodes/1430403\_VisServer](https://chefserver-hhw0403.useastad01.awssisw.com/organizations/harshal/nodes/1430403_VisServer)

So anywhere you see chef server url , It will be like above link.

---

<div class="post-metadata">

**Author:** ![btm](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/btm/32/1089_2.png) [@btm](https://discourse.chef.io/u/btm)\
**Post date:** [April 6, 2018, 3:57pm UTC](https://discourse.chef.io/t/connection-refused-connecting-to-https-chefserver/12874/5 "2018-04-06T15:57:04Z")

</div>

Do you have other nodes successfully connecting to the Chef Server?

Can you run `chef-server-ctl status` and `chef-server-ctl test` successfully on the Chef Server?
