Machinebeat MQTT module: SSL connection to broker fails

Hi,

I'm trying out the MQTT module of the machinebeat beta after reading about it here: [https://www.elastic.co/blog/industrial-internet-of-things-iiot-with-the-elastic-stack] and I'm having a problem connecting to an MQTT broker using SSL (port 8883). I have specified the cert file paths (.pem format) in the module config, and I can use the same files to connect successfully to the broker using nodejs (node-red) and other MQTT clients.

In the machinebeat logs I get:

2019-11-04T23:33:20.933+1300 INFO instance/beat.go:416 machinebeat start running.
2019-11-04T23:33:20.933+1300 INFO [monitoring] log/log.go:117 Starting metrics logging every 30s
2019-11-04T23:33:20.933+1300 DEBUG [service] service/service_windows.go:72 Windows is interactive: true
2019-11-04T23:33:20.934+1300 DEBUG [cfgfile] cfgfile/reload.go:123 Checking module configs from: c:\elk\machinebeat/modules.d/*.yml
2019-11-04T23:33:20.937+1300 DEBUG [cfgfile] cfgfile/cfgfile.go:175 Load config from file: c:\elk\machinebeat\modules.d\mqtt.yml
2019-11-04T23:33:20.937+1300 DEBUG [cfgfile] cfgfile/reload.go:137 Number of module configs found: 1
2019-11-04T23:33:20.938+1300 WARN [cfgwarn] topic/mqtt.go:55 BETA: The MQTT metricset is beta.
2019-11-04T23:33:20.938+1300 INFO topic/client.go:72 [MQTT] Connect to broker URL: localhost:8883
2019-11-04T23:33:20.938+1300 INFO topic/client.go:85 [MQTT] Broker username: test
2019-11-04T23:33:20.939+1300 INFO topic/client.go:94 [MQTT] Configure session to use SSL
2019-11-04T23:33:20.942+1300 INFO topic/client.go:33 [MQTT] Set the CA
2019-11-04T23:33:20.943+1300 INFO topic/client.go:56 [MQTT] Set the Certs
2019-11-04T23:33:20.950+1300 INFO topic/client.go:107 Failed to connect to broker, waiting 5 seconds and retrying

In the MQTT broker (mosquitto) logs I get:

1572863269: OpenSSL Error: error:140260FC:SSL routines:ACCEPT_SR_CLNT_HELLO:unknown protocol
1572863269: Socket error on client , disconnecting.

Anyone have any ideas on how I can troubleshoot this issue in more depth?

Thanks,
gmackers

Hi gmackers,

lets handle that in the github issue you have opened: https://github.com/elastic/Machinebeat/issues/4

Best regards
Felix

This topic was automatically closed after 28 days. New replies are no longer allowed.