Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

socket.io `net::ERR_INSECURE_RESPONSE` on custom domain connection -- works with Openshift url

If I connect client-side with:

https://prod-myapp.rhcloud.com:8443

I get a working socket.io connection.

However, if I change to my custom domain:

https://www.myapp.me:8443

I get a net::ERR_INSECURE_RESPONSE error.

My client-side connection code is as follows, with host being one of the above urls:

var socket = io.connect(host, { query: 'currentUser=' + currentUserId,
                                                      secure: true });

How do I get my custom domain working?


EDIT

OK, this is officially driving me crazy. I created a new SSL Cert using Openshift CSR as @developercorey suggested below.

When I go to my site through my custom domain - https://www.myapp.me - I get a green lock in Chrome and when I click it it says www.myapp.me - Identity Verified.

Here's what I see when I click on the padlock in Chrome and go to certificate information:

enter image description here

However, if I go to https://www.myapp.me:8443/socket.io/ I get a:

   This is probably not the site you are looking for!
   You attempted to reach www.myapp.me, but instead you 
   actually reached a server identifying itself as *.rhcloud.com.

So my SSL Cert seems to be working but connecting with socket.io isn't working.


SECOND EDIT

So if I openssl my custom domain I get the certificate and then this:

    subject=/serialNumber=LnhzJHxcX0bIdlH2ITnDgaewey8ce5g3/C=US/ST=North Carolina/L=Raleigh/O=Red Hat Inc/OU=RHC Cloud Opoerations/CN=*.rhcloud.com
issuer=/C=US/O=GeoTrust, Inc./CN=GeoTrust SSL CA
---
No client certificate CA names sent
---
SSL handshake has read 2468 bytes and written 456 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : AES256-SHA
    Session-ID: FB3AD94948150496CD7269AED4A426EE2C2F4604653D129BBC93702B89CEA52E
    Session-ID-ctx: 
    Master-Key: 97EA9B89E9B2FA9342F83E5FF10A18008B8D462334822D2C83F203C44D90D13B37C9F91C503B45CB90684B5156796138

    Key-Arg   : None
    Start Time: 1408758948
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---

The only thing I can see is - No client certificate CA names sent - is this the problem?

like image 347
OdieO Avatar asked Jan 28 '26 08:01

OdieO


1 Answers

Did you install a custom SSL Certificate for your domain? if not, then the app-domain.rhcloud.com ssl certificate is not valid for your custom domain (same as if you visit it in a web browser, you get a warning)


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!