recently i was exploring websocket and i choose to use using <o:socket> from Omnifaces, I'm using Glassfish 4 for the server i have test and run my code on localhost and its working and perfectly fine, but the problem is when i upload to server which using HTTPS connection it's doesn't work, when i want open the connection it's failed and give me error 1006 , so i suspect the problem is on HTTP or HTTPS is there configuration i need to run websocket on HTTPS?
Related
I am new to servers and networking so pardon my ignorance.
I have a Heroku application running a NodeJS server. I am using console.log() to output the port its using to the console. But when i use the port to try to perform a GET request from my browser it keep loading forever. My request is something this:
https://example.herokuapp.com:28222/getHighest
When i remove the port number, it works perfectly:
https://example.herokuapp.com/getHighest
I am ultimately trying to perform GET and POST request from a C application. The HTTP library i am using seemingly requires a port for a connection. I am using this library: GitHub. It works perfectly when i run it locally with localhost:8080/getHighest but not when i use my heroku app.
As suggested by #tadman using the default https port 443 solved the issue.
I'm using Node.js 10.0.0 and trying create a node server that uses HTTPS.
I followed this documentation to create the needed certs and keys etc.
I can connect from localhost to the node server just fine. However, if a Windows machine on the same network as the device running the node server tries to connect to the server using HTTPS the browser says "Trying to establish a secure connection" and times out and the page fails to load.
What am I doing wrong? I'm new to node and HTTPS etc. What can I do to debug this problem?
I have a chrome extension which uses an externel socket.io server to connect clients together.
During development I was able to connect to the server via http://localhost:2087 just fine, but right now I need socket.io to work over HTTPS so I can access it from a browser tab being server by HTTPS.
I don't want to deal with certificates, and want to keep the code on the socket.io server mostly the same, so I want to proxy the IP for the server via Cloudflare and establish SSL like that.
But I haven't been able to, the socket.io server uses no other webserver, but I can change it to use the native NodeJS http or https libraries.
But I haven't been able to access the socket.io server via the Cloudflare proxy. Clouflare returns 522 errors, which means a connection timeout.
Apparantly flexible SSL only works with with ports 443->80
Other ports are not supported...
I've just created a new sails.js app with
sails new testProject
Then I did
sails lift
Now I navigate to my address (http://153.92.xx.xxx:1337) and everything works.
However, I know that sails uses XHR by default but tries to upgrade to WebSockets if it can. No matter what I try I can't get WebSockets to work.
I can see that the app tries to connect but is just (pending) for about 18 seconds before it gives up. It then goes back to XHR.
The error reads:
WebSocket connection to 'ws://153.92.xx.xxx:1337/socket.io/?__sails_io_sdk_version=0.11.0&__sails_io_sdk_platform=browser&__sails_io_sdk_language=javascript&EIO=3&transport=websocket&sid=8qjNepcGV5Rh3VvzAAAA' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
What could I be doing wrong?
Sailsjs v0.11.2
Nodejs v0.12.7
Debian 8 x64
iptables has full ACCEPT on everything
I believe this is because of a personal firewall.
Changing the port from 1337 to 80 made everything work.
Accessing the site from a different machine worked ok.
My best guess is that a personal firewall that was on my machine blocks websockets if they are not using "standard" ports.
My problem is simple to explain but not so simple to fix I think since I haven't found a solution yet.
I'm developing an API. The backend is developed using NodeJs and Socket.Io. Everything works perfect but the issue arises when I'm on a net that's behind a firewall, Squid in this case. It is the browser who is behind the firewall not the server (NodeJs).
The thing is that I get this error:
WebSocket connection to 'ws://mydomain.com/socket.io/1/websocket/vN8hWt_EjV0Z5P5-GwrW' failed: Unexpected response code: 502 (socket.io.js:2)
and I don't know how to the browser can skip Squid.