When I'm starting websockify with python2.7 on my server no warnings appear, everything is ok.
But when the first connection comes in there are problems with base64 I think:
1: <ip>: Plain non-SSL (ws://) WebSocket connection
1: <ip>: Version hybi-13, base64: 'False'
1: connecting to: <myserver.com>:64749
On the client side I get an error in safari but it also tells me that the connection is made and I'm able to send and receive messages:
WebSocket network error: The operation couldn’t be completed. Connection refused ws://localhost:17523
The error about connecting to ws://localhost:17523 is harmless. In order to test whether the WebSocket API supports binary data it is necessary to actually instantiate a WebSocket object, however, WebSocket objects must be instantiated with an actual destination so websock.js uses a localhost port to test the connection. The browser complains that the connection fails but websock.js is able to use that object to do its test.
The base64: False indicates that the client and server have negotiated to use raw binary data and don't need to use base64 encoded strings to encode the data. Base64 encoding is necessary in older browsers (or with web-socket-js emulator) that support WebSockets but not binary data.
Since you are successfully sending and receiving data, I assume this question is just verifying that the messages you are seeing aren't major problems correct?
Related
I have a gRPC client written in GoLang that I'm running on raspberryPI 4 (armv7l).
When I run the client on my MacBook it connects to the server and everything is fine.
When I run the same client on RaspberryPI 4, I get an error:
transport: authentication handshake failed: tls: server selected unadvertised ALPN protocol
Looking at the standard library, I checked that this check fails:
https://github.com/golang/go/blob/346b18ee9d15410ab08dd583787c64dbed0666d2/src/crypto/tls/handshake_client_tls13.go#L399
Function checkALPN is defined here: https://github.com/golang/go/blob/346b18ee9d15410ab08dd583787c64dbed0666d2/src/crypto/tls/handshake_client.go#L752
I printed clientProtos []string, serverProto string and it turns out that when code is run on MacBook, clientProtos contains h2 (which stands for HTTP2) and serverProto is h2 which is fine, they match and the connection gets established according to protocol.
When the same code is run on RaspberryPI, clientProtos is http/1.1 and server proto is h2 (gRPC connection can be established only over HTTP2) so there's a mismatch so the client fails to connect and says "server selected unadvertised ALPN protocol" which makes total sense. Any hints on how to proceed? Is there a reason why the client on RaspberryPI doesn't want to use HTTP2? Or maybe I have to set it somewhere? Or install something? Not sure how to proceed here and Google doesn't help. I also tried compiling client code with GoLang 1.16 but got the same error
I'm using Google's simplehttp2server go-lang program to run some tests and have encountered a recurring error. Upon executing the TLS handshake I receive the following error:
2019/12/12 12:42:55 http: TLS handshake error from 127.0.0.1:36202: read tcp 127.0.0.1:5000->127.0.0.1:36202: use of closed network connection
I have updated my go version to 1.13.5 from 1.12.9 and tried two browsers (brave + chrome) plus curl and receive the same error code each time. It happens over HTTP/2 and HTTP/1.1. I have seem other answers from across the web but am still running into this error (ex1, ex2, ex3, ex4).
Very much appreciate any feedback, advice, or admonishment. Anything to help the migraine this problem is giving me!
edit: screenshot from my curl and running of simplehttp2server
example image from curl and simplehttp2server
This error happens when you have two websockets connected to a singular address using the same port from the same machine. One of the websockets will be able to connect fine but the other wont be able to make the connection.
I was making the same mistake and when I removed the duplicate connection the error resolved.
I am relatively new to JMeter however I have been doing Performance testing for almost a decade.
I am working with a proprietary TCP protocol that sends a keep alive periodically - through the existing TCP connection.
I am struggling to understand how I can fork the JMeter 'thread group' to handle a TCP Keep alive received over the same TCP session.
Any ideas?
Thank you brainstrust!
edit: I'm using the TCPsampler and have read the help page. I'll try to provide some more detail shortly about what's happening and how the protocol is written.
edit2: Unfortunately because it's a propriety protocol I cannot reveal the exact nature of the protocol itself but it's largely irrelevant to the problem I'm facing.
Basically, I use the 1st TCP sampler to 'start/authenticate' the session with the server. This is configured the following options:
1. TCPClient classname: LengthPrefixedBinaryTCPClientImpl (my protocol is implemented this standard way)
2. Re-use connection ON.
3. Close connection OFF.
4. Set NoDelay OFF.
5. SO_Linger: nothing
6. Text to send: my hex code for the protocol (this is correct)
I get the response from the first TCP request and then I want to start interacting, however in the session, the server sends a keep alive mid-stream, so occassionally when I send a request, I get an unexpected keep alive response instead (it's an open stream of data).
This is what I would like to solve.
I attempted to use a recursive test fragment, so that on KeepAlive response, it would send the request again however one cannot recurse the test fragments (it throws a Java error on Run attempt).
I hope this gives more context! Thank you for your patience (I'm a newbie SO user!)
Please check the below options if it helps with you sceario:-
If "Re-use connection" is selected, connections are shared between
Samplers in the same thread, provided that the exact same host name
string and port are used. Different hosts/port combinations will use
different connections, as will different threads. If both of "Re-use
connection" and "Close connection" are selected, the socket will be
closed after running the sampler. On the next sampler, another socket
will be created. You may want to close a socket at the end of each
thread loop.
If an error is detected - or "Re-use connection" is not selected - the
socket is closed. Another socket will be reopened on the next sample.
The following properties can be used to control its operation:
tcp.status.prefix text that precedes a status numbertcp.status.suffix
text that follows a status numbertcp.status.properties name of
property file to convert status codes to messagestcp.handler Name of
TCP Handler class (default TCPClientImpl) - only used if not specified
on the GUI
For more details:-https://jmeter.apache.org/usermanual/component_reference.html#TCP_Sampler
This problem may be a bit obscure... I'm encountering a ZeroMQ assertion on connections when I configure a client process (the side that connects, not binds) as a curve server with a custom ZAP handler. This configuration is backwards from the examples I've looked at - in that usually the curve server is the side the binds, and the client connects); however, the documentation indicates that it doesn't matter which side binds or connects.
In the ZAP handler, if the curve client credentials are valid, the connection is established and everything works. However, if the credentials are invalid and the ZAP handler responds with a "400" status code, ZeroMQ asserts right afterwards. The exact assert is "Assertion failed: zap_pipe == NULL (src/session_base.cpp:301)". I have verified that if I reverse which side binds and connects, there is no assertion.
ZMQ version is 4.1.4, running on Ubuntu 16.04.9,gcc 5.4.0. ( #Dale )
I've not been able to find detailed documentation specifying how the ZAP handler is supposed to work - so perhaps there is another code that should be returned?
Has anyone else ever tried this?
Am trying to upload a file using libcurl in C. Data transmission is getting failed. Below is the log message.
How to fix this issue?
< 250 CWD command successful.
EPSV
Connect data stream passively
< 500 'EPSV': command not understood
disabling EPSV usage
PASV
< 227 Entering Passive Mode (x,x,x,x,193,152).
Trying x.x.x.x... * No route to host
couldn't connect to host
Closing connection #0
Couldn't connect to server
This means that when the FTP server opens a second port for your client to connect to, your client (libcurl) fails to reach it. It is most likely due to a firewall or other network equipment somewhere along the way that blocks your ability to do the request operation.
Alternative reasons could be a wrongly configured ftp server, but if it works for other users, that seems less likely.
Another reason for failure may be that you have an active firewall that doesn't know EPSV and thus gets confused by it and ruins it for you. Try without it by setting CURLOPT_FTP_USE_EPSV to 0.
You can try to the active approach instead (which is what most older style FTP clients do by default), which makes the client ask the server to connect back to you instead. You activate that in libcurl with CURLOPT_FTPPORT. (See the docs for exact details on how to use it.)