0

we are using emqx (3.0). my emqx is running in 1883 port and it's getting data from devices with authentication(device authentication and topic authorization) in same port. I want to enable one more port for device un-authentication. That's why I enabled one more port for the same emqx. now emqx is running in two ports with same process id. I checked with netstat command it's showing same process id for both ports(1883 & xxxx). but through paho I am unanle to connect to emqx from xxxx port. it's showing connection lost error.

1883 port is working fine.

in dashboard also xxxx port is enabled.

but I'm unable to connect through paho.

Cœur
  • 37,241
  • 25
  • 195
  • 267
satish pujara
  • 219
  • 1
  • 11

1 Answers1

1

Multiple listeners with different configurations are supported by setting another zone in the emqx.conf. The default zones are external and internal:

listener.tcp.external = 0.0.0.0:1883
listener.tcp.external.acceptors = 8
listener.tcp.external.zone = external
...

listener.tcp.internal = 127.0.0.1:11883
listener.tcp.internal.acceptors = 4
listener.tcp.internal.zone = internal

You can add your own ones or just change the internal one as follows, if you don't need the internal zone:

listener.tcp.internal = 127.0.0.1:xxxx
listener.tcp.internal.acceptors = 8
listener.tcp.internal.zone = external
...

Shawn
  • 21
  • 2