ekuiper icon indicating copy to clipboard operation
ekuiper copied to clipboard

MQTT Source Stream : The connection to mqtt broker is lost due to EOF

Open robodevchampion opened this issue 1 year ago • 9 comments

Please describe your problem in detail, if necessary, you can upload the log file through the attachment:

Hi I have created a MQTT source stream and then rule, rule gives me alarms continuously:

The connection to mqtt broker is lost due to EOF

MQTT Config looks like this :

 mqtt_config = {
                "server": "tcp://IP_ADDR:1883",
                "protocolVersion": "3.1.1",
                "clientId": f"test_client_id",
                "qos": 1,
                "insecureSkipVerify": False,
                "topic": f"test_data",
            }

Can you please help me what could be the issue ?

Thanks Abhishek

robodevchampion avatar Aug 05 '24 07:08 robodevchampion

Client id may be conflicted. Try not to set the id.

ngjaying avatar Aug 05 '24 08:08 ngjaying

Hi, If I don't set client id it works fine.

But I checked broker, it does not have any client connected.

Seems some issue in ekuiper, as soon as I start the rule a client is connected

But stopping a rule & Deleting a rule not makes the client disconnected

image

Can you please check, what could be the issue ?

Thanks

robodevchampion avatar Aug 05 '24 12:08 robodevchampion

That is work as desing. Stream is a logical concept. When creating the rule with that stream, it will use the connection configuration in the stream to do the logical connection.

ngjaying avatar Aug 05 '24 12:08 ngjaying

  1. So when does this client got disconnected ?
  2. Also, even if client id is definitely new(No clinet exist with such id) , what could be the cause of The connection to mqtt broker is lost due to EOF error ?

robodevchampion avatar Aug 05 '24 12:08 robodevchampion

@abhibhatia98 1. When the rule is stopped. 2. Your source and sink are MQTT type, they may use the same client id.

ngjaying avatar Aug 07 '24 02:08 ngjaying

Hi,

  1. Even on stopping the rule client is not getting disconnected.
  2. Source is on MQTT while Sink is completely different. I tried with memory/log file.

Thanks

robodevchampion avatar Aug 07 '24 05:08 robodevchampion

@abhibhatia98 What version are you using? For 1.x, the stream will be disconnected once all referenced rules are stopped. Could you try to set another client id and check.

ngjaying avatar Aug 07 '24 09:08 ngjaying

Hi @ngjaying ,

I tried setting up another client id (completely random) as well, but still giving me same error, If I dont pass then only it works fine otherwise it gives me error?

I am running using latest docker image.

Thanks

robodevchampion avatar Aug 12 '24 06:08 robodevchampion

Hi @ngjaying ,

I tried setting up another client id (completely random) as well, but still giving me same error, If I dont pass then only it works fine otherwise it gives me error?

I am running using latest docker image.

Thanks

What error? Maybe you can export all your rules and check how many places the client id is referenced.

ngjaying avatar Aug 12 '24 07:08 ngjaying

Close as no response after a long time. Feel free to reopen if you still have problems.

ngjaying avatar Sep 18 '24 05:09 ngjaying