amqplib
amqplib copied to clipboard
"Frame size exceeds frame max" while trying to connect
I'm facing this weird error while trying to connect to the rabbitmq client hosted on a separate server
Frame size exceeds frame max
at parseFrame (/node_modules/amqplib/lib/frame.js:55:13)
at Connection.C.recvFrame (/node_modules/amqplib/lib/connection.js:621:15)
at Connection.C.recvFrame (/node_modules/amqplib/lib/connection.js:631:19)
at Socket.recv (/node_modules/amqplib/lib/connection.js:501:16)
at Object.onceWrapper (events.js:519:28)
at Socket.emit (events.js:400:28)
at emitReadable_ (internal/streams/readable.js:555:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21) {
broker: Symbol()
}
i'm using the 3.10.7 version of the rabbitmq and the latest amqplib version
Hi @fareed945,
If you search the issues you'll see this is typically because you've connected to a server that doesn't use amqp 0.9.1. In some cases people are trying to connect to an amqp 1.0 broker, in others they've accidentally connected to an HTTP server.
A similar problem can occur when receiving a message with an oversized header, but since you're trying to connect I suspect it's the former.
hey @cressie176 thanks for the quick turn around, when I check my listeners on the server rabbitmq-diagnostics listeners
I have the following ports enabled
Interface: [::], port: 15672, protocol: http, purpose: HTTP API Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
amqp 0.9.1 is enabled
Am I doing something wrong here ?
This is what I get from my docker container...
Interface: [::], port: 15672, protocol: http, purpose: HTTP API
Interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
While I know it's unlikely, previously people were accidentally connecting to the wrong host / port, and in one case even had a secret HTTP server grabbing 5672
I wonder what might be the issue, It's not compatibility issue right ? and by the way i'm able to open the management console and create queue, push messages as well via the console
Hi @fareed945,
The most likely thing is still that the client application is connecting to something which isn't communicating using amqp 0.9.1. It looks like Rabbit is listening on all the usual ports, but this doesn't mean that the client application is connecting to the RabbitMQ host on port 5672, or that RabbitMQ isn't attempting an amqp 1.0 handshake (disclaimer, I've never used amqp 1.0, so know very little about it)
For example, the client connection parameters could be wrong, something else could have hijacked 5672, there could be a TCP/IP proxy misrouting the connection, if you're running RabbitMQ inside a docker container, the external port might be wrong, ip_tables might have an incorrect entry, etc, etc.
I know with RabbitMQ you can install an amqp 1.0 plugin, but I don't know whether this forces all connections to use amqp 1.0. It's worth checking to see if you have this plugin enabled though.
One way to get a better understanding of what is happening is to use WireShark to inspect the traffic between client and server.
Did you get to the bottom of it @fareed945?
not yet @cressie176 , i'll use wireshark to analyze it and will put it here
@cressie176 went through the rabbitmq log dump, i'm always seeing this error
2022-08-16 08:39:20.081333+00:00 [info] <0.31050.1> accepting AMQP connection <0.31050.1> (10.0.201.98:11126 -> 10.0.6.181:5672) 2022-08-16 08:39:20.081458+00:00 [error] <0.31050.1> closing AMQP connection <0.31050.1> (10.0.201.98:11126 -> 10.0.6.181:5672): 2022-08-16 08:39:20.081458+00:00 [error] <0.31050.1> {bad_header,<<"GET / HT">>}
i've opened up a TCP port for both 5672 and 15672 and i'm able to telnet them as well, not sure on what the issue is
2022-08-16 08:39:20.081458+00:00 [error] <0.31050.1> {bad_header,<<"GET / HT">>}
That's the start of an HTTP GET request, e.g.
GET / HTTP/2
It wasn't made by amqplib
Any update @fareed945?