Nodejs - SSL Handshake logs - node.js

I am trying to debug cert issue in my node module which is running in kubernetes.
The node app is running as below. It is enabled with SSL.
node --max-old-space-size=2560 ./server/index.js
How can I enable the SSL handshake trace?
For Java app, -Djavax.net.debug=ssl,handshake
Is there any equivalent for node app?

Related

Electron.js Connection Problem with openvidu

I have an project with vue electron builder and node.js.
While i sending request from Openvidu server, i have an error.
This error is;
webSocketWithReconnection.js?714c:61 WebSocket connection to 'wss://localhost:4443/openvidu' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
How can i fix.?
You must configure your Electron app to accept self-signed SSL certificates if you are going to use a local development OpenVidu deployment.
In your Electron app add: https://github.com/OpenVidu/openvidu-tutorials/blob/f39d38fe14ea48dcb17c4fff4c39cc198f36ab8a/openvidu-electron/src/main.js#L69-L74

Django SSL server

I am using Django 2.2, I want to enable https in it.
I have installed Django-SSL server and I have the certificate and the private key.
I am running the script like:
python manage.py runsslserver --certificate /path/to/certificate.pem --key /path/to/key.key
when I am running the above command the server is running like:
Starting development server at https://127.0.0.1:8000/
Using SSL certificate: C:\Users\djangotutorial\myvenv\lib\site-packages\sslserver\certs\certificate.pem
Using SSL key: C:\Users\djangotutorial\myvenv\lib\site-packages\sslserver\certs\key.key
but when I am opening the link it is showing the unsecure connection.
How to fix this?
Cause you have used a self-singed ssl certificate, just ingore the warning and you'll got your web page.

socket.io-client-cpp does not connect to node app on Heroku via https

socket.io-client.cpp does not connect to node app on Heroku while Node JS socket.io-client does without any problem. Error is:
[2018-12-11 19:32:43] [connect] Successful connection
[2018-12-11 19:32:43] [error] handle_read_http_response error: websocketpp.transport:7 (End of File)
[2018-12-11 19:32:43] [info] Error getting remote endpoint: system:107
Changed URL from https to http://myapp.heroku.com - works now. Is it possible to connect via https as well? JS socket.io-client connects via secure connection without any problem.
Have built socket.io-client-cpp app with SIO_TLS in DEFINES (compiler flag: -DSIO_TLS) - connects via https fine now! This enables TLS support as mentioned here:
https://github.com/socketio/socket.io-client-cpp/pull/137

mern project deployment on live ssl

I want to deploy a mern project on ssl. Currently it is running on server with ip address but when I deploy it on ssl it is not running. It is working fine on http.
I have change on node modules transport-node and make it http to https.
1-I am using nginx as proxy server
When I deploy on ssl it give error:-
1-emitter.js?8a6f:50 OPTIONS https://privateIp:port/ net::ERR_SSL_PROTOCOL_ERROR
2-websocket.js?0f24:6 WebSocket connection to 'ws://privateip/sockjs-node/831/bocznd0p/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400
3- your request is http,while it is require https.(handshake problem)

Difficulties connecting to socket.io server with Ionic

An overview of my setup:
A socket.io/node server is being hosted/ran on a computer in my local network.
An Ionic app is attempting to connect to the socket.io/node server to send/receive messages.
If I run the app in the browser with 'ionic serve', I am able to connect to the socket.io/node server successfully.
If I run the app in the emulator or on my device, I am only able to connect to the socket.io/node server if I add the -l (livereload) flag (ionic run android -l).
Originally, I hosted the node server on a heroku instance. I had no troubles connecting with this setup from browser, phone, or emulator. I had to switch to running the node server on a local computer so I have access to a local database.
Any ideas what is going on?
I fixed it by adding 'http://' to the beginning of the connection string.
Not sure why Ionic's livereload enabled me to connect without the 'http'

Resources