Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aedes broker does not respond to localhost or 127.0.0.1 after a node-red project is pulled down from github #83

Open
jmorris644 opened this issue Dec 9, 2024 · 3 comments

Comments

@jmorris644
Copy link

I manage node-red replicated projects through github.

When I push and pull a node-red instance that contains the Aedes broker node, the node will not respond to MQTT nodes that are configured with either localhost or 127.0.0.1 as their server. I can change the server on the MQTT nodes to any other server and it works.

If I delete the Aedes broker node and drop it on the workspace and redeploy then it all works as expected. localhost and 127.0.0.1 can be accessed.

@martin-doyle
Copy link
Owner

Do you have a repository I can reproduce your request?

@jmorris644
Copy link
Author

I cannot share the one that I am currently working on. But let me see if I can create a test one and reproduce the issue. Be back soon...

@jmorris644
Copy link
Author

I created a test project with just 3 nodes. I could not recreate the issue.
So I did some more testing. I have found what is causing the issue. It is coming from the flow that I have created.

I have some IOT devices that maintain the address of the MQTT broker's FQN unless restarted. Even if the ip address at the router changes for the Broker's FQDN. So when I see a device that wants to talk to the incorrect broker I trap the payload.packet.topic, reformat it into a command msg.topic and send it back to the device to correct its behavior.

I start this message flow by grabbing the publish messages (from the 2nd broker node output) and checking it.

When the broker starts up it issues 2 publish messages itself. The 1st one is "$SYS/d0c3a879-3fbb-42a9-a74e-9438b2f288a0/new/clients" and the 2nd one is "$SYS/d0c3a879-3fbb-42a9-a74e-9438b2f288a0/disconnect/clients".

So my code sees these publish messages and reformats them into the msg.topic "$SYS/cmnd/new/reset" and "$SYS/cmnd/disconnect/reset" respectively.

So when these commands are then sent back via a MQTT out node, I think it messes with the broker node itself.

I am working on adjusting my flow so that I ignore the topics that start with $SYS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants