Problem description: reference socket. Io in the project, after the project deployment error, local run no error
Reason for the error: You need to configure the information in the configuration file nginx.conf
Solutions:
Add in the location of the nginx file
Proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”.
The first line tells Nginx to use HTTP/1.1 when communicating with the Node backend, which is required by WebSockets. The next two lines tell Nginx to respond to the upgrade request, which is started by HTTP when the browser wants to use WebSocket. All three lines must be added.
Such as:
. Default_server;
listen [: :] : 80 default_server.
server_name localhost.
root/usr/share/nginx/HTML;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
The location/{
proxy_pass http://localhost:3100;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”.
proxy_set_header Host $Host;
Reason for the error: You need to configure the information in the configuration file nginx.conf
Solutions:
Add in the location of the nginx file
Proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”.
The first line tells Nginx to use HTTP/1.1 when communicating with the Node backend, which is required by WebSockets. The next two lines tell Nginx to respond to the upgrade request, which is started by HTTP when the browser wants to use WebSocket. All three lines must be added.
Such as:
. Default_server;
listen [: :] : 80 default_server.
server_name localhost.
root/usr/share/nginx/HTML;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
The location/{
proxy_pass http://localhost:3100;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”.
proxy_set_header Host $Host;
}}
Read More:
- WebSocket failed: Error during WebSocket handshake: Unexpected response code: 400
- Deployment project websocket failed: error during websocket Handshake: unexpected response code: 400
- failed: Error during WebSocket handshake: Unexpected response code: 200
- WebSocket handshake Unexpected response code 403
- Response code: Sampler error: unexpected frame type (binary).
- JMeter running error response code: non HTTP response code: java.lang.illegalargumentexception find and solve
- Websocket code 200 error
- Nginx manager jupyter notebook v1.0.0 http websocket
- Jupyter failed to run websocket error
- Solution: DevTools failed to load SourceMap:… net::ERR_HTTP_RESPONSE_CODE_FAILURE problem
- JS Ajax request is successful, the response displays “failed to load response data”
- SQL Server SSPI handshake failed Error
- git clone https:// gnutls_handshake() failed: The TLS connection was non-properly terminated.
- gnutls_handshake() failed: A TLS fatal alert has been received
- SSL handshake failed: SSL error: illegal key usage detected in the certificate
- Message: failed to decode response from marionette
- ASP.NET How to deal with “unexpected character” when writing code
- MySQL Workbench Failed to Connect to MySQL at 127.0.0.1:3306 with user root Bad handshake
- Unexpected syntax error: unexpected token<
- Node.JS “Cannot enqueue Handshake after invoking quit” Error (Fixed)