# Connection error message in sensu-client.log file

**URL:** <https://discourse.sensu.io/t/connection-error-message-in-sensu-client-log-file/57>\
**Category:** Sensu Classic (EOL)\
**Created:** [July 7, 2013, 11:18am UTC](https://discourse.sensu.io/t/connection-error-message-in-sensu-client-log-file/57 "2013-07-07T11:18:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dogucan\_Kip](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@Dogucan\_Kip](https://discourse.sensu.io/u/Dogucan_Kip)\
**Post date:** [July 7, 2013, 11:18am UTC](https://discourse.sensu.io/t/connection-error-message-in-sensu-client-log-file/57/1 "2013-07-07T11:18:24Z")

</div>

About project:

- I have 2 virtual machines on vmware and their operating system is ubuntu 13.04.  
-First virtual machine will be sensu-server, Second virtual machine will be sensu-client.

-They will send messages to each other via rabbitmq message system bus.

> **···**
>
> * * *
> 
> * * *
> 
> -I have installed sensu with all components to both of virtual machines.
> 
> -I  
> have configured two machines to connect to rabbitmq but I am not sure is that right? I sent my config files below. Where is incorrect?  
> -I have only enabled sensu-client(command: /etc/init.d/sensu-client restart) on client-machine.  
> -I have enabled all components of server virtual machine except client.(server,api,dashboard).
> 
> * * *
> 
> My files of client machine:  
> /etc/sensu/----\> config.json  
> /etc/sensu/conf.d-----\>client.json  
> /etc/rabbitmq/-----\>rabbitmq.config
> 
> My files of server machine  
> /etc/sensu/-----\>config.json  
> /etc/sensu/conf.d----\>check\_cron.json  
> /etc/rabbitmq/-----\>rabbitmq.config  
> /etc/sensu/plugins------\>check\_procs.rb  
> just like [http://docs.sensuapp.org/0.9/adding\_a\_check.html](http://docs.sensuapp.org/0.9/adding_a_check.html)
> 
> * * *
> 
> inet address of server machine is: [192.168.159.129](http://192.168.159.129)
> 
> config file of client machine
> 
> {  
> “rabbitmq”: {  
> “ssl”: {  
> “private\_key\_file”: “/etc/sensu/ssl/client\_key.pem”,  
> “cert\_chain\_file”: “/etc/sensu/ssl/client\_cert.pem”
> 
> ```
> },
> "port": 5671,
> "host": "[192.168.159.129](http://192.168.159.129)",
> "user": "sensu",
> 
> "password": "mypass",
> "vhost": "/sensu"
> }
> }
> 
> ```
> 
> * * *
> 
> client.json in client machine  
> {  
> “client”: {
> 
> ```
> "name": "sensu-server.dom.tld",
> "address": "[192.168.159.129](http://192.168.159.129)",
> "subscriptions": ["test", "webservers"]
> 
> }
> }
> 
> ```
> 
> * * *
> 
> config file of server machine
> 
> {  
> “rabbitmq”: {  
> “ssl”: {  
> “private\_key\_file”: “/etc/sensu/ssl/client\_key.pem”,
> 
> ```
> "cert_chain_file": "/etc/sensu/ssl/client_cert.pem"
> },
> "port": 5671,
> "host": "localhost",
> "user": "sensu",
> 
> "password": "mypass",
> "vhost": "/sensu"
> },
> "redis": {
> "host": "localhost",
> "port": 6379
> 
> },
> "api": {
> "host": "localhost",
> "port": 4567
> },
> "dashboard": {
> "host": "localhost",
> 
> "port": 8080,
> "user": "admin",
> "password": "secret"
> },
> "handlers": {
> "default": {
> "type": "pipe",
> 
> "command": "true"
> }
> }
> }
> 
> ```
> 
> * * *
> 
> check\_cron.json in server machine
> 
> {  
> “checks”: {
> 
> ```
> "cron_check": {
> "handlers": ["default"],
> "command": "/etc/sensu/plugins/check-procs.rb -p crond -C 1 ",
> "interval": 60,
> 
> "subscribers": ["webservers"]
> }
> }
> }
> 
> ```
> 
> * * *
> 
> I got this error message in client’s sensu-client.log file.
> 
> /opt/sensu/embedded/lib/ruby/  
> gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664: in  
> `connect_server': unable to resolve server address (EventMachine::ConnectionError) from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664:in`bind\_connect’  
> from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:640:in `connect’
> 
> ```
> from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-0.9.12/lib/amq/client/async/adapters/event_machine.rb:45: in
> 
> ```
> 
> `connect' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-0.9.10/lib/amqp/client.rb:39:in`connect’  
> from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-0.9.10/lib/amqp/connection.rb:215:in `connect’
> 
> ```
> from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/rabbitmq.rb:34:in `connect'
> from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/rabbitmq.rb:67:in `connect'
> 
> ```
> 
> * * *
> 
> What’s wrong? How can i solve this?

---

<div class="post-metadata">

**Author:** ![Nick\_Stielau](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@Nick\_Stielau](https://discourse.sensu.io/u/Nick_Stielau)\
**Post date:** [July 8, 2013, 7:42pm UTC](https://discourse.sensu.io/t/connection-error-message-in-sensu-client-log-file/57/2 "2013-07-08T19:42:06Z")

</div>

Looks good at first glance. Seems to be some issue the client is having an issue connecting to the rabgitmq server. You could try connecting directly to rabbitmq from outside of sensu, i.e. openssl as described in the rabbitmq ssl troubleshooting guide. Good luck!

[http://www.rabbitmq.com/troubleshooting.html](http://www.rabbitmq.com/troubleshooting.html)

[http://www.rabbitmq.com/troubleshooting-ssl.html](http://www.rabbitmq.com/troubleshooting-ssl.html)

> **···**
>
> On Sunday, July 7, 2013 4:18:24 AM UTC-7, [doguc...@gmail.com](mailto:doguc...@gmail.com) wrote:
> 
> > About project:
> > 
> > - I have 2 virtual machines on vmware and their operating system is ubuntu 13.04.  
> > -First virtual machine will be sensu-server, Second virtual machine will be sensu-client.
> > 
> > ## -They will send messages to each other via rabbitmq message system bus.
> > 
> > * * *
> > 
> > -I have installed sensu with all components to both of virtual machines.
> > 
> > -I  
> > have configured two machines to connect to rabbitmq but I am not sure is that right? I sent my config files below. Where is incorrect?  
> > -I have only enabled sensu-client(command: /etc/init.d/sensu-client restart) on client-machine.  
> > -I have enabled all components of server virtual machine except client.(server,api,dashboard).
> > 
> > * * *
> > 
> > My files of client machine:  
> > /etc/sensu/----\> config.json  
> > /etc/sensu/conf.d-----\>client.json  
> > /etc/rabbitmq/-----\>rabbitmq.config
> > 
> > My files of server machine  
> > /etc/sensu/-----\>config.json  
> > /etc/sensu/conf.d----\>check\_cron.json  
> > /etc/rabbitmq/-----\>rabbitmq.config  
> > /etc/sensu/plugins------\>check\_procs.rb  
> > just like [http://docs.sensuapp.org/0.9/adding\_a\_check.html](http://docs.sensuapp.org/0.9/adding_a_check.html)
> > 
> > * * *
> > 
> > inet address of server machine is: [192.168.159.129](http://192.168.159.129)
> 
> > config file of client machine
> 
> > {  
> > “rabbitmq”: {  
> > “ssl”: {  
> > “private\_key\_file”: “/etc/sensu/ssl/client\_key.pem”,  
> > “cert\_chain\_file”: “/etc/sensu/ssl/client\_cert.pem”
> > 
> > ```
> > },
> > "port": 5671,
> > "host": "[192.168.159.129](http://192.168.159.129)",
> > "user": "sensu",
> > 
> > "password": "mypass",
> > "vhost": "/sensu"
> > }
> > }
> > 
> > ```
> > 
> > * * *
> 
> > client.json in client machine  
> > {  
> > “client”: {
> > 
> > ```
> > "name": "sensu-server.dom.tld",
> > "address": "[192.168.159.129](http://192.168.159.129)",
> > "subscriptions": ["test", "webservers"]
> > 
> > }
> > }
> > 
> > ```
> 
> > * * *
> > 
> > config file of server machine
> 
> > {  
> > “rabbitmq”: {  
> > “ssl”: {  
> > “private\_key\_file”: “/etc/sensu/ssl/client\_key.pem”,
> > 
> > ```
> > "cert_chain_file": "/etc/sensu/ssl/client_cert.pem"
> > },
> > "port": 5671,
> > "host": "localhost",
> > "user": "sensu",
> > 
> > "password": "mypass",
> > "vhost": "/sensu"
> > },
> > "redis": {
> > "host": "localhost",
> > "port": 6379
> > 
> > },
> > "api": {
> > "host": "localhost",
> > "port": 4567
> > },
> > "dashboard": {
> > "host": "localhost",
> > 
> > "port": 8080,
> > "user": "admin",
> > "password": "secret"
> > },
> > "handlers": {
> > "default": {
> > "type": "pipe",
> > 
> > "command": "true"
> > }
> > }
> > }
> > 
> > ```
> 
> > * * *
> 
> > check\_cron.json in server machine
> 
> > {  
> > “checks”: {
> > 
> > ```
> > "cron_check": {
> > "handlers": ["default"],
> > "command": "/etc/sensu/plugins/check-procs.rb -p crond -C 1 ",
> > "interval": 60,
> > 
> > "subscribers": ["webservers"]
> > }
> > }
> > }
> > 
> > ```
> > 
> > * * *
> > 
> > I got this error message in client’s sensu-client.log file.
> 
> > /opt/sensu/embedded/lib/ruby/  
> > gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664: in  
> > `connect_server': unable to resolve server address (EventMachine::ConnectionError) from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664:in `bind\_connect’  
> > from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:640:in `connect’
> > 
> > ```
> > from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-0.9.12/lib/amq/client/async/adapters/event_machine.rb:45: in
> > 
> > ```
> > 
> > `connect' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-0.9.10/lib/amqp/client.rb:39:in `connect’  
> > from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-0.9.10/lib/amqp/connection.rb:215:in `connect’
> > 
> > ```
> > from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/rabbitmq.rb:34:in `connect'
> > from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/rabbitmq.rb:67:in `connect'
> > 
> > ```
> > 
> > * * *
> > 
> > What’s wrong? How can i solve this?

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [November 22, 2018, 2:04am UTC](https://discourse.sensu.io/t/connection-error-message-in-sensu-client-log-file/57/3 "2018-11-22T02:04:57Z")

</div>


