# How to use component 3rdParty paho.mqtt.c

**URL:** <https://forum.legato.io/t/how-to-use-component-3rdparty-paho-mqtt-c/5612>\
**Category:** Legato Application Framework\
**Created:** [February 16, 2021, 1:59pm UTC](https://forum.legato.io/t/how-to-use-component-3rdparty-paho-mqtt-c/5612 "2021-02-16T13:59:04Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![anderson](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@anderson](https://forum.legato.io/u/anderson)\
**Post date:** [February 19, 2021, 1:49pm UTC](https://forum.legato.io/t/how-to-use-component-3rdparty-paho-mqtt-c/5612/19 "2021-02-19T13:49:49Z")

</div>

it worked very well with the local broker (192.168.2.3) but when trying to use a remote broker on the internet, I get the following error:

```
 URL: tcp://mqtt.dioty.co:1883
=========================================================
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | Trace Output
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | Product name: Eclipse Paho Synchronous MQTT C Client Library
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | Version: 1.3.0
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | Build level: ter 16 fev 2021 15:51:51 -03
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | OpenSSL version: OpenSSL 1.0.2p 14 Aug 2018
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | OpenSSL flags: compiler: arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security 
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | bug-types -Wall -Wa,--noexecstack
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | OpenSSL build timestamp: built on: reproducible build, date unspecified
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | OpenSSL platform: platform: linux-armv4
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | OpenSSL directory: OPENSSLDIR: "/usr/lib/ssl"
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | =========================================================
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | 20210219 134531.917 getaddrinfo failed for addr mqtt.dioty.co with rc -2
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | 20210219 134531.917 mqtt.dioty.co is not a valid IP address
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | 20210219 134531.917 getaddrinfo failed for addr mqtt.dioty.co with rc -2
Feb 19 10:45:31 fx30s user.info Legato: INFO | mqttClientService[4328] | 20210219 134531.917 mqtt.dioty.co is not a valid IP address
Feb 19 13:45:32 fx30s user.warn Legato: -WRN- | mqttClientService[4328]/mqttClientServiceComponent T=main | mqttClientServiceComponent.c mqtt_Connect() 361 | Socket error
Feb 19 13:45:32 fx30s user.err Legato: =ERR= | testPublisher[4523]/testPublisher T=main | testPublisher.c _testPublisher_COMPONENT_INIT() 138 | Connection failed! error -6

```

to access the mqtt broker on the internet should I do any additional configuration?

---

_[View the full topic](https://forum.legato.io/t/how-to-use-component-3rdparty-paho-mqtt-c/5612)._
