-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
bug: no connection to MQTT broker possible by using mqtt_proxy #5802
Comments
Fix apache#5802 Signed-off-by: spacewander <spacewanderlzx@gmail.com>
@danielkocot please try #5816; thanks for your report 👍 |
Hi @moonming, for me that still isn't working. I don't see any traffic in the access.log. |
@spacewander please take a look, thanks |
The access.log is only for HTTP requests. Can |
I'm using the mqtt client but subscription doesn't work either. |
May I know if there have more error information that could help to debug? |
I tried Maybe you can provide the detailed commands & configuration so we can reproduce it? |
I used the mqtt client from HiveMQ. Now I used mosquito_pub with |
Interesting. Here is the result running on my machine:
My stream route conf is:
My config.yaml is:
My mosquitto_pub version is:
|
I use the stream route configuration from the documentation |
Hi Daniel, if this is the root cause, kindly let us know 😄 |
Hi, sorry for the delay. It works now. But using docker on MacOS the upstream host needs the value |
Glad to know your issue is resolved, if docs need to be updated, kindly submit a PR 😄 |
Issue description
By using the mqtt_proxy plugin it isn't possible to make up a connection to the mqtt broker, in this case mosquitto. All done with docker compose.
Environment
apisix version
): 2.11.0uname -a
): Darwin Kernel Version 20.6.0Steps to reproduce
Actual result
mqtt pub -t test -m "Hello" -h 127.0.0.1 -p 1883 creates a topic test with message Hello.
mqtt pub -t test -m "Hello" -h 127.0.0.1 -p 9100 does nothing the mqtt client is running into a timeout
Error log
2021/12/14 09:16:03 [warn] 46#46: 4 [lua] plugin.lua:172: load(): new plugins: {"zipkin":true,"openid-connect":true,"key-auth":true,"ip-restriction":true,"uri-blocker":true,"batch-requests":true,"fault-injection":true,"basic-auth":true,"request-validation":true,"grpc-transcode":true,"example-plugin":true,"kafka-logger":true,"ldap-auth":true,"wolf-rbac":true,"limit-req":true,"consumer-restriction":true,"limit-count":true,"tcp-logger":true,"serverless-post-function":true,"serverless-pre-function":true,"echo":true,"client-control":true,"ext-plugin-post-req":true,"sls-logger":true,"azure-functions":true,"udp-logger":true,"gzip":true,"syslog":true,"http-logger":true,"proxy-cache":true,"skywalking-logger":true,"api-breaker":true,"authz-casbin":true,"jwt-auth":true,"server-info":true,"traffic-split":true,"real-ip":true,"proxy-mirror":true,"response-rewrite":true,"limit-conn":true,"redirect":true,"cors":true,"ua-restriction":true,"datadog":true,"prometheus":true,"ext-plugin-pre-req":true,"authz-keycloak":true,"proxy-rewrite":true,"hmac-auth":true,"referer-restriction":true,"request-id":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 48#48: 3 [lua] plugin.lua:172: load(): new plugins: {"zipkin":true,"openid-connect":true,"key-auth":true,"ip-restriction":true,"uri-blocker":true,"batch-requests":true,"fault-injection":true,"basic-auth":true,"request-validation":true,"grpc-transcode":true,"example-plugin":true,"kafka-logger":true,"ldap-auth":true,"wolf-rbac":true,"limit-req":true,"consumer-restriction":true,"limit-count":true,"tcp-logger":true,"serverless-post-function":true,"serverless-pre-function":true,"echo":true,"client-control":true,"ext-plugin-post-req":true,"sls-logger":true,"azure-functions":true,"udp-logger":true,"gzip":true,"syslog":true,"http-logger":true,"proxy-cache":true,"skywalking-logger":true,"api-breaker":true,"authz-casbin":true,"jwt-auth":true,"server-info":true,"traffic-split":true,"real-ip":true,"proxy-mirror":true,"response-rewrite":true,"limit-conn":true,"redirect":true,"cors":true,"ua-restriction":true,"datadog":true,"prometheus":true,"ext-plugin-pre-req":true,"authz-keycloak":true,"proxy-rewrite":true,"hmac-auth":true,"referer-restriction":true,"request-id":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 49#49: 1 [lua] plugin.lua:172: load(): new plugins: {"zipkin":true,"openid-connect":true,"key-auth":true,"ip-restriction":true,"uri-blocker":true,"batch-requests":true,"fault-injection":true,"basic-auth":true,"request-validation":true,"grpc-transcode":true,"example-plugin":true,"kafka-logger":true,"ldap-auth":true,"wolf-rbac":true,"limit-req":true,"consumer-restriction":true,"limit-count":true,"tcp-logger":true,"serverless-post-function":true,"serverless-pre-function":true,"echo":true,"client-control":true,"ext-plugin-post-req":true,"sls-logger":true,"azure-functions":true,"udp-logger":true,"gzip":true,"syslog":true,"http-logger":true,"proxy-cache":true,"skywalking-logger":true,"api-breaker":true,"authz-casbin":true,"jwt-auth":true,"server-info":true,"traffic-split":true,"real-ip":true,"proxy-mirror":true,"response-rewrite":true,"limit-conn":true,"redirect":true,"cors":true,"ua-restriction":true,"datadog":true,"prometheus":true,"ext-plugin-pre-req":true,"authz-keycloak":true,"proxy-rewrite":true,"hmac-auth":true,"referer-restriction":true,"request-id":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 47#47: 2 [lua] plugin.lua:172: load(): new plugins: {"zipkin":true,"openid-connect":true,"key-auth":true,"ip-restriction":true,"uri-blocker":true,"batch-requests":true,"fault-injection":true,"basic-auth":true,"request-validation":true,"grpc-transcode":true,"example-plugin":true,"kafka-logger":true,"ldap-auth":true,"wolf-rbac":true,"limit-req":true,"consumer-restriction":true,"limit-count":true,"tcp-logger":true,"serverless-post-function":true,"serverless-pre-function":true,"echo":true,"client-control":true,"ext-plugin-post-req":true,"sls-logger":true,"azure-functions":true,"udp-logger":true,"gzip":true,"syslog":true,"http-logger":true,"proxy-cache":true,"skywalking-logger":true,"api-breaker":true,"authz-casbin":true,"jwt-auth":true,"server-info":true,"traffic-split":true,"real-ip":true,"proxy-mirror":true,"response-rewrite":true,"limit-conn":true,"redirect":true,"cors":true,"ua-restriction":true,"datadog":true,"prometheus":true,"ext-plugin-pre-req":true,"authz-keycloak":true,"proxy-rewrite":true,"hmac-auth":true,"referer-restriction":true,"request-id":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 52#52: 5 [lua] plugin.lua:172: load(): new plugins: {"zipkin":true,"openid-connect":true,"key-auth":true,"ip-restriction":true,"uri-blocker":true,"batch-requests":true,"fault-injection":true,"basic-auth":true,"request-validation":true,"grpc-transcode":true,"example-plugin":true,"kafka-logger":true,"ldap-auth":true,"wolf-rbac":true,"limit-req":true,"consumer-restriction":true,"limit-count":true,"tcp-logger":true,"serverless-post-function":true,"serverless-pre-function":true,"echo":true,"client-control":true,"ext-plugin-post-req":true,"sls-logger":true,"azure-functions":true,"udp-logger":true,"gzip":true,"syslog":true,"http-logger":true,"proxy-cache":true,"skywalking-logger":true,"api-breaker":true,"authz-casbin":true,"jwt-auth":true,"server-info":true,"traffic-split":true,"real-ip":true,"proxy-mirror":true,"response-rewrite":true,"limit-conn":true,"redirect":true,"cors":true,"ua-restriction":true,"datadog":true,"prometheus":true,"ext-plugin-pre-req":true,"authz-keycloak":true,"proxy-rewrite":true,"hmac-auth":true,"referer-restriction":true,"request-id":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 49#49: 1 [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 47#47: 2 [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 48#48: 3 [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 46#46: 4 [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 52#52: 5 [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 47#47: 6 stream [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 48#48: 7 stream [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 49#49: 8 stream [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 46#46: 9 stream [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
2021/12/14 09:16:03 [warn] 52#52: 10 stream [lua] plugin.lua:222: load_stream(): new plugins: {"ip-restriction":true,"mqtt-proxy":true,"limit-conn":true}, context: init_worker_by_lua
Expected result
The creation of the topic test with the message Hello
The text was updated successfully, but these errors were encountered: