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 am getting a working socket.io connection.
However, if I go to my custom domain:
https://www.myapp.me:8443
I am getting error net::ERR_INSECURE_RESPONSE
.
My client side connection code looks like this, host
is one of the above urls:
var socket = io.connect(host, { query: 'currentUser=' + currentUserId,
secure: true });
How can I set up my custom domain?
EDIT
Okay, this is officially driving me crazy. I created a new SSL certificate using Openshift CSR like @developercorey suggested below.
When I go to my site via my own domain - https://www.myapp.me
- I get a green padlock in Chrome and when I click on it it says www.myapp.me - Identity Verified
.
This is what I see when I click on the lock in Chrome and navigate to certificate information
:
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 mine SSL Cert
works, but the socket.io connection doesn't work.
SECOND EDIT
So, if I am openssl
my custom domain, I get a 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 see is No client certificate CA names sent
is this a problem?
source to share
Your DNS is not working:
$ openssl s_client -connect www.myapp.me:8443 -debug
gethostbyname failure
connect:errno=0
Actually, I am not getting a response from any DNS server (authoritative or non-authoritative):
$ dig www.myapp.me a
; <<>> DiG 9.8.5-P1 <<>> www.myapp.me a
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 45813
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.myapp.me. IN A
;; Query time: 3177 msec
;; SERVER: 172.16.1.10#53(172.16.1.10)
;; WHEN: Fri Aug 22 21:10:47 EDT 2014
;; MSG SIZE rcvd: 30
Fix your DNS and it should work. Let's assume your server has a valid certificate and is listening on port 8443.
source to share