Hi,
I am trying to connect with rabitmq broker, below are the parameter set in code,
#define MQTT_CONNECTION_FLAGS MQTTCLIENT_NETCONN_URL | MQTTCLIENT_NETCONN_SEC \ | MQTTCLIENT_NETCONN_SKIP_CERTIFICATE_CATALOG_VERIFICATION #define MQTT_CONNECTION_ADDRESS "rhelrmq.api-test.io" #define MQTT_CONNECTION_PORT_NUMBER 31678 char *MQTTClient_secureFiles[4] = { "devicekey.key", "device.crt", "ca.crt", NULL }; MQTTClient_ConnParams mqttConnParams = { //MQTT_CONNECTION_FLAGS, // connection flags MQTTCLIENT_NETCONN_URL | MQTTCLIENT_NETCONN_SEC, MQTT_CONNECTION_ADDRESS, // server address MQTT_CONNECTION_PORT_NUMBER, // port number of MQTT server SL_SO_SEC_METHOD_TLSV1_2, // method for secure socket SL_SEC_MASK_SECURE_DEFAULT, // cipher for secure socket 4, // number of files for secure connection MQTTClient_secureFiles // secure files }; . . . . . . . mqttClientHandle = MQTT_IF_Connect(mqttClientParams, mqttConnParams, MQTT_EventCallback); if (mqttClientHandle < 0) { while (1) ; }
I am getting the below connection error,
[GEN::ERROR] connect failed: -456<CR><LF>
<LF><CR>
[GEN::INFO] MQTT_EVENT_SERVER_DISCONNECT
I have tested same certificates with mqtt box application and all are working fine. Does anybody know how to resolve this error?