Testing a websocket server with tsung - testing

I start to use tsung to test my server with socket.io.
I downloaded the Github Zip, compiled and installed the latest "dev" including Websockets compatibility.
After browsing a lot of Google results and message in this mailing list, I couldn't find any answer to my issue. My problem is that I can't send/receive a message to my socket.io server. I'm able to connect to my socket with handshaking OK but nothing happens when I send the message. I tried to use bidir=true attribute but nothing change.
In my tsung log, I've got this messages:
=INFO REPORT==== 5-Sep-2013::08:08:00 ===
ts_client:(7:<0.93.0>) connect to port 80
=INFO REPORT==== 5-Sep-2013::08:08:00 ===
ts_client:(3:<0.93.0>) Data receive from socket in state think, stop
In my socket log (server side), I've got this messages:
debug: client authorized for
info: transport end (undefined)
debug: cleared heartbeat interval for client b07GKwmOJPQVDwznBzN1
debug: discarding transport
You can find my tsung.xml file here: http://pastebin.com/A60PpKrL
Please help,
Kind Regards,
Arnaud

try the 1.5.1 version as its "stable" and your using a bleeding edge build.
Also, try and tcpdump and tell me what you see, maybe use pastebin to show me the request.

Related

RabbitMQ: None of the specified endpoints were reachable?

Trying to publish a message to RabbitMQ using Masstransit but its failing.
I've looked at a few SO posts on this but none have a concrete answer. I've tried different ways of formatting the connection string, hard coding, etc but nothing seems to work.
If I connect outside of the app just via the browser, everything works fine.
In my app though, it just can't connect?
[09:09:46 WRN] Connection Failed: rabbitmq://{host}:15672/
RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable
---> System.IO.IOException: connection.start was never received, likely due to a network timeout
I'm registering it like:
serviceCollection.AddMassTransit(x =>
{
x.UsingRabbitMq((rabbitContext, rabbitConfig) =>
{
rabbitConfig.Host(new Uri("amqps://{host}:15672/"), h =>
{
h.Username("admin");
h.Password("...");
});
rabbitConfig.ConfigureEndpoints(rabbitContext);
rabbitConfig.Durable = true;
});
});
If I just use the RabbitMQ library it also connects fine, so Masstransit seems to be the issue here?
/var/log/rabbitmq/rabbit#mg.log only logs failed connections via the management panel it seems, at least its not logging for failed app connects.
Check that you are using the right network port. Port 15672 is the default port for the web-based management console, which is not the same port MassTransit needs to connect to. That defaults to 5672 for plain AMQP, and 5671 for TLS-secured AMQP.
To confirm which ports your RabbitMQ server is listening on, and that your web server can access them see this troubleshooting guide and the answers to this question.

Getting readiness probe failed: dial tcp <IP>:5672 connect: connection refused error in rabbitmq-cluster pods

I am new to rabbitmq and would appreciate help in the issue I am facing.
I have deployed rabbitmq using the rabbitmq cluster k8s operator on openshift which is hosted on Azure. (This is the guide I referred to deploy the operator).
The operator and cluster is up and running, also able to access the management UI on localhost:15672.
But when I describe the pod, it shows the warning of readiness probe failed:
dial tcp <IP>:5672 connect: connection refused
Due to this, when I try to run the rabbitmq hello world tutorial, it fails with the error:
connect ETIMEDOUT 172.30.69.51:5672
errno: -4039
code: 'ETIMEDOUT'
syscall:'connect'
address: 172.30.69.51
port:5672
(172.30.69.51 is the clusterIP)
From the management UI, I am able to create new exchange, queue and binding and send & publish msgs.
PS. apologies if the conversation format is incorrect, pls feel free to correct me and I'll take care from next time. Thank you.

Rabbitmq nodes not able to join cluster?

Below are the commands executed and error stack:
[root#DGTLSITTIBCO2 ~]# rabbitmqctl join_cluster rabbit#DGTLSITTIBCO1
Clustering node rabbit#DGTLSITTIBCO2 with rabbit#DGTLSITTIBCO1 Error:
unable to perform an operation on node 'rabbit#DGTLSITTIBCO1'. Please
see diagnostics information and suggestions below.
Most common reasons for this are:
Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
Target node is not running
In addition to the diagnostics info below:
See the CLI, clustering and networking guides on rabbitmq documentation to learn more
Consult server logs on node rabbit#DGTLSITTIBCO1
DIAGNOSTICS
attempted to contact: [rabbit#DGTLSITTIBCO1]
rabbit#DGTLSITTIBCO1:
connected to epmd (port 4369) on DGTLSITTIBCO1
epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traffic
TCP connection succeeded but Erlang distribution failed
TCP connection to remote host has timed out. Is the Erlang distribution using TLS?
Current node details:
node name: rabbitmqcli57#DGTLSITTIBCO2
effective user's home directory: /var/lib/rabbitmq
Erlang cookie hash: ci1chJoiyrDKCLOj2TDxaA==
Please see my answer in the rabbitmq-users mailing list. In short, your Erlang cookies are most likely not synchronized.
Generally, it's not very helpful to paste an error into your message without any other information. The people helping out on this list like to know what version of RabbitMQ and Erlang you're using and on what operating system, and a description of what you're trying to do.
Anyway, in this case, your issue is one of the most commonly reported on this list. If you search for the string Error: unable to perform an operation on node, you'll see many replies with suggestions on how to fix your issue.
The RabbitMQ team also maintains documentation, including a troubleshooting document: https://www.rabbitmq.com/troubleshooting.html
You should also read the Clustering Guide, specifically this section: https://www.rabbitmq.com/clustering.html#erlang-cookie

Getting RabbitMQ authentication failing even with cookie is set

I have recently installed rabbitmq with ErlanOTP on Windows 10 running on lattePanda
I ran rabbitmqctl status and got the following error:
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.5\sbin>rabbitmqctl status
Status of node rabbit#DESKTOP-V6GQ6RF ...
Error: unable to perform an operation on node 'rabbit#DESKTOP-V6GQ6RF'. Please see diagnostics information and suggestions below.
Most common reasons for this are:
Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)
CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)
Target node is not running
In addition to the diagnostics info below:
See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more
Consult server logs on node rabbit#DESKTOP-V6GQ6RF
DIAGNOSTICS
attempted to contact: ['rabbit#DESKTOP-V6GQ6RF']
rabbit#DESKTOP-V6GQ6RF:
connected to epmd (port 4369) on DESKTOP-V6GQ6RF
epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traffic
TCP connection succeeded but Erlang distribution failed
Authentication failed (rejected by the remote node), please check the Erlang cookie
Current node details:
node name: 'rabbitmqcli2#DESKTOP-V6GQ6RF'
effective user's home directory: C:\Users\LattePanda
Erlang cookie hash: 8Kq9f/AaeixMvahU4G2v8A==
How can I get RabbitMQ up and running?
While trouble-shooting I discovered this thread https://groups.google.com/forum/#!topic/rabbitmq-users/a6sqrAUX_Fg
and set the environment variable to Erlang Cookie I found in %HOMEDRIVE%%HOMEPATH%\.erlang.cookie but it still doesn't seem to work.
The RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.
It is important to copy the cookie from the correct location. This document explains where it is located based on Erlang version and Windows version. You don't mention which Erlang version you are using, but I suspect you will want to copy the C:\WINDOWS\system32\config\systemprofile\.erlang.cookie file to %HOMEDRIVE%%HOMEPATH%\.erlang.cookie. You should not have to set any environment variables so if you have, I recommend removing them and restarting your server.

Need help deciphering rabbitmq error messages when trying to connect using Python clinet

I have inherited a windows Python application that communicates with linux RabbitMQ. I need it to connect via SSL, but am currently failing.
I am using Win32 OpenSSL v1.0.0c Twisted 10.2.0 and pyOpenSSL.
Rabbitmq logs the following cryptic error message. Anyone have any idea what this might mean?
=ERROR REPORT==== 15-Feb-2011::18:36:41 ===
error on TCP connection <0.12966.102>:{ssl_upgrade_failure,
{{function_clause,
[{ssl_alert,description_txt,")"},
{ssl_alert,alert_txt,1},
{ssl_connection,log_alert,3},
{ssl_connection,handle_event,3},
{gen_fsm,handle_msg,7},
{proc_lib,init_p_do_apply,3}]},
{gen_fsm,sync_send_all_state_event,
[<0.12967.102>,started,5000]}}}
I needed to upgrade to the later version of erlang and rabbitmq.