Error when accesing the node.js port 8090 : Cannot GET /


#1

Hello,

I have a site that is giving me unsecured error, according to the dreamhost support it is caused by accessing the certificate file from a certain directory, I have bee working around with this issue, any help?

It is a VPS, the domain name is : www.rubyredonline.com, the error comes when I access the https://rubyredonline.com:8090/ where node.js is running, it is a php, javascript and mysql application. The browser ask the user for authorization, but If I click ‘proceed to unsafe’ it runs well, the problem is that the browser is throwing an exception.

This is the code that I use:

var fs = require('fs'); 
var express = require('express'); //express-force-ssl 
var app = express(); 
var https = require('https'); 
var mysql = require('mysql'); 
var server = https.createServer({ 
       key: fs.readFileSync('server.key'), 
       cert: fs.readFileSync('server.crt'), 
       ca: fs.readFileSync('server.csr'), 
       requestCert: false, rejectUnauthorized: false }, app); 
var port = process.env.PORT || 8090;//8090 
server.listen(port, function () { console.log('Server listening at port %d', port); });


Error  : 
====== 
Cannot GET /

Thanks, jm


#2

Sorry, JM but you provided way too little details for anybody to give you any meaningful answer. Please share a little more information, like is this site on shared hosting or VPS or what? How did you setul SSL certificate? Which application are you running (is it PHP, ruby, python… else?) Share also the domain name, the URL that you try to get… also check the logs, share what you see there.


#3

Hello,

You were right, I add more details.

Thanks for your help.

jm


#4

Thanks for sharing more details. The certificate is self-signed, that’s why the browser complains about it. You may want to setup a letsencrypt certificate to remove that error.

The cannot GET / may not be caused by the certificate though. Check Node.js logs… Are you following some sort of tutorial to develop your fist node.js app?


#5

Thanks for your answer, the certificate is Comodo Verified SSL, so it is not self signed. I will check the logs.

thanks,

jm


#6

Maybe you have a Comodo SSL cert but that’s not the one being served. Check the details in the browser, this is what I get:


#7

I checked it in https://www.digicert.com and this is what I got:

HTTP Server Header: Apache

SSL certificate

Common Name = rubyredonline
Subject Alternative Names = rubyredonline
Issuer = COMODO RSA Domain Validation Secure Server CA
Serial Number = 3E62758680D9D19DAB923C5144BC9999
SHA1 Thumbprint = A2AA80319E5E8E387F3255F52B79645EC2D6C4D6
Key Length = 2048
Signature algorithm = SHA256 + RSA (excellent)
Secure Renegotiation: Supported
SSL Certificate has not been revoked

OCSP Staple: Not Enabled
OCSP Origin: Good
CRL Status: Good

SSL Certificate expiration

The certificate expires January 23, 2019 (362 days from today)

Certificate Name matches rubyredonline

Subject rubyredonline.com
Valid from 23/Jan/2018 to 23/Jan/2019
Issuer COMODO RSA Domain Validation Secure Server CA

Subject COMODO RSA Domain Validation Secure Server CA
Valid from 12/Feb/2014 to 11/Feb/2029
Issuer COMODO RSA Certification Authority

Subject COMODO RSA Certification Authority
Valid from 30/May/2000 to 30/May/2020
Issuer AddTrust External CA Root
SSL Certificate is correctly installed

Congratulations! This certificate is correctly installed.


#8

did digicert check on port 8090?


#9

You are right, when adding the port it does not validate the certificate. I talked to the dreamhost support about this case, via chat and he told me to check the node.js configuration and he gave this link https://stackoverflow.com/questions/46879769/ssl-not-working-with-node-js-app, I am checking now to see if this one works.

jm


#10

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.