-
Notifications
You must be signed in to change notification settings - Fork 36
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
Publish via dashboard REST-API fails #80
Comments
Thanks for your feedback, we'll check it. |
Hi, @marvinkruse , it is not the bug of emqx rest api. We have adopted new strategy for rest api usage. You could refer this document. First, you have to create new app by using dashboard, then use the : as the basic authentication fields. |
Thanks @gilbert-wong , I created an app in the dashboard and I am able to use the API with these credentials (like before, nothing changed). But publishes are still producing the same error. Publish to The log of the broker shows:
|
Hi, @marvinkruse , I cannot reproduce your problem, Which version of emqx-rel did you use ? I tested with emqx3.0-rc.5,there is no such problems. Please update the whole project to emqx3.0-rc.5 and try again. |
Thanks @gilbert-wong , I was using the latest commit, now I tried to build emqx3.0-rc.5 but it always fails. The error below occurs all the time.
|
When using the pre-built binaries from http://emqtt.io/downloads it doesn't work as well. I'm sending the following curl (which worked in previous versions of emqx):
The same error occurs:
|
I also found a similar problem. |
Thanks for you feedback, I would check it. |
Hi, @marvinkruse , Sorry for late response. I'm not familiar with curl, I try with insomnia, and there is no such problem. Maybe you misuse the curl. I could not reproduce your problem. |
Hi @gilbert-wong, I am also facing this problem when i try with fiddler. When i disable emqx_web_hook (on_message_publish), the HTTP REST API (api/v3/mqtt/publish) is OK Kindly help. Thanks |
Hi @gilbert-wong, sorry for the late response. I didn't only try with curl, I also used other ways (other tools, various machines with a different OS, etc.) to verify this behavior. I will try with insomnia and report back, but I doubt that this will solve it. As you can see others are also facing the same issue. |
I also found a similar problem with version 3.0.0 of the docker pre-built binaries from http://emqtt.io/downloads. |
Sorry for the late response @gilbert-wong, I tried with Insomnia and the latest emqx release 3.0 now again. Same error when the web_hook plugin is enabled.
|
Is there any update on this? It seems that this is still not fixed? |
With the latest version (commit de344f1) of this plugin the from_client_id is now correctly set when receiving a publish message via the web hook (see #75). But after upgrading the web hook plugin to the latest version I wasn't able to publish via the dashboards HTTP API anymore. Publishes via web socket/regular clients work for me, but publishing over the dashboard HTTP API produces the following error:
Publish to
127.0.0.1:18083/api/v3/mqtt/publish
with valid basic authentication (admin:public) sending JSON:"{"topic": "testtopic", "payload": "hello", "qos": 1, "retain": true, "client_id":"mqttjs_ab9069449e"}
returns anInternal Error
The log of the broker shows:
Any idea why this doesn't work anymore?
The text was updated successfully, but these errors were encountered: