-
Notifications
You must be signed in to change notification settings - Fork 39
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
MQTT Notification raise "curl_easy_perform failed: Timeout was reached" #1178
Comments
Hi, thanks for reporting. |
So, finally got some time ... You should see something like this in the broker log:
And definitely not what you see - unless you have another matching subscription using "http" of course. So, can you tell me something else about your case? |
Hi @kzangeli thank you for your kind reply. In Orion there is only one subscription and only one entity, listed below:
In mongodb I have only one entity:
I was thinking, may that the problem come from the way I update the attribute? Another reason could be the way I am running Orion LD? Is the docker-compose in the first message complete? Maybe something is wrong or is missing? |
ok, I'll try that PATCH. Open to anything right now :) |
Here is also the complete subscription request:
I have launched Orion in DEBUG and here is the complete log when updating attribute:
|
ok, perfect |
So, I created a functional test, as close as I could to your "case". Take a look at the PR - it's just a functional test.
Finally the real outcome on stdout is compared to "the expected outcome" and if it's the same, then the test worked.
Now, look closely at the --SHELL-- section and propose changes to the test - see if we can make me able to reproduce the error you are seeing. Alternatively, modify your own stuff to be closer to my test file content and perhaps your error goes away. Good luck (to both of us :)) ! |
@kzangeli the functional test fit exactly my use case. I launched the following shell script inside orion container that should be the same as your functional test script:
All the 3 steps return response as expected, but the error is the same: orion is trying to send notification through http. Which version of Orion-LD are you using for your test? Are you passing some specific parameters? |
ok, that's a good test. |
Meanwhile, just to test ... |
FYI: |
After a lot of debugging we've finally found the reason of this error. MQTT notifications are implemented only for the case that the notificationMode is set to "threadpool". I will implement the MQTT notifications also for the transient/persistent notificationMode, but for now, you'll just have to start the broker with the threadpool turned on:
Note that you can set also the size of the queue and the number of threads with
Would give a queue size of 10 and 20 threads in the pool.
|
Hi everyone,
I'm trying to receive Orion LD notifications using mqtt protocol which instead work well with Orion v2.
The error is the following:
Orion is launched using a docker-compose together with an instance of mosquitto where mqtt notifications should be sent. Consider that the subscription using the json below is successfull.
docker-compose.yaml
json subscription request
The error seems to be raised on function httpRequestSendWithCurl in httpRequestSend.cpp (it's just a guess, no debugging has been done). Maybe the url is not recognized correctly as mqtt? Or something is wrong on the subscription request object?
Thank you!
The text was updated successfully, but these errors were encountered: