You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/10/09 13:01:16 UTC

[GitHub] [apisix] whioue opened a new issue #5189: request help: use mqtt-proxy can't proxy request

whioue opened a new issue #5189:
URL: https://github.com/apache/apisix/issues/5189


   ### Issue description
   
   我使用mqtt-plugin测试转发请求失败。
   apisix version v2.6
   centos7
   
   apisix已经监听9100端口.
   
   bash-5.1# netstat -atp |grep 9100
   tcp 0 0 0.0.0.0:9100 0.0.0.0:* LISTEN 1/apisix -g daemon
   tcp 0 0 0.0.0.0:9100 0.0.0.0:* LISTEN 1/apisix -g daemon
   tcp 0 0 0.0.0.0:9100 0.0.0.0:* LISTEN 1/apisix -g daemon
   ...
   
   添加路由:
   
   curl http://192.168.32.149:9080/apisix/admin/stream_routes/00000000000000001420 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "remote_addr": "192.168.32.2",
       "server_port": 9100,
       "plugins": {
           "mqtt-proxy": {
               "protocol_name": "MQTT",
               "protocol_level": 4,
               "upstream": {
                   "host": "192.168.32.149",
                   "port": 1883
               }
           }
       }
   }'
   我使用golang写了一个发送mqtt请求的客户端,向apisix发送mqtt请求:
   ![image](https://user-images.githubusercontent.com/47098518/136658652-61ea682a-ac1d-44b0-a0c4-d9ef901543a0.png)
   启动后我看到apisix中日志有收到请求并打印日志:
   ![image](https://user-images.githubusercontent.com/47098518/136658681-01d311a3-fc09-4224-a294-a3414eb81635.png)
   但我的mqtt服务端并没有收到来自apisix的请求,我单独使用golang的客户端请求mqtt服务端是有正常响应的。请问哪里出了问题呢?
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #5189: request help: use mqtt-proxy can't proxy request

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5189:
URL: https://github.com/apache/apisix/issues/5189#issuecomment-939511536


   see: https://github.com/apache/apisix/blob/master/docs/zh/latest/plugins/mqtt-proxy.md#%E5%A6%82%E4%BD%95%E5%90%AF%E7%94%A8
   and https://github.com/apache/apisix/blob/621c7b819951749aecd08093f6301ca4f7f93eac/t/stream-plugin/mqtt-proxy.t#L174-L219


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] whioue commented on issue #5189: request help: use mqtt-proxy can't proxy request

Posted by GitBox <gi...@apache.org>.
whioue commented on issue #5189:
URL: https://github.com/apache/apisix/issues/5189#issuecomment-939698893


   > see: https://github.com/apache/apisix/blob/master/docs/zh/latest/plugins/mqtt-proxy.md#%E5%A6%82%E4%BD%95%E5%90%AF%E7%94%A8 and
   > 
   > https://github.com/apache/apisix/blob/621c7b819951749aecd08093f6301ca4f7f93eac/t/stream-plugin/mqtt-proxy.t#L174-L219
   找到了问题,可能我的客户端有些问题,谢谢
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] whioue commented on issue #5189: request help: use mqtt-proxy can't proxy request

Posted by GitBox <gi...@apache.org>.
whioue commented on issue #5189:
URL: https://github.com/apache/apisix/issues/5189#issuecomment-939477475


   > same as #5057?
   是apisix没有连上mqtt的服务端吗?或者能否提供详细示例代理mqtt请求,并获取响应


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on issue #5189: request help: use mqtt-proxy can't proxy request

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #5189:
URL: https://github.com/apache/apisix/issues/5189#issuecomment-939453204


   @whioue So what's the result when you request APISIX? Could you receive some data from it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] whioue commented on issue #5189: request help: use mqtt-proxy can't proxy request

Posted by GitBox <gi...@apache.org>.
whioue commented on issue #5189:
URL: https://github.com/apache/apisix/issues/5189#issuecomment-939647342


   > see: https://github.com/apache/apisix/blob/master/docs/zh/latest/plugins/mqtt-proxy.md#%E5%A6%82%E4%BD%95%E5%90%AF%E7%94%A8 and
   > 
   > https://github.com/apache/apisix/blob/621c7b819951749aecd08093f6301ca4f7f93eac/t/stream-plugin/mqtt-proxy.t#L174-L219
   我看过这个,这些是配置项,不知能否提供如何开启一个mqtt服务器,并如何通过客户端访问apisix,来验证apisix的mqtt请求代理。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] whioue commented on issue #5189: request help: use mqtt-proxy can't proxy request

Posted by GitBox <gi...@apache.org>.
whioue commented on issue #5189:
URL: https://github.com/apache/apisix/issues/5189#issuecomment-939473942


   > @whioue So what's the result when you request APISIX? Could you receive some data from it?
   我的客户端请求apisix后,我没有收到结果(如下图),我的mqtt服务端也没有收到来自apisix的请求。
   ![image](https://user-images.githubusercontent.com/47098518/136695663-38feb021-f75a-4f2a-8060-e687187c6ef8.png)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #5189: request help: use mqtt-proxy can't proxy request

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5189:
URL: https://github.com/apache/apisix/issues/5189#issuecomment-939475628


   same as https://github.com/apache/apisix/issues/5057?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] whioue closed issue #5189: request help: use mqtt-proxy can't proxy request

Posted by GitBox <gi...@apache.org>.
whioue closed issue #5189:
URL: https://github.com/apache/apisix/issues/5189


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] whioue removed a comment on issue #5189: request help: use mqtt-proxy can't proxy request

Posted by GitBox <gi...@apache.org>.
whioue removed a comment on issue #5189:
URL: https://github.com/apache/apisix/issues/5189#issuecomment-939647342


   > see: https://github.com/apache/apisix/blob/master/docs/zh/latest/plugins/mqtt-proxy.md#%E5%A6%82%E4%BD%95%E5%90%AF%E7%94%A8 and
   > 
   > https://github.com/apache/apisix/blob/621c7b819951749aecd08093f6301ca4f7f93eac/t/stream-plugin/mqtt-proxy.t#L174-L219
   我看过这个,这些是配置项,不知能否提供如何开启一个mqtt服务器,并如何通过客户端访问apisix,来验证apisix的mqtt请求代理。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org