Issue Sending messages Vernemq

32 views
Skip to first unread message

Thayaruban Thayalan

unread,
Nov 7, 2023, 4:27:15 AM11/7/23
to vernemq-users
I try to connect to the vernemq broker.No issues there.But when i try to send messages to the broker,it is getting disconnected everytime.When i run `sudo service vernemq status`.

I am getting a log like this
● vernemq.service - VerneMQ Server
     Loaded: loaded (/lib/systemd/system/vernemq.service; disabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-11-07 06:51:45 UTC; 2h 10min ago
    Process: 4049001 ExecStartPre=/usr/lib/vernemq/bin/vernemq chkconfig (code=exited, status=0/SUCCESS)
    Process: 4049117 ExecStart=/usr/lib/vernemq/bin/vernemq start (code=exited, status=0/SUCCESS)
   Main PID: 4049224 (beam.smp)
      Tasks: 182 (limit: 19192)
     Memory: 83.7M
     CGroup: /system.slice/vernemq.service
             ├─4049116 /usr/lib/vernemq/erts-12.2/bin/epmd -daemon
             ├─4049195 /usr/lib/vernemq/erts-12.2/bin/run_erl -daemon /tmp/vernemq// /var/log/vernemq exec /usr/lib/vernemq/bin/vernemq console
             ├─4049224 /usr/lib/vernemq/erts-12.2/bin/beam.smp -P 256000 -e 256000 -Q 262144 -A 64 -K true -W w -- -root /usr/lib/vernemq -progname vernemq>
             ├─4049461 erl_child_setup 1048576
             ├─4049506 sh -s disksup
             ├─4049507 /usr/lib/vernemq/lib/os_mon-2.7.1/priv/bin/memsup
             ├─4049510 /usr/lib/vernemq/lib/os_mon-2.7.1/priv/bin/cpu_sup
             ├─4049748 inet_gethost 4
             ├─4049749 inet_gethost 4
             └─4049800 /usr/lib/vernemq/lib/bcrypt-1.1.5/priv/bcrypt

Nov 07 06:51:41 polar-machine-learning systemd[1]: Starting VerneMQ Server...
Nov 07 06:51:42 polar-machine-learning vernemq[4049001]: config is OK
Nov 07 06:51:42 polar-machine-learning vernemq[4049001]: -config /var/lib/vernemq/generated.configs/app.2023.11.07.06.51.41.config -args_file /var/lib/vern>
Nov 07 06:51:42 polar-machine-learning systemd[1]: vernemq.service: Found left-over process 4049116 (epmd) in control group while starting unit. Ignoring.
Nov 07 06:51:42 polar-machine-learning systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Nov 07 06:51:42 polar-machine-learning vernemq[4049117]: vmq_cluster_node_sup
Nov 07 06:51:45 polar-machine-learning systemd[1]: vernemq.service: Supervising process 4049224 which is not our child. We'll most likely not notice when i>
Nov 07 06:51:45 polar-machine-learning systemd[1]: Started VerneMQ Server.

There isn't any log related to this temporary disconnection.Can someone help me with debugging this.

André Fatton

unread,
Nov 7, 2023, 5:13:09 AM11/7/23
to vernemq-users
Hi,
The most likely reason your Client gets disconnected when it sends a PUBLISH frame is that it is not authorized to publish. (Check how you have set up authorization).
You can trace the ClientId like this on the broker: vmq-admin trace client client-id=yourclient
This will show you whether the auth_on_publish hook rejects your PUBLISH frame.
I hope this helps,
André
Reply all
Reply to author
Forward
0 new messages