Why my node returns me a websocket error? - dataflow

I'm putting my application on an IIS HTTP server, but I get an error:
WebSocket connection to
'wss://xxxx.xxxx.xx:xxxxx/?designer=1&token=&baa=' failed: Error
during WebSocket handshake: net::ERR_CONNECTION_RESET.
What could cause it?

This issue might occur if 'PORT' is closed. To resolve this issue make sure that PORT is open.

Related

Error: queryTxt ESERVFAIL cluster0.b4oyxi0.mongodb.net

I am developing a MERN stack application. My Node web server used to work fine. Recently however, whenever I start my Node server, I get the following error:
[1] Error: queryTxt ESERVFAIL cluster0.b4oyxi0.mongodb.net
[0] [HPM] Error occurred while proxying request localhost:3000/api/users/login to http://localhost:5000/ [ECONNRESET] (https://nodejs.org/api/errors.html#errors_common_system_errors)
[1] [nodemon] app crashed - waiting for file changes before starting...
What does this error mean and how can I fix it?
Not exactly sure what the error means. I encountered a similar error and the non +srv connection string did it for me.
To get one,
head out to your Atlas Dashboard under Database Deployment,
click Connect,
then choose Connect your application.
On the Node.js driver version, lower that to 2.2.12 or later.
This should give the connection string.
It's a DNS server issue. Try changing your DNS server in your network settings to any of these, or any other trusted one you know:
208.67.222.222
1.1.1.1
8.8.8.8
9.9.9.9

Cannot reconnect to gRPC server after client crashed

I did a lot of research but could not find a solution for my problem with gRPC:
Summary;
After my swift gRPC client application crashes, no gRPC client can connect to my gRPC Server anymore (see errors below)
My Setup:
I have a Swift frontend application and a Rust backend.
The rust backend runs a gRPC Server (tonic) https://github.com/hyperium/tonic to which a rust client (also tonic) and a Swift client (https://github.com/grpc/grpc-swift) can connect to.
After the Swift client crashes, none of the clients can connect anymore to the server.
The rust client reports:
Error: Status { code: Cancelled, message: "h2 protocol error: protocol error: stream no longer needed" }
The swift client reports:
StreamClosed(streamID: HTTP2StreamID(1), errorCode: HTTP2ErrorCode<0x8 Cancel>, location: ".../swift-nio-http2/Sources/NIOHTTP2/HTTP2StreamChannel.swift:820")
What I've tried
I setup a http2 keepalive in the server, but that didn't do anything.
I tried to reproduce the same effect by purposefully crashing the rust client - without success.
I'm not even sure wether to look at the swift-grpc and tonic libraries or grpc itself (for me it looks like the server closes the stream on purpose)..
Has anyone an idea what i could do to fix this?
Thanks in advance!

500 Error: Failed to establish a backside connection

I am using Secure Gateway of ibm blue-mix.
However, I do not know how to do "500 Error: Failed to establish a backside connection" error.
The situation is as follows:
When accessing, the following message will be displayed on the Secure Gateway client.
[INFO] (Client ID keqdVTJMrJt_prF) Connection #1 is being estabrished to xxx.xxx.xxx.xxx:nnn
The display of the log is
"[INFO ] SRVE0242I: [ChisInq003] [/ChisInq003] [Servlet.ChisServlet003]: Initialization successful.".
However, if it takes about two minutes, "500 Error" will be displayed.
Does anyone know what to do?
If the connection fails after ~2 minutes, it sounds like the connection between the Secure Gateway Client and the host:port it is trying to connect to is timing out which implies a network issue.
Are there any additional Secure Gateway Client logs that can be shared that might contain an error? What is it that you're trying to connect to via Secure Gateway?

Swift socket invalid HTTP upgrade

Good day,
I've established very simple Python server (Twisted framework) on localhost:80. It works ok with telnet - i can send and recieve simple messages. But i need to connect Swift iOS app client to this server. App running on simulator.
I'm using Socket_IO_Client_Swift framework. At this moment, i've just created socket object with "localhost:80" parameter and call connect() method on start of application.
Server can see the signal from client, but client disconnect immidietly after connection with this message:
Got event: disconnect, with items: Optional((
"Invalid HTTP upgrade"
What can i do to fix this, and what is HTTP upgrade?
Thanks

TLS Socket connection through Nodejs

Im trying to establish a TLS socket connection to chat.facebook.com port:5222 through Nodejs.
Im using the following code :
var a=require('tls');
var b=a.connect(5222,'chat.facebook.com',function(){console.log("connected");});
b.on('error',function(error){console.log(error);})
But it is not getting connected and instead giving an error :
[Error: 140089045411648:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:683:]
I have tried a similiar connection to encrypted.google.com:443 and console readily fired a "connected" .
Can someone guide me what i have been missing or what can be done to overcome this problem.
xmpp with tls uses "STARTTLS", a protocol upgrade from plaintext to encrypted. See http://xmpp.org/rfcs/rfc6120.html#tls for details.
(It means you have to send some unencrypted xml stuff first, and wait for the other end to confirm your choice to upgrade to TLS)