ndelitski / rancher-alarms

Will kick your ass if found unhealthy service in Rancher environment
85 stars 20 forks source link

ALARM_EMAIL_SSL is read as string than boolean in config.es6 #7

Closed jayhding closed 8 years ago

jayhding commented 8 years ago

Set ALARM_EMAIL_SSL: false in docker-compose.yml file does not disable SSL usage and it will still cause rancher-alarms exist

[INFO]   2016-8-11 1:24:37:990     sending email notification to XXXXX
[ERROR]  2016-8-11 1:24:38:97      { [Error: 140191501961024:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:
]
  cause:
   [Error: 140191501961024:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:
   ],
  isOperational: true } Error: 140191501961024:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:

    at Error (native)

I think it may be because it is read as string rather than boolean type in the config.es6

    "targets": {
        "email": {
            "smtp": {
                "from": "devlabs@iag.com.au,chris.fordham@iag.com.au",
                "host": "exch-smtp2.auiag.corp",
                "secureConnection": "false",
                "port": "25"
            }
        },

I should report this issue earlier cause I found this before. But I think I have changed my forked branch that simply removed below line in email.es6

secure: smtp.secureConnection

jayhding commented 8 years ago

Updates:

If I change emial.es6 as secure: false then email sending works. Even I have printed out value of smtp.secureConnection and it was false but somehow test result was still different.

ndelitski commented 8 years ago

ok i'll see

ndelitski commented 8 years ago

@JayHaoDing fixed