mqtt-stresser icon indicating copy to clipboard operation
mqtt-stresser copied to clipboard

How to connect with TLS self signed certificates

Open taste66 opened this issue 1 year ago • 0 comments

I want to use the MQTT-Stresser to test a MQTT broker which only supports secure links and self signed certificates. I am using the docker but am not able to connect to the broker. Since it is a self signed certificate I added -skip-tls-verification Do I still have to provide a CA file wit this option. I tried too with the HiveMQ broker from the example with gave the exact same result I running on Ubuntu

sudo docker run --rm inovex/mqtt-stresser -broker tcp://broker.mqttdashboard.com:8883 -skip-tls-verification -num-clients 2 -num-messages 2 -rampup-delay 1s -rampup-size 10 -global-timeout 180s -timeout 20s

Error message: failed to unsubscribe: Not Connected failed to unsubscribe: Not Connected

btw if I do add a CA certificate with the -ca_file option I get, independent of which certificate file I use

panic: tls: failed to find any PEM data in certificate input

goroutine 12 [running]:
main.(*Worker).Run(0xc000066580, 0x77ee20, 0xc000046420)
	/go/src/github.com/inovex/mqtt-stresser/worker.go:131 +0x1b6d
created by main.main
	/go/src/github.com/inovex/mqtt-stresser/main.go:271 +0x910

taste66 avatar Jun 09 '23 06:06 taste66