Connecting to RabbitMQ MQTT Websocket connection #12334
Replies: 2 comments
-
@greektreat in order to use MQTT over WebSockets, you need to use a special JavaScript client library. There is an example plugin that ships with RabbitMQ and demonstrates a couple of small Web apps that do it, just as an example. There are no traces of Web MQTT connections in the logs, just "regular" MQTT connections on port 1883. On an unrelated note, there is evidence of failing CLI tool authentication to this node:
|
Beta Was this translation helpful? Give feedback.
-
Another common reason is remote connections with well-known default credentials but in that case, there would have been specific error messages in the log. "Remote", as the docs describe, means "from a host other than a local loopback interface", which includes containers (but should not affect a Chocolatey installation with apps running on the same host). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Community Support Policy
RabbitMQ version used
3.13.7
Erlang version used
26.2.x
Operating system (distribution) used
Windows 10
How is RabbitMQ deployed?
Chocolatey package
rabbitmq-diagnostics status output
Status of node rabbit@CAMITL0016 ...
Runtime
OS PID: 10296
OS: Windows
Uptime (seconds): 55009
Is under maintenance?: false
RabbitMQ version: 3.13.7
RabbitMQ release series support status: see https://www.rabbitmq.com/release-information
Node name: rabbit@CAMITL0016
Erlang configuration: Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]
Crypto library: OpenSSL 3.1.0 14 Mar 2023
Erlang processes: 486 used, 1048576 limit
Scheduler run queue: 1
Cluster heartbeat timeout (net_ticktime): 60
Plugins
Enabled plugin file: c:/Users/l-makimo/AppData/Roaming/RabbitMQ/enabled_plugins
Enabled plugins:
Data directory
Node data directory: c:/Users/l-makimo/AppData/Roaming/RabbitMQ/db/rabbit@CAMITL0016-mnesia
Raft data directory: c:/Users/l-makimo/AppData/Roaming/RabbitMQ/db/rabbit@CAMITL0016-mnesia/quorum/rabbit@CAMITL0016
Config files
Log file(s)
Alarms
(none)
Memory
Total memory used: 0.0903 gb
Calculation strategy: rss
Memory high watermark setting: 0.4 of available memory, computed to: 13.5982 gb
code: 0.041 gb (40.03 %)
other_system: 0.0285 gb (27.85 %)
other_proc: 0.0239 gb (23.31 %)
other_ets: 0.0027 gb (2.65 %)
reserved_unallocated: 0.0021 gb (2.05 %)
atom: 0.0016 gb (1.53 %)
plugins: 0.0015 gb (1.44 %)
metrics: 0.0014 gb (1.37 %)
binary: 0.0007 gb (0.69 %)
msg_index: 0.0006 gb (0.57 %)
mgmt_db: 0.0002 gb (0.2 %)
metadata_store: 0.0002 gb (0.17 %)
mnesia: 0.0001 gb (0.09 %)
metadata_store_ets: 0.0 gb (0.03 %)
quorum_ets: 0.0 gb (0.03 %)
queue_procs: 0.0 gb (0.02 %)
connection_other: 0.0 gb (0.01 %)
quorum_queue_procs: 0.0 gb (0.0 %)
quorum_queue_dlx_procs: 0.0 gb (0.0 %)
stream_queue_procs: 0.0 gb (0.0 %)
stream_queue_replica_reader_procs: 0.0 gb (0.0 %)
connection_readers: 0.0 gb (0.0 %)
connection_writers: 0.0 gb (0.0 %)
connection_channels: 0.0 gb (0.0 %)
queue_slave_procs: 0.0 gb (0.0 %)
stream_queue_coordinator_procs: 0.0 gb (0.0 %)
allocated_unused: 0.0 gb (0.0 %)
File Descriptors
Total: 2, limit: 65439
Sockets: 1, limit: 58893
Free Disk Space
Low free disk space watermark: 0.05 gb
Free disk space: 177.9222 gb
Totals
Connection count: 1
Queue count: 2
Virtual host count: 2
Listeners
Interface: [::], port: 15672, protocol: http, purpose: HTTP API
Interface: [::], port: 1883, protocol: mqtt, purpose: MQTT
Interface: 0.0.0.0, port: 1883, protocol: mqtt, purpose: MQTT
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
Logs from node 1 (with sensitive values edited out)
Moved to a gist
Logs from node 2 (if applicable, with sensitive values edited out)
See https://www.rabbitmq.com/docs/logging to learn how to collect logs
Logs from node 3 (if applicable, with sensitive values edited out)
See https://www.rabbitmq.com/docs/logging to learn how to collect logs
rabbitmq.conf
See https://www.rabbitmq.com/docs/configure#config-location to find rabbitmq.conf file location
Steps to deploy RabbitMQ cluster
RUn thew choco command
choco install rabbitmq
then Install MQTT
run the restart command:
rabbitmq-server restart
Steps to reproduce the behavior in question
I have setup RabbitMQ, I was easily able to set up the MQTT plugin and make it work with MQTTExplorer. I then added the plugin for web mqtt rabbitmq-plugins enable rabbitmq_web_mqtt but I can't figure out how to get it to work. I created a vhost, created a user and added that user to the vhost the url it is trying to connect to is ws://127.0.0.1:15675 I am getting the error Connection refused Not sure what I am doing wrong
advanced.config
See https://www.rabbitmq.com/docs/configure#config-location to find advanced.config file location
Application code
# relevant messaging-related parts of your code go here
Kubernetes deployment file
# Relevant parts of K8S deployment that demonstrate how RabbitMQ is deployed
Beta Was this translation helpful? Give feedback.
All reactions