While using the mqtt() destination, you may encounter issues and corresponding error messages originating from the MQTT system. The following table contains the error messages you may encounter, the possible reasons behind them, and potential workaround methods.

Complete error message Possible reason(s) Possible solution(s)
"ERROR, while init threaded dest. ..." The syslog-ng OSE application will not start. You can try the following methods:
  • Restart syslog-ng OSE.
  • Stop some of the programs running on your computer.
  • Restart your computer, and then restart syslog-ng OSE.
"mqtt: the topic() argument is required for mqtt destinations. ..." The topic() option is not set in your configuration. The syslog-ng OSE application will not start. Set the missing topic() option in your configuration, then restart.
"The mqtt destination does not support the batching of messages, ..." Your configuration may contain the batch-timeout() and / or batch-lines() options, which are not supported by the mqtt() destination. The syslog-ng OSE application will not start. If your configuration contains the batch-timeout() and / or batch-lines() options, remove them from your configuration, and restart.
"Disconnected during publish! The syslog-ng OSE application can not send the message, because syslog-ng OSE disconnected from the broker. By default, syslog-ng OSE attempts to reconnect to the broker and send the messages 3 times. If syslog-ng OSE fails all 3 attempts to reconnect to the broker and send the messages, you can try checking your configuration or restarting your MQTT system with syslog-ng OSE as a client.
"Max message inflight! (publish)" The syslog-ng OSE application can not send the message due to the max message inflight broker response code (which signals that the broker has received too many messages, and it needs more time to process them). The syslog-ng OSE application will attempt to resend the message. Wait until the broker can process the in-flight messages and syslog-ng OSE can attempt to resend the message.
"Failure during publishing!" The syslog-ng OSE application can not send the message due to the failure broker response code. The syslog-ng OSE application will attempt to resend the message. N/A
"Error during publish!" The syslog-ng OSE application can not send the message, and drops it. Possible reason: bad\_utf8\_string (topic), NULL parameter. That is, the most probable reasons behind this issue are either that the topic name in your configuration is not correct, or that the message field is empty. You can try the following methods:
  • Modify the name of the topic() option in your configuration.
  • Make sure that the message field is not empty.
"Disconnected while waiting the response!" The syslog-ng OSE application has sent the message, but the client disconnected from the broker before syslog-ng OSE received the response. The syslog-ng OSE application will attempt to reconnect, or to resend the message. The syslog-ng OSE application will attempt to reconnect to the broker and send the in-flight message. If the reconnect attempt fails, syslog-ng OSE will resend the message.
"Error while waiting the response!" The syslog-ng OSE application can not get any response from the broker, due to the failure broker response code. The syslog-ng OSE will attempt to resend the message. In this case, you will receive a further error message, depending on what the problem is. Wait for the second error message for more information about how you can proceed.
"Error constructing topic ..." Due to an issue with the configured topic template, the mqtt() destination will use the fallback-topic() option instead. N/A
"mqtt dest: topic name is illegal, it can't be empty" This error message is related to the \"Error constructing topic \...\" error message. In this case, the topic template returns a 0 length string. As a result, the mqtt() destination will use the fallback-topic() option instead. N/A
"Error connecting mqtt client ..." The syslog-ng OSE application can not connect to broker, and it will attempt to reconnect later. **If the issue persists, you can try the following: Update your eclipse-paho-mqtt-c library.Restart syslog-ng OSE.**
"Error creat mqtt client ..." The syslog-ng OSE application encountered an error while creating the MQTT client, and it will attempt to create it later. Possible reasons:
  • There is a wrong address() set in your configuration.
  • The broker is not running.
**You can try the following methods: Check the address() option in your configuration, and modify if necessary.Check if the specified broker is running by connecting to it manually, and then sending the broker a message.**

Updated: