I have developed a app using bokeh and running it using
bokeh serve app.py.
The app is running fine on local, but when I deploy it on prod (kubernetes), it shows following errors:
On application log
400 GET /app/ws (100.110.109.133) 0.46ms
On Browser console
bokeh.min.js?v=57d29d5936e494351385d736f792154c:551 WebSocket connection to 'ws://***/app/ws' failed: Error during WebSocket handshake: Unexpected response code: 400
bokeh.min.js?v=57d29d5936e494351385d736f792154c:551 [bokeh] Failed to connect to Bokeh server: Could not open websocket
xqTrUSbsN4huCcddNcjrkVZtk46inlGUacd44jX5kzED: Error: Could not open websocket
How to debug the cause of issue? I think something is not right in k8 infra, some header is blocked or nginx config is the issue but how to debug the cause?
How to debug the cause of issue?
Since you have a working setup, just compare two sets of headers for the ws requests - one from the working setup and one from the not working one.
Find the missing headers or headers with seemingly wrong values and try to find out why they're missing or being replaced.
Related
I have created a project using Laravel 8, Redis, Nginx and hosted in a Linux server.
The work Flow is Request -> Nginx -> Php-fpm -> Laravel 8 -> Nginx-> Response
Now, When my Redis server is turned off or non-reachable, I get:
local.CRITICAL: No connection could be made because the target machine actively refused it. [tcp://127.0.0.1:6379]
And it loops indefinitely and runs into PHP Fatal error: Allowed Memory size exhausted.
Now my question is that, even if I try reconnection only to a fixed time and fix this error, How can I handle Memory Exhausted error or any type of unhandled error in Laravel 8 or Via Nginx to produce a custom 500 JSON Response instead of default one.
Note: Also added a 500 json response in nginx config file and that is not returned incase of 500 Error.
Ive just taken over an app that has this line of code in startup.cs
spa.UseProxyToSpaDevelopmentServer("http://localhost:4200")
when the app runs, I get this error
HttpRequestException : no connection could be made because the target machine actively refused it
Failed to proxy the request to http://localhost:4200 because the request to the proxy target failed: check that the proxy target server is running and accepting requests to http://localhost:4200
I had initially thought this was a sql server error , its similar in syntax to a sql network error, but after some searching its down to spa architecture/design ?
What should the proxy server be ? Am I missing the activation of a server somewhere ?
Im using .net core 3 and angular 11 (which im new to)
thanks in advance for any help
When using UseProxyToSpaDevelopmentServer during development you need to start the angular app as another process at that address- usually this just means npm run start in the angular apps directory.
I am trying the example from http://doc.qt.io/qt-5/qtwebsockets-echoserver-example.html to create a simple websocket server and connect to it via google chrome browser.
I just used the example files, the default port (1234), I built it and the application is running fine "WebSocketServer listening on port 1234". But when I try to connect with the sample html there is no connection. I tried other ports as well.
My problem is I don't know how I can start to debug where the problem is? I don't get any errors or anything. Any ideas what the problem could be? Thanks!
You can use developer-tool of chrome, the "Console" tab will display some error message after websocket connect timeout.
The following error seems to have appeared overnight, and is not identified with any community package that I can tell. Seems to be part of the core DDP and WebSocket modules.
stream error Error during WebSocket handshake: Unexpected response code: 404
It shows up in the log generated when starting the server. mike:mocha Mocha testing also seems to have broken.
Again, seems to have cropped up out of nowhere after having the app running correctly for a long time. May have been due to a meteor update. Meteor version is currently Meteor 1.1.0.2.
This can happen when you have a package or code on your server side that connects to another server using DDP or Websockets and there is an interruption where the server you're connecting to has a proxy and the underlying server goes offline.
This can happen from time to time. When you use websockets the connection is persisted for a very long time. It will immediately try to reconnect if there is a disconnection.
Nearly no cloud hosting provider is able to give 100% uptime so you can expect a few of these when there is an interruption. The error comes from trying to reconnect at this moment most likely.
If you have no package that bears this remote websocket connection attribute it could be meteor's package reporting system itself. You could opt out of this by adding the package-stats-opt-out package using meteor add package-stats-opt-out
Locally deploying content between two site instances works fine.
It's when moving one instance to a remote server that gives me the following error message:
Module : login
Description : Remote user
Result : Error
Message : Connection timed out
My apache access log entries are:
./node_operations/deploy_now/86 HTTP/1.1" 302
./admin/build/deploy/logs/details/6 HTTP/1.1" 200
Deployment module version: 6.x-1.x-dev
Service module version: 6.x-2.2
Does anybody have an idea what could cause this problem?
Probably firewall is blocking if you are seeing timeout. You can fire up telnet on the dev box and test that you can actually connect to the target over port 80 - since deployment module uses xmlrpc to push content. If all is working there you can check the Drupal watchdog logs.