https://mysite.com:9166/socket.io/socket.io.js net::ERR_CONNECTION_REFUSED

I enabled ssl on my server.
I can get to https://mysite.com and https://myserver.com
I setup my nodejs.config.js file (see below)
I need to have nodejs delivered over ssl.
No matter what I used for host, I get the same error message.
Now to be clear, I do get '{"error":"Invalid service key."}' at https://mysite.com/nodejs/message like I should

backendSettings = {
       "scheme":"https",  
//    "scheme":"http",  
//    "host":"127.0.0.1",  <- doesn't work
       "host":"192.xxx.xxx.xxx",  <- select IP address associated with ssl cert for server
//    "host":"myserver.com", <- doens't work
//    "host":"localhost",  <- doesn't work
    "port":9166,
    "sslKeyPath":"/path/openssl.key", <- server key
    "sslCertPath":"/path/openssl.crt",  <- server cert
    "sslCAPath":"",
    "resource":"/socket.io",
    "publishUrl":"publish",
    "serviceKey":"somerandomstuff",
    "backend":{
//	"port":80, <- not correct
	"port":443, <- specify ssl port
	"host":"mysite.com",
	"scheme": 'https',
	"messagePath":"/nodejs/message"},
    "clientsCanWriteToChannels":true,
    "clientsCanWriteToClients":true,
    "extensions":["drupalchat_nodejs.server.extension.js"],
    "debug":true,
    "transports":["websocket",
		  "flashsocket",
		  "htmlfile",
		  "xhr-polling",
		  "jsonp-polling"],
    "jsMinification":true,
    "jsEtag":true,
    "logLevel":1};

Comments

SocialNicheGuru’s picture

with https you need to use the IP address associated with the ssl cert for the server.
The domain name seems fine for the backend.

SocialNicheGuru’s picture

Issue summary: View changes
Status: Active » Closed (fixed)
SocialNicheGuru’s picture

also make sure that you can ping the ip address, host name, and server name

SocialNicheGuru’s picture

Title: https://mysite:9166/socket.io/socket.io.js net::ERR_CONNECTION_REFUSED » Old Aegir install. https://mysite:9166/socket.io/socket.io.js net::ERR_CONNECTION_REFUSED

On the old aegir installs, an IP was associated with ssl so I had to do the above.

Using "Let's Encrypt" there is no IP address so hostname has to be used. It does not work though.

Let's encrypt does work.

I posted another issue on that.