Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Services are down #54

Closed
MaximeHeckel opened this Issue · 16 comments

3 participants

@MaximeHeckel

All the services I add to my dashboard are down with the following error :

139761577482048:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:

What should I do to make them work properly ?

@obazoud
Owner

Hi @MaximeHeckel
could you describe your configuration? and specifically the ssl part.

@MaximeHeckel

Our infrastructures need https check, we have auto signed certificates. So what I think I need is to tell the server to sign our certificates in order to get the response. How can I do that ?

@MaximeHeckel

I changed the port 80 to port 443 for my https services and this is what I get

UNABLE_TO_VERIFY_LEAF_SIGNATURE

see : http://status.ares-ensiie.eu

@obazoud
Owner

Could you post your https config ?
Could you test with "rejectUnauthorized: false" in your https config ?

@MaximeHeckel

We have self-signed certificates, I think I'm going to try this :

var options = {
    ca: fs.readFileSync("[path to our CA cert file]"),
    requestCert: true,
    rejectUnauthorized: true
};

var req = https.request(options, function(res) {
    ...
});

Which file can I edit to had those previous line ?

By the way what do you mean by "your https config" ?

@obazoud
Owner

I thought the setup was transfered directly to check https, but ... this is not the case.
Need to change some code.

@obazoud
Owner

In your settings.js, let's try:

  settings['xxx'] = {
    port: 8080,
    hostname: '0.0.0.0',
    services: [{
      name: 'gitlab.xxx.xxx', 
      label: 'gitlab',
      check: 'https',
      host: 'gitlab.xxx.xxx', 
      port: '443',
      path: '/',
      options: {
        ca: fs.readFileSync("[path to our CA cert file]"),
        requestCert: true,
        rejectUnauthorized: false
      }
    },
@MaximeHeckel

It looks like it's working.
But my service is qualified as UNKNOWN with the 302 http code and the following message "Redirected to http://git.ares-ensiie.eu/users/sign_in"

How can I avoid that ?

Other question : As I want to deploy your dashboard on heroku for instance, will it work even if it needs to loaunch ./bin/dashboard ? The node server.js command doesn't seem to work

@frdmn

@MaximeHeckel you need to adjust the path then, try this:

  settings['xxx'] = {
    port: 8080,
    hostname: '0.0.0.0',
    services: [{
      name: 'gitlab.xxx.xxx', 
      label: 'gitlab',
      check: 'https',
      host: 'gitlab.xxx.xxx', 
      port: '443',
      path: '/users/sign_in',
      options: {
        ca: fs.readFileSync("[path to our CA cert file]"),
        requestCert: true,
        rejectUnauthorized: false
      }
    },    

To your Heroku question, take a look at this:
https://github.com/chamerling/statusdashboard-server

@MaximeHeckel

Thank you !

Concerning Heroku, I already tried to deploy thanks to this repo, but now I have to add these options to the config.json file. Is the following syntaxe right ?

options: {
    "ca": "fs.readFileSync(\"[pathstocert]\")",
    "requestCert": "true",
    "rejectUnauthorized": "false"
}
@frdmn

@MaximeHeckel I don't think so, try this instead:

options: {
    ca: fs.readFileSync("[pathstocert]"),
    requestCert: true,
    rejectUnauthorized: false
}
@MaximeHeckel

Okay I will give a try later, and report

@frdmn

@MaximeHeckel alright :)

@MaximeHeckel

I tried, and my solution is working, thank you for your help, I just have an annoying problem : My services go from UP to UNKNOWN 10 seconds after I load the page. These services are working fine, do you have an idea ?

@obazoud
Owner

UNKNOWN is for 301 and 302 http code.

  } else if (response.statusCode == 301 || response.statusCode == 302) {
    service.status = "unknown";
    service.message = "Redirected to " + response.headers.location;

Have you set a correct path ?

@MaximeHeckel

Yes the path is correct because when I run the statusdasboard repository they are up, but when I run the statusdasboard-server project they are UNKNOWN 10s after I load the page

EDIT: Everything works fine now, I just had to wait a little bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.