Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Client disconnecting and reconnecting using local mosquitto broker #66

@fractal-joe

Description

@fractal-joe

Hello,

I'm using docker container running a mosquitto broker. Works fine with mqtt.js library. However, when I try to use the Connector provider it disconnects/reconnects on a loop. Here's the output:

mosquitto  | 1668119874: New client connected from ::ffff:172.23.0.1:57598 as mqttjs_41060487 (p2, c1, k0).
mosquitto  | 1668119874: No will message specified.
mosquitto  | 1668119874: Sending CONNACK to mqttjs_41060487 (0, 2)
mosquitto  | 1668119874: Client mqttjs_41060487 closed its connection.

I'm using vite and added the following line to the vite config resolve: { alias: { mqtt: "mqtt/dist/mqtt.js" }
I got it to work with test.mosquitto.org but then ran into the client undefined issue

#41

I'd love to get this working locally. Here' is my mosquitto.conf

persistence false
listener 1883
allow_anonymous true
listener 8083
protocol websockets

Here is a similar issue with a Node Red client:

eclipse-mosquitto/mosquitto#2381

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions