Connection between Kepserver (Kepware) and Hive MQ

Hello everybody,

since a long time, i am trying to bring up a mqtt secure-connection between a KEPServer EX6 an the HiveMQ Cloud, but i get always the message ‘TCP/TLS connect failure’ and i don’t kno why.

TLS/SSL is active, Port is 8883, Firewall is down. I trieded to generate a certifacte and imported that, with any results.
A connection to the public hive, without secure, works.

Perhaps someone has experience with this software.

Hi Carsten,

and welcome to our HiveMQ community! In case if you are using MQTT CLI client, you can connect to your HiveMQ Cloud cluster like this:

mqtt sub -i subscriber -t "#" -s -h 18b93f452b8445ba86ac0ec6d2228eb9.s2.eu.hivemq.cloud -p 8883 -u HiveUser1 -pw HiveUser1 -J -d
mqtt pub -i publisher -t "interesting/topic" -m "hello" -s -h 18b93f452b8445ba86ac0ec6d2228eb9.s2.eu.hivemq.cloud -p 8883 -u HiveUser1 -pw HiveUser1

The -s or --secure flag indicates to use TLS, the -u user and -pw password are needed to authorise the client to your cluster.

In case if your client device requires a server certificate, you can get one with openssl s_client tool as described in our FAQ here: Frequently Asked Questions

I hope this helps, if you are further questions please let me know.

Kind regards,
Dasha from HiveMQ Team

Hi Carsten

I have installed a KEPserver and for me it works using the following settings:

  1. URL: ssl://18b93f452b8445ba86ac0ec6d2228eb9.s2.eu.hivemq.cloud:8883
  2. Username, password == my cluster user&pass

image

Using Java version 1.8. TLS versions supported by the Java: TLS1.2 and TLS1.3.

Please check if your settings are different and send us a screenshot.

Thanks,
Dasha from HiveMQ Team

Hello Daria,

i have tried your suggestions, without success.
I always get this fault message:

Datum Zeit Ebene Quelle Ereignis
08.02.2022 09:47:27 Warnung MQTT Client Fehler bei Verbindungsherstellung zum MQTT-Server. | Kanal = ‘MQTT’, Server = ‘ssl://969334f7758940b68647532c8b86c46a.s1.eu.hivemq.cloud:8883’, Grund = ‘TCP/TLS connect failure’.

Thanks for your help,

Kind regards
Carsten

Good evening,

after many attempts, i came to the conclusion that you have to use the IoT-Gateway-Function.
Looks like the Connectivity-Function only works with a local mqtt-broker.

Greetings

Carsten

Hi fun surfer,

You are correct: this is about the IoT-Gateway driver.

Regards,
Dasha from HiveMQ Team