I have made an application that uses a WebSocket. I want to run this application on a PLESK Server, but I get this error message 'WebSocket connection to 'wss://sub.domain.com/' failed: Error during WebSocket handshake: Unexpected response code: 404' when I visit the website.
After reading a few blogs, I came to the conclusion you have to adjust something in the NGINX settings, but this also appears to have no effect, or I have to do it wrong, that is also possible. (Another blog)
At the moment our API is installed on a subdomain (with the NodeJS add-on in plesk) and it also works. As soon as I start up the files locally I can connect to the WebSocket and the API so it must be up to the PLESK Server I think. At this moment only the NGINX 'Proxy mode' is off and the 'Additional nginx directives' empty.
Perhaps one of you is familiar with this problem?
Related
While connecting to my socket.io server from react app, request is getting blocked. Its working with localhost but when i am trying from VPS, its not working.
From VPS:
From localhost:
http://server_ip:8007/socket.io/?EIO=4&transport=polling
above url returning valid response 0{"sid":"VaHqLXI5UVRRaeUAAAAV","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":20000,"maxPayload":1000000}
The error ("mixed block") seems to say, you must connect using HTTPS to localhost when hosting files from an HTTPS server. Meaning, should use wss:// instead of ws://. Or connect to your vps host using http:// protocol not https://.
The error shown in this image
I just made a simple landing page with Nestjs (backend), Reactjs (frontend) and using graphql for API and deployed on AWS EC2. (The error says, "POST https://[our public address]:[end point port number]/graphql net::ERR_SSL_PROTOCOL_ERROR")
And I set up a proxy server with Nginx and put SSL with Let's encrypt.
It was fine submitting a form (just simple email info) and got them in our database (PostgreSQL) and as soon as I got the SSL implemented in NginX.
We are getting that error.
Can anyone help us to solve this error please?
tried making https protocol for backend following this official doc https://docs.nestjs.com/faq/multiple-servers#https does not seem to work and I am not sure if this is necessary to do to be honest.
The current NginX set up
Not sure if I have to do somethings on this Nginx setup.
I'm using Ionic platform for my mobile application. Using angular
$http for sending requests to server.
Intermittently when Mobile app tries to access server $http goes to it's errorCallback with response status -1 only no other
data.
When I check log on server, not able to see any hit.
I've changed timeout of application to 2 minutes using interceptors.
I have used chrome debugger but it won't show anything apart from
request it forms, shows nothing in response and preview columns.
I got that in Ionic we use pre-flight to check if server is alive
before sending actual request. But it's for CORS; we have enabled
CORS on server and thats why app is working good since last 15 days.
Thought of using network packet tracer tool but if call not logged on
server no use of it. as Status -1 says $http aborted the request.
My Question is why it's aborting when I click once and do send
when I click same button again.
Please me help to figure out an issue.
After lots of debugging and surfing over internet for issue.
I guess that an issue was like mobile app sending pre-flight messages and so $http aborting the request and even some time Server played a culprit here how will tell you;
We have server hosted on AWS in where we had Load balancer in different zone and actual API server is in different zone. After changing them to same zone ask, production people to test now they are not getting this issue.
The another reason was we were using unstable mobile networks to test.
If any one have any thing else on this please let me know.
I'm trying to work with Kubernetes API server from Angular JS front-end app. The API server uses https endpoint. The front-end app is deployed to the other server.
Despite the --cors-allowed-origins=.* (or --cors-allowed-origins=["http://*"]) param for kube-apiserver I can't access API because when I try to make GET XHR request, pre-flight OPTIONS request failed with 401 response without CORS headers.
However, when I switch from https to http, everything works fine.
Looks like I'm facing this issue, which is already fixed and merged in the version of Kubernetes I'm using.
Versions are Kubernetes 1.2.4, Angular JS 1.5.4 and Chrome 51.
Could you tell me why it happens and how to fix this? I need a working solution for https.
The issue you linked to was fixed, but a regression in CORS handling was introduced by kubernetes/kubernetes#18113 and has yet to be fixed (see kubernetes/kubernetes#24086). It is currently marked as a known issue for the imminent 1.3 release, which means that it is an outstanding bug.
You can edit kubernetes API server yaml file, to get CORS working.
Location: /etc/kubernetes/manifests/kube-apiserver.yaml
Add - --cors-allowed-origins=http://www.example.com,https://*.example.com this line under kube-apiserver
spec:
containers:
- command:
- kube-apiserver
- --cors-allowed-origins=http://www.example.com,https://*.example.com
Coma separated domains or regular expressions you can add.
No need to restart kube-apiserver, once file saved kube-apiserver will automatically restart.
it will take 5 to 10min time to get API server up.
I got a problem with apigility and https.
To enable https communication between AngularJs frontend and Apigility backend, I used this tutorial:
http://robsnotebook.com/xampp-ssl-encrypt-passwords. Almost everything works fine, but REST webservices doesn't respond via https.
When, using Advanced REST Client, I'm sending request e.g.
https://localhost:8888/status
NO RESPONSE appears.
Does anyone know where might be the problem?
For defiantly it is server fault. My apigility instances are working perfectly normal on production server with SSL. Could you give some more information.
Can you open your apiglity admin panel by browser? Is it working?
Is there any error in response headers or some other clue? Are you sending "Accept" header?
What is your apigility and zf2 versions?