GithubHelp home page GithubHelp logo

node-red-contrib-mqttssl's People

Contributors

raynerv avatar raynervintervoll avatar tedstriker avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

node-red-contrib-mqttssl's Issues

No longer seems to work

The package no longer seems to work as of June 2019. Here is what I get when installing, adding the required line to package.json file, and re-starting node-red:

20 Jun 19:58:43 - [info] Waiting for missing types to be registered:
20 Jun 19:58:43 - [info] - mqttssl-broker

I have the latest versions of npm, node-red, node-red-dashboard etc. Running things on Windows 10. It totally stops all flows from running.

Can't connect to mosquitto v1.4.2 broker

I am unable to connect to a v1.4.2 broker using this package. Using a simple node.js application with a recent mqtt package (v1.1.5) does connect and works as expected.

I initially thought that this issue may be caused by my usage of self-signed certificates, but later discovered that this is unrelated to the issue. It is also not a authorization issue as discussed in Issue #1.

Symptoms are when running node-red in verbose mode it shows repeated `[mqtt] [88b5cac3.774a38] connected to broker' messages, but no mqtt messages are ever received. On the broker (mosquitto) side, the logs show the following lines repeating for each connection attempt:

New connection from 192.168.0.136 on port 8883.
New client connected from 192.168.0.136 as node-red-playground (c1, k15, u'myuser').
Socket error on client node-red-playground, disconnecting.

This sounds like the problem that @VirTERM was referencing in Issue #1.

Digging into the problem for a few hours reveals that there appears to be a bug in the (extremely) old version (v0.3.x) of mqtt referenced in this project - it sends a 'connect' command before the secure connection is completely up, which causes mosquitto to close the connection. Hand-patching the mqtt library in place to fix the issue allows me to successfully connect to the broker.

Also while looking into this issue, I found what appears to be a bug in your mqttClientPool.js code. Around line 63 there is the line

var connecting = false;

This is causing node-red-contrib-mqttssl to immediately generate two connections in a row when initially connecting. It also then causes the extra connection to repeatedly disconnect and reconnect while node-red is running. Setting this variable to true fixes the issue and only one connection is made and maintained.

For anyone interested in the hand-patching of the old mqtt package, I edited ./node_modules/node-red-contrib-mqttssl/node_modules/mqtt/lib/client.js and commented out the lines:

  // Send a connect packet on stream connect
  this.stream.on('connect', function () {
    that.conn.connect(that.options);
  });

leaving the on secureConnect handler intact. Once that is removed, I am able to connect to mosquitto and receive published messages. After that, fixing the connecting flag issue causes things to work rock-solid.

TLS/SSL Connection [with certificates]

Hello, I'm trying to connect the node-red via TLS/SSL to a HiveMQ broker, using certificates. I am able to connect to the HiveMQ broker via MQTT.FX using Java Key Stores, but unable to find where to use the certificate in the MQTTSSL plugin. Is there no support for TLS and certificates, yet or am I missing something else?

Authentication fails

Hi there,

I'm experiencing trouble connecting to the broker using name + password for authentication.
The credentials are alright, as I use them with other clients as well. Different ones (also working with other clients) don't work either. I tried that just to rule out possible ACL issues.
The broker I use is mosquitto 1.3.4 and Node-RED 0.10.4

Weird thing is: when I allow anonymous users the connection is established immediately.

Do you have a hint, where to look at to fix it?
Also username and password are not loaded, when I reconfigure the broker config node.

Any help is appreciated. Thank you.

best regards,
Ted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.