stream_proxy:
only: false
tcp:
- 9100
{
"plugins": {
"mqtt-proxy": {
"protocol_name": "MQTT",
"protocol_level": 5,
"upstream": {
"host": "broker-cn.emqx.io",
"port": 1883,
"weight": 1
}
}
}
}
mqtt pub -h 127.0.0.1 -p 9100 -t "MQTT Examples" -m "a msg" -i "clintxxx-001" -d
respone is:
PUBLISH: Server closed connection without DISCONNECT
mqtt pub -h broker-cn.emqx.io -p 1883 -t "MQTT Examples" -m "a msg" -i "clint-111" -d
resp is:
CLIENT clint-111: sending CONNECT
CLIENT clint-111: received CONNACK SUCCESS
CLIENT clint-111: sending PUBLISH: (Topic: MQTT Examples, QoS AT_MOST_ONCE, Message: 'a msg')
CLIENT clint-111: acknowledged PUBLISH: 'a msg' for PUBLISH to Topic: MQTT Examples
021/12/24 10:58:51 [warn] 6727#6727: *10443643 stream [lua] mqtt-proxy.lua:123: phase_func(): plugin rewrite phase, conf: {"upstream":{"weight":1,"host":"broker-cn.emqx.io","port":1883},"protocol_name":"MQTT","protocol_level":5} while prereading client data, client: 100.127.12.66, server: 0.0.0.0:9100
2021/12/24 10:58:52 [warn] 6728#6728: *10443750 stream [lua] mqtt-proxy.lua:123: phase_func(): plugin rewrite phase, conf: {"upstream":{"weight":1,"host":"broker-cn.emqx.io","port":1883},"protocol_name":"MQTT","protocol_level":5} while prereading client data, client: 100.127.13.3, server: 0.0.0.0:9100
2021/12/24 10:58:53 [warn] 6727#6727: *10443801 stream [lua] mqtt-proxy.lua:123: phase_func(): plugin rewrite phase, conf: {"upstream":{"weight":1,"host":"broker-cn.emqx.io","port":1883},"protocol_name":"MQTT","protocol_level":5} while prereading client data, client: 100.127.12.66, server: 0.0.0.0:9100
2021/12/24 10:58:55 [warn] 6728#6728: *10443941 stream [lua] mqtt-proxy.lua:123: phase_func(): plugin rewrite phase, conf: {"upstream":{"weight":1,"host":"broker-cn.emqx.io","port":1883},"protocol_name":"MQTT","protocol_level":5} while prereading client data, client: 100.127.12.66, server: 0.0.0.0:9100
2021/12/24 10:58:56 [warn] 6728#6728: *10444049 stream [lua] mqtt-proxy.lua:123: phase_func(): plugin rewrite phase, conf: {"upstream":{"weight":1,"host":"broker-cn.emqx.io","port":1883},"protocol_name":"MQTT","protocol_level":5} while prereading client data, client: 100.127.13.3, server: 0.0.0.0:9100
2021/12/24 10:58:59 [warn] 6729#6729: *10444240 stream [lua] mqtt-proxy.lua:123: phase_func(): plugin rewrite phase, conf: {"upstream":{"weight":1,"host":"broker-cn.emqx.io","port":1883},"protocol_name":"MQTT","protocol_level":5} while prereading client data, client: 100.127.12.66, server: 0.0.0.0:9100
2021/12/24 10:59:00 [warn] 6728#6728: *10444340 stream [lua] mqtt-proxy.lua:123: phase_func(): plugin rewrite phase, conf: {"upstream":{"weight":1,"host":"broker-cn.emqx.io","port":1883},"protocol_name":"MQTT","protocol_level":5} while prereading client data, client: 100.127.13.3, server: 0.0.0.0:9100
2021/12/24 10:59:01 [warn] 6729#6729: *10444382 stream [lua] mqtt-proxy.lua:123: phase_func(): plugin rewrite phase, conf: {"upstream":{"weight":1,"host":"broker-cn.emqx.io","port":1883},"protocol_name":"MQTT","protocol_level":5} while prereading client data, client: 100.127.12.66, server: 0.0.0.0:9100
...
Issue description
my apixis verison is: 2.11.0
my os version is : CentOS Linux release 8.1.1911 (Core)
I have turned on the stream_proxy function,as follow:
mqtt-proxy plugin config as follow:
But we access the mqtt proxy service and report an error,our access script as follow:
but My direct visit without apisix can be successful
and the error log as follow, These warn logs are output every second
when i delete the mqtt-proxy config ,the warn log in
error.logstopEnvironment
apisix version): 2.11.0uname -a): CentOS Linux release 8.1.1911 (Core) x86_64 x86_64 x86_64 GNU/Linuxnginx -Voropenresty -V): nginx version: openresty/1.19.9.1curl http://127.0.0.1:9090/v1/server_infoto get the info from server-info API): 3.5.0luarocks --version):