# \[amqp\] Detected TCP connection failure on local client

**URL:** <https://discourse.sensu.io/t/amqp-detected-tcp-connection-failure-on-local-client/479>\
**Category:** Sensu Classic (EOL)\
**Created:** [August 19, 2015, 7:22am UTC](https://discourse.sensu.io/t/amqp-detected-tcp-connection-failure-on-local-client/479 "2015-08-19T07:22:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodolphe\_Beck](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@Rodolphe\_Beck](https://discourse.sensu.io/u/Rodolphe_Beck)\
**Post date:** [August 19, 2015, 7:22am UTC](https://discourse.sensu.io/t/amqp-detected-tcp-connection-failure-on-local-client/479/1 "2015-08-19T07:22:43Z")

</div>

Hi,

I followed the instructions detailed here [https://sensuapp.org/docs/0.20/](https://sensuapp.org/docs/0.20/) to install sensu on Ubuntu Server 14.04.1

When I try to install and launch the client, it fails to start with the error “[amqp] Detected TCP connection failure”

Here is the full trace of a sensu-client restart :

{“timestamp”:“2015-08-19T09:15:46.992495+0200”,“level”:“warn”,“message”:“received signal”,“signal”:“TERM”}  
{“timestamp”:“2015-08-19T09:15:46.992667+0200”,“level”:“warn”,“message”:“stopping”}  
{“timestamp”:“2015-08-19T09:15:46.992721+0200”,“level”:“info”,“message”:“completing checks in progress”,“checks\_in\_progress”:}  
{“timestamp”:“2015-08-19T09:15:47.533644+0200”,“level”:“info”,“message”:“closing client tcp and udp sockets”}  
{“timestamp”:“2015-08-19T09:15:47.533839+0200”,“level”:“warn”,“message”:“stopping reactor”}  
{“timestamp”:“2015-08-19T09:15:48.543522+0200”,“level”:“warn”,“message”:“config file does not exist or is not readable”,“file”:"/etc/sensu/config.json"}  
{“timestamp”:“2015-08-19T09:15:48.543762+0200”,“level”:“warn”,“message”:“ignoring config file”,“file”:"/etc/sensu/config.json"}  
{“timestamp”:“2015-08-19T09:15:48.543889+0200”,“level”:“warn”,“message”:“loading config files from directory”,“directory”:"/etc/sensu/conf.d"}  
{“timestamp”:“2015-08-19T09:15:48.544009+0200”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/uchiwa.json"}  
{“timestamp”:“2015-08-19T09:15:48.544124+0200”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/api.json"}  
{“timestamp”:“2015-08-19T09:15:48.544256+0200”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/api.json",“changes”:{“api”:[null,{“host”:“localhost”,“port”:4567}]}}  
{“timestamp”:“2015-08-19T09:15:48.544362+0200”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/client.json"}  
{“timestamp”:“2015-08-19T09:15:48.544474+0200”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/client.json",“changes”:{“client”:[null,{“name”:“test”,“address”:“localhost”,“subscriptions”:[“test”]}]}}  
{“timestamp”:“2015-08-19T09:15:48.544593+0200”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/rabbitmq.json"}  
{“timestamp”:“2015-08-19T09:15:48.544734+0200”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/rabbitmq.json",“changes”:{“rabbitmq”:[null,{“ssl”:{“cert\_chain\_file”:"/etc/sensu/ssl/cert.pem",“private\_key\_file”:"/etc/sensu/ssl/key.pem"},“host”:“localhost”,“port”:5671,“vhost”:"/sensu",“user”:“sensu”,“password”:“REDACTED”}]}}  
{“timestamp”:“2015-08-19T09:15:48.544862+0200”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/redis.json"}  
{“timestamp”:“2015-08-19T09:15:48.544989+0200”,“level”:“warn”,“message”:“config file applied changes”,“file”:"/etc/sensu/conf.d/redis.json",“changes”:{“redis”:[null,{“host”:“localhost”,“port”:6379}]}}  
{“timestamp”:“2015-08-19T09:15:48.547478+0200”,“level”:“warn”,“message”:“loading extension files from directory”,“directory”:"/etc/sensu/extensions"}  
{“timestamp”:“2015-08-19T09:15:48.628531+0200”,“level”:“error”,“message”:"[amqp] Detected TCP connection failure"}  
{“timestamp”:“2015-08-19T09:15:48.628763+0200”,“level”:“warn”,“message”:“reconnecting to transport”}  
{“timestamp”:“2015-08-19T09:15:50.703487+0200”,“level”:“error”,“message”:"[amqp] Detected TCP connection failure"}  
{“timestamp”:“2015-08-19T09:15:54.766872+0200”,“level”:“error”,“message”:"[amqp] Detected TCP connection failure"}

Any idea on where to look next ?

Thanks.

---

<div class="post-metadata">

**Author:** ![Kyle\_Anderson](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@Kyle\_Anderson](https://discourse.sensu.io/u/Kyle_Anderson)\
**Post date:** [August 19, 2015, 2:53pm UTC](https://discourse.sensu.io/t/amqp-detected-tcp-connection-failure-on-local-client/479/2 "2015-08-19T14:53:10Z")

</div>

It sounds like a rabbitmq ssl issue (probably). Is rabbitmq configured  
with the same corresponding ssl configuration that sensu has? Try  
looking at the rabbitmq logs.

> **···**
>
> On Wed, Aug 19, 2015 at 12:22 AM, Rodolphe Beck \<rodolphe.beck@gmail.com\> wrote:
> 
> > Hi,
> > 
> > I followed the instructions detailed here [https://sensuapp.org/docs/0.20/](https://sensuapp.org/docs/0.20/) to  
> > install sensu on Ubuntu Server 14.04.1
> > 
> > When I try to install and launch the client, it fails to start with the  
> > error "[amqp] Detected TCP connection failure"
> > 
> > Here is the full trace of a sensu-client restart :
> > 
> > {"timestamp":"2015-08-19T09:15:46.992495+0200","level":"warn","message":"received  
> > signal","signal":"TERM"}  
> > {"timestamp":"2015-08-19T09:15:46.992667+0200","level":"warn","message":"stopping"}  
> > {"timestamp":"2015-08-19T09:15:46.992721+0200","level":"info","message":"completing  
> > checks in progress","checks\_in\_progress":}  
> > {"timestamp":"2015-08-19T09:15:47.533644+0200","level":"info","message":"closing  
> > client tcp and udp sockets"}  
> > {"timestamp":"2015-08-19T09:15:47.533839+0200","level":"warn","message":"stopping  
> > reactor"}  
> > {"timestamp":"2015-08-19T09:15:48.543522+0200","level":"warn","message":"config  
> > file does not exist or is not readable","file":"/etc/sensu/config.json"}  
> > {"timestamp":"2015-08-19T09:15:48.543762+0200","level":"warn","message":"ignoring  
> > config file","file":"/etc/sensu/config.json"}  
> > {"timestamp":"2015-08-19T09:15:48.543889+0200","level":"warn","message":"loading  
> > config files from directory","directory":"/etc/sensu/conf.d"}  
> > {"timestamp":"2015-08-19T09:15:48.544009+0200","level":"warn","message":"loading  
> > config file","file":"/etc/sensu/conf.d/uchiwa.json"}  
> > {"timestamp":"2015-08-19T09:15:48.544124+0200","level":"warn","message":"loading  
> > config file","file":"/etc/sensu/conf.d/api.json"}  
> > {"timestamp":"2015-08-19T09:15:48.544256+0200","level":"warn","message":"config  
> > file applied  
> > changes","file":"/etc/sensu/conf.d/api.json","changes":{"api":[null,{"host":"localhost","port":4567}]}}  
> > {"timestamp":"2015-08-19T09:15:48.544362+0200","level":"warn","message":"loading  
> > config file","file":"/etc/sensu/conf.d/client.json"}  
> > {"timestamp":"2015-08-19T09:15:48.544474+0200","level":"warn","message":"config  
> > file applied  
> > changes","file":"/etc/sensu/conf.d/client.json","changes":{"client":[null,{"name":"test","address":"localhost","subscriptions":["test"]}]}}  
> > {"timestamp":"2015-08-19T09:15:48.544593+0200","level":"warn","message":"loading  
> > config file","file":"/etc/sensu/conf.d/rabbitmq.json"}  
> > {"timestamp":"2015-08-19T09:15:48.544734+0200","level":"warn","message":"config  
> > file applied  
> > changes","file":"/etc/sensu/conf.d/rabbitmq.json","changes":{"rabbitmq":[null,{"ssl":{"cert\_chain\_file":"/etc/sensu/ssl/cert.pem","private\_key\_file":"/etc/sensu/ssl/key.pem"},"host":"localhost","port":5671,"vhost":"/sensu","user":"sensu","password":"REDACTED"}]}}  
> > {"timestamp":"2015-08-19T09:15:48.544862+0200","level":"warn","message":"loading  
> > config file","file":"/etc/sensu/conf.d/redis.json"}  
> > {"timestamp":"2015-08-19T09:15:48.544989+0200","level":"warn","message":"config  
> > file applied  
> > changes","file":"/etc/sensu/conf.d/redis.json","changes":{"redis":[null,{"host":"localhost","port":6379}]}}  
> > {"timestamp":"2015-08-19T09:15:48.547478+0200","level":"warn","message":"loading  
> > extension files from directory","directory":"/etc/sensu/extensions"}  
> > {"timestamp":"2015-08-19T09:15:48.628531+0200","level":"error","message":"[amqp]  
> > Detected TCP connection failure"}  
> > {"timestamp":"2015-08-19T09:15:48.628763+0200","level":"warn","message":"reconnecting  
> > to transport"}  
> > {"timestamp":"2015-08-19T09:15:50.703487+0200","level":"error","message":"[amqp]  
> > Detected TCP connection failure"}  
> > {"timestamp":"2015-08-19T09:15:54.766872+0200","level":"error","message":"[amqp]  
> > Detected TCP connection failure"}
> > 
> > Any idea on where to look next ?
> > 
> > Thanks.

---

<div class="post-metadata">

**Author:** ![Kyle\_Anderson](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@Kyle\_Anderson](https://discourse.sensu.io/u/Kyle_Anderson)\
**Post date:** [August 19, 2015, 3:12pm UTC](https://discourse.sensu.io/t/amqp-detected-tcp-connection-failure-on-local-client/479/3 "2015-08-19T15:12:58Z")

</div>

It will depend on how you setup SSL on rabbitmq and sensu.  
The error message hints that rabbitmq is not configured to use the  
same cacert that was used to sign whatever sensu is using:  
[https://www.rabbitmq.com/ssl.html](https://www.rabbitmq.com/ssl.html)

> **···**
>
> On Wed, Aug 19, 2015 at 8:11 AM, Rodolphe Beck \<rodolphe.beck@gmail.com\> wrote:
> 
> > Hi,
> > 
> > I looked at the log, and I have a ssl handshake error :
> > 
> > =ERROR REPORT==== 19-Aug-2015::17:08:58 ===  
> > Error on AMQP connection \<0.621.0\>:  
> > {ssl\_upgrade\_error,{tls\_alert,"unknown ca"}}
> > 
> > How can I correct it please ?
> > 
> > 2015-08-19 16:53 GMT+02:00 Kyle Anderson \<kyle@xkyle.com\>:
> > 
> > > It sounds like a rabbitmq ssl issue (probably). Is rabbitmq configured  
> > > with the same corresponding ssl configuration that sensu has? Try  
> > > looking at the rabbitmq logs.
> > > 
> > > On Wed, Aug 19, 2015 at 12:22 AM, Rodolphe Beck \<rodolphe.beck@gmail.com\> \>\> wrote:  
> > > \> Hi,  
> > > \>  
> > > \> I followed the instructions detailed here  
> > > \> [https://sensuapp.org/docs/0.20/](https://sensuapp.org/docs/0.20/) to  
> > > \> install sensu on Ubuntu Server 14.04.1  
> > > \>  
> > > \> When I try to install and launch the client, it fails to start with the  
> > > \> error "[amqp] Detected TCP connection failure"  
> > > \>  
> > > \> Here is the full trace of a sensu-client restart :  
> > > \>  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:46.992495+0200","level":"warn","message":"received  
> > > \> signal","signal":"TERM"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:46.992667+0200","level":"warn","message":"stopping"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:46.992721+0200","level":"info","message":"completing  
> > > \> checks in progress","checks\_in\_progress":}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:47.533644+0200","level":"info","message":"closing  
> > > \> client tcp and udp sockets"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:47.533839+0200","level":"warn","message":"stopping  
> > > \> reactor"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.543522+0200","level":"warn","message":"config  
> > > \> file does not exist or is not readable","file":"/etc/sensu/config.json"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.543762+0200","level":"warn","message":"ignoring  
> > > \> config file","file":"/etc/sensu/config.json"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.543889+0200","level":"warn","message":"loading  
> > > \> config files from directory","directory":"/etc/sensu/conf.d"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.544009+0200","level":"warn","message":"loading  
> > > \> config file","file":"/etc/sensu/conf.d/uchiwa.json"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.544124+0200","level":"warn","message":"loading  
> > > \> config file","file":"/etc/sensu/conf.d/api.json"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.544256+0200","level":"warn","message":"config  
> > > \> file applied  
> > > \>  
> > > \> changes","file":"/etc/sensu/conf.d/api.json","changes":{"api":[null,{"host":"localhost","port":4567}]}}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.544362+0200","level":"warn","message":"loading  
> > > \> config file","file":"/etc/sensu/conf.d/client.json"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.544474+0200","level":"warn","message":"config  
> > > \> file applied  
> > > \>  
> > > \> changes","file":"/etc/sensu/conf.d/client.json","changes":{"client":[null,{"name":"test","address":"localhost","subscriptions":["test"]}]}}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.544593+0200","level":"warn","message":"loading  
> > > \> config file","file":"/etc/sensu/conf.d/rabbitmq.json"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.544734+0200","level":"warn","message":"config  
> > > \> file applied  
> > > \>  
> > > \> changes","file":"/etc/sensu/conf.d/rabbitmq.json","changes":{"rabbitmq":[null,{"ssl":{"cert\_chain\_file":"/etc/sensu/ssl/cert.pem","private\_key\_file":"/etc/sensu/ssl/key.pem"},"host":"localhost","port":5671,"vhost":"/sensu","user":"sensu","password":"REDACTED"}]}}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.544862+0200","level":"warn","message":"loading  
> > > \> config file","file":"/etc/sensu/conf.d/redis.json"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.544989+0200","level":"warn","message":"config  
> > > \> file applied  
> > > \>  
> > > \> changes","file":"/etc/sensu/conf.d/redis.json","changes":{"redis":[null,{"host":"localhost","port":6379}]}}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.547478+0200","level":"warn","message":"loading  
> > > \> extension files from directory","directory":"/etc/sensu/extensions"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.628531+0200","level":"error","message":"[amqp]  
> > > \> Detected TCP connection failure"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:48.628763+0200","level":"warn","message":"reconnecting  
> > > \> to transport"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:50.703487+0200","level":"error","message":"[amqp]  
> > > \> Detected TCP connection failure"}  
> > > \>  
> > > \> {"timestamp":"2015-08-19T09:15:54.766872+0200","level":"error","message":"[amqp]  
> > > \> Detected TCP connection failure"}  
> > > \>  
> > > \>  
> > > \> Any idea on where to look next ?  
> > > \>  
> > > \> Thanks.
> > 
> > --  
> > Cordialement,  
> > Rodolphe Beck  
> > rodolphe.beck@gmail.com
