mosquittolibmosquitto

mosquitto denied access by tcpd


I used mosquitto as MQTT broker, and it seems if connection number is more than 1000, the below log printed. Anybody know something about this?

1470896904: Client connection from 111.7.170.177 denied access by tcpd.


Solution

  • I feel your process(mosquitto) have hit the maximum number of open file descriptors limit. Check your max open files by ulimit -n. Then increase the limit to max number of connections expected by you. E.g. For 10k connection it would be ulimit -n 10000

    A note on ulimit(1). It is only set for the current terminal and for persistent changes you will need to edit config files as per your Linux flavor( /etc/security/limits.conf + /etc/pam.d/common-session* on Ubuntu ).