Problem with mqtt sample app

I’m able to successfully build and deploy the mqtt sample publisher app. However, when I start mqttPublisher app, I get the error log below. It seems like something to do with permissions. Can someone kindly assist me with this.

Nov 25 21:41:07 swi-mdm9x28-wp user.notice kernel: [70729.320858] audit: type=1400 audit(1574714467.399:57): lsm=SMACK fn=smack_inode_getattr action=denied subject="app.mqttClient" object="admin" requested=r pid=5284 comm="mqttClientServi" path="pipe:[387489]" dev="pipefs" ino=                                                                                                                                                                                                    
Nov 25 20:41:07 swi-mdm9x28-wp user.warn Legato: -WRN- | mqttClientService[5284]/mqttClientService T=main | mqttClientService.c mqtt_Connect() 361 | Socket error                                                                            
Nov 25 20:41:07 swi-mdm9x28-wp user.err Legato: =ERR= | testPublisher[5453]/testPublisher T=main | testPublisher.c _testPublisher_COMPONENT_INIT() 137 | Connection failed! error -6                                                         
Nov 25 21:41:07 swi-mdm9x28-wp user.info Legato:  INFO | supervisor[5250]/supervisor T=main |

My environment is as follows:

Leaf: leaf version 2.1
Legato: wp76-legato_19.02.0-201903211732
Device: wp76xx, (Mangoh Red, wp7606)

@cnokello, how you built the mqtt app, please?

Any basic Mosquito MQTT sample available, am not able to add the <mosquito.h> header file triggering error.

how about this sample code?

how about this?