# Runtime failure when client tries to connect to service

**URL:** <https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373>\
**Category:** mangOH Yellow\
**Created:** [May 2, 2020, 5:21am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373 "2020-05-02T05:21:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeongBeom27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@SeongBeom27](https://mangoh.discourse.group/u/SeongBeom27)\
**Post date:** [May 2, 2020, 5:21am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/1 "2020-05-02T05:21:35Z")

</div>

if i excute ~/legato\_framework/legato/apps/sample/gpioCf3Demo gpioCf3Demo application, I faced this error… (WP7702)

please help solve this problem!! and how can i excute sample gpio application , such as turn on LED. I have using IOT#0.

May 2 14:17:00 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[1560]/avcDaemon T=main | avcAppUpdate.c avcApp\_SetSwUpdateState() 3013 | No update is going on. CurrentObj9 = null  
May 2 14:17:00 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[1560]/avcDaemon T=main | avcAppUpdate.c avcApp\_SetSwUpdateResult() 2948 | No update is going on. CurrentObj9 = null  
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | avcDaemon[1560]/avcDaemon T=main | avcAppUpdate.c NotifyObj9List() 697 | Found 16 object 9 instances  
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | avcDaemon[1560]/avcDaemon T=main | avcAppUpdate.c NotifyObj9List() 698 | obj9ListLen; 216 obj9List: \</lwm2m/9/0\>,\</lwm2m/9/2\>,\</lwm2m/9/3\>,\</lwm2m/9/4\>,\</lwm2m/9/5\>,\</lwm2m/9/8\>,\</lwm2m/9/9\>,\</lwm2m/9/10\>,\</lwm2m/9/11\>,  
May 2 14:17:00 swi-mdm9x28-wp user.err Legato: =ERR= | serviceDirectory[1209]/serviceDirectory T=main | serviceDirectory.c DispatchToServer() 734 | Client (uid 1045 ‘appLED\_test’, pid 9948) disagrees with server (uid 0 ‘root’, pid 1644) on max message size (28 vs. 24) of se  
May 2 05:17:00 swi-mdm9x28-wp user.emerg Legato: _EMR_ | _UNKNOWN_[9948]/framework T=main | messagingSession.c ReceiveSessionOpenResponse() 699 | Unexpected server response: -6 (LE\_FAULT).  
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1134]/supervisor T=main | proc.c proc\_SigChildHandler() 2079 | Process ‘LED\_test’ (PID: 9948) has exited with exit code 1.  
May 2 14:17:00 swi-mdm9x28-wp user.warn Legato: -WRN- | supervisor[1134]/supervisor T=main | app.c app\_SigChildHandler() 4064 | Process ‘LED\_test’ in app ‘LED\_test’ faulted: Ignored.  
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1134]/supervisor T=main | app.c app\_StopComplete() 4751 | app ‘LED\_test’ has stopped.  
May 2 14:17:00 swi-mdm9x28-wp user.info Legato: INFO | supervisor[1134]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘LED\_test’ has stopped.  
May 2 14:17:02 swi-mdm9x28-wp user.err kernel: [4064.480644] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:2 tx:1) mode:FIFO slv\_addr:0x55 MSTR\_STS:0x091343c8 OPER:0x00000010  
May 2 14:17:02 swi-mdm9x28-wp user.err kernel: [4064.495462] i2c-msm-v2 78b8000.i2c: NACK: slave not responding, ensure its powered: msgs(n:2 cur:0 tx) bc(rx:2 tx:1) mode:FIFO slv\_addr:0x55 MSTR\_STS:0x091343c8 OPER:0x00000010  
^C

---

<div class="post-metadata">

**Author:** ![lotam](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@lotam](https://mangoh.discourse.group/u/lotam)\
**Post date:** [May 4, 2020, 3:13am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/2 "2020-05-04T03:13:46Z")

</div>

Hi SeongBeom27,  
Maybe Legato framework version and app version mis-match, are you building app with exact same framework version running on WP?  
Would you please share below to confirm?

> legato version  
> app info LED\_test

Thx

---

<div class="post-metadata">

**Author:** ![SeongBeom27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@SeongBeom27](https://mangoh.discourse.group/u/SeongBeom27)\
**Post date:** [May 8, 2020, 3:58am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/3 "2020-05-08T03:58:25Z")

</div>

hello lotam, thanks for your advice!!

After I check version, i will reply again

---

<div class="post-metadata">

**Author:** ![SeongBeom27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@SeongBeom27](https://mangoh.discourse.group/u/SeongBeom27)\
**Post date:** [May 8, 2020, 7:25am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/4 "2020-05-08T07:25:25Z")

</div>

If the app and regato framework have different versions, do you know how to make them the same?

When I update wp7702 firmware,

[http://mangoh.io/uploaded-documents/Reference/mangOH%20Yellow/Discover/Getting%20Started/41113347%20mangOH%20Yellow%20GSG%20-%20HTML5-Responsive%20HTML5/#t=41113347\_mangOH\_Yellow\_GSG\_-\_HTML5%2FInstall\_Leaf\_and\_MangOH\_Software%2FInstall\_Leaf\_and\_Build\_mangOH\_Software.hmtmtmt](http://mangoh.io/uploaded-documents/Reference/mangOH%20Yellow/Discover/Getting%20Started/41113347%20mangOH%20Yellow%20GSG%20-%20HTML5-Responsive%20HTML5/#t=41113347_mangOH_Yellow_GSG_-_HTML5%2FInstall_Leaf_and_MangOH_Software%2FInstall_Leaf_and_Build_mangOH_Software.hmtmtmt).

I have updated it through leaf install to the above site.  
( For your information, I don’t use Octave. )

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [May 8, 2020, 10:29pm UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/5 "2020-05-08T22:29:30Z")

</div>

@jchitty can you look at this? thx

---

<div class="post-metadata">

**Author:** ![SeongBeom27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@SeongBeom27](https://mangoh.discourse.group/u/SeongBeom27)\
**Post date:** [May 11, 2020, 2:33pm UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/6 "2020-05-11T14:33:59Z")

</div>

hello asyal,  
Which part should I look at?

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [May 11, 2020, 3:57pm UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/7 "2020-05-11T15:57:34Z")

</div>

I was asking @jchitty to help you on this.  
The way to solve this issue is to take the app, add it to your sdef and rebuild system.  
Did you do that?

---

<div class="post-metadata">

**Author:** ![jchitty](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jchitty/32/846_2.png) [@jchitty](https://mangoh.discourse.group/u/jchitty)\
**Post date:** [May 11, 2020, 5:47pm UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/8 "2020-05-11T17:47:12Z")

</div>

> [@SeongBeom27](#):
>
> May 2 14:17:00 swi-mdm9x28-wp user.err Legato: =ERR= | serviceDirectory[1209]/serviceDirectory T=main | serviceDirectory.c DispatchToServer() 734 | Client (uid 1045 ‘appLED\_test’, pid 9948) disagrees with server (uid 0 ‘root’, pid 1644) on max message size (28 vs. 24) of se

This indicates that you indeed have a mismatch between your client app and the server of some API that your client app is trying to use. This can happen if you build your app using `mkapp`. You should use `mksys` (or the mangOH Makefile, which uses `mksys`).

`mkapp` only builds a single app, so it cannot make sure that all the apps can work together. `mksys` builds all the apps and it can also make sure that all the apps have their required APIs connected to compatible servers.

After you run `mksys` (or `make yellow`), you will have a `.update` file that you can install on your device using the `update` command-line tool. This should resolve this problem for you.

–Jen

---

<div class="post-metadata">

**Author:** ![SeongBeom27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@SeongBeom27](https://mangoh.discourse.group/u/SeongBeom27)\
**Post date:** [May 12, 2020, 4:25am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/9 "2020-05-12T04:25:08Z")

</div>

mangoh@mangoh-vm:~/mangOH\_work$ mksys -t wp77xx yellow.sdef  
\*\* Warning: Ignoring empty app specification  
\*\* Warning: Ignoring empty app specification  
\*\* Warning: Ignoring empty app specification  
\*\* ERROR:  
/home/mangoh/mangOH\_work/apps/YellowSensorToCloud/components/fileUtils/Component.cdef:9:13: error: Unexpected subsection name ‘headerDir’ in ‘provides’ section.

if I command "mksys -t wp77xx yellow.sdef " and “make yellow\_wp77xx”  
In addition to this, many paths continue to cause these problems in .cdef files.

---

<div class="post-metadata">

**Author:** ![jchitty](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jchitty/32/846_2.png) [@jchitty](https://mangoh.discourse.group/u/jchitty)\
**Post date:** [May 12, 2020, 7:05pm UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/10 "2020-05-12T19:05:59Z")

</div>

You are using an old version of the mangOH source code. YellowSensorToCloud has been renamed YellowSensor 5 months ago. I also see that you are not using the leaf shell, which probably means that your shell environment is not configured correctly either.

There are some instructions for getting going with mangOH Yellow development on the mangOH wiki here: [https://github.com/mangOH/mangOH/wiki/Building-the-Legato-"system"-(apps)-for-mangOH-Yellow](https://github.com/mangOH/mangOH/wiki/Building-the-Legato-%22system%22-(apps)-for-mangOH-Yellow)

I hope this helps get you going.

–Jen

---

<div class="post-metadata">

**Author:** ![SeongBeom27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@SeongBeom27](https://mangoh.discourse.group/u/SeongBeom27)\
**Post date:** [May 16, 2020, 3:08am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/11 "2020-05-16T03:08:55Z")

</div>

hi jchitty,

I don’t use Octave. I think all the recent versions are versions that use Octave, right?

---

<div class="post-metadata">

**Author:** ![jchitty](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jchitty/32/846_2.png) [@jchitty](https://mangoh.discourse.group/u/jchitty)\
**Post date:** [May 19, 2020, 6:00pm UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/12 "2020-05-19T18:00:24Z")

</div>

Yes, by default the Octave apps are included in the latest releases for mangOH Yellow, but you don’t have to use them. Just set `OCTAVE=0` when you are building. For example,

```auto
make yellow OCTAVE=0

```

Or, you can set the variable in your leaf shell environment so that it is automatically set to 0 whenever you are in that particular leaf workspace. Do this with the `leaf env` command as follows:

```auto
leaf env workspace --set OCTAVE=0

```

(Look in `yellow.sdef` to see where that `OCTAVE` variable is checked.)

---

<div class="post-metadata">

**Author:** ![SeongBeom27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@SeongBeom27](https://mangoh.discourse.group/u/SeongBeom27)\
**Post date:** [May 24, 2020, 12:41pm UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/13 "2020-05-24T12:41:46Z")

</div>

Thanks jchitty. I sovled this problem. so, I use make yellow OCTAVE =0 , when I bulild system.

I’d like to ask you one thing…!!

Can I get a simple sample example, such as a lead output example or a switch example using a gpio pin, not a GPIO\_demo app inside the mangoh yellow.

---

<div class="post-metadata">

**Author:** ![jchitty](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jchitty/32/846_2.png) [@jchitty](https://mangoh.discourse.group/u/jchitty)\
**Post date:** [May 25, 2020, 7:03pm UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/14 "2020-05-25T19:03:44Z")

</div>

Hi,

I’m glad the build is working for you now.

Sorry, but I’m not sure what you are asking for in this new question. Also, it seems like a change in topic. Try starting a new topic with a very clearly defined request.

---

<div class="post-metadata">

**Author:** ![claudiobaldini](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@claudiobaldini](https://mangoh.discourse.group/u/claudiobaldini)\
**Post date:** [November 6, 2020, 6:08am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/15 "2020-11-06T06:08:01Z")

</div>

@jchitty I have a similar problem, but I am currently building using leaf shell and mksys command.  
Nov 6 14:00:51 fx30s user.err Legato: =ERR= | serviceDirectory[1221]/serviceDirectory T=main | serviceDirectory.c DispatchToServer() 713 | Client (uid 0 ‘root’, pid 1999) disagrees with server (uid 0 ‘root’, pid 1330) on protocol ID of service 'mqttClientAws.mqttCl

This is my system definition:  
#include “$LEGATO\_ROOT/default.sdef”

apps:  
{  
handleJSON.adef  
mqttClientAws.adef  
canReadout.adef  
}

appSearch:  
{  
$CURDIR/…/handleJSON  
$CURDIR/…/mqttClientAws  
$CURDIR/…/canReadout  
}

interfaceSearch:  
{  
$CURDIR/…/Interfaces  
}

moduleSearch:  
{  
$CURDIR/linux\_kernel\_modules/can\_common  
$CURDIR/linux\_kernel\_modules/can\_9x07  
}

kernelModules:  
{  
mcp251x.mdef  
can\_iot.mdef  
}

Where I have included the default.sdef so it should build all those packages with the currently set environment. This is the leaf env in my machine:

Workspace: /home/xxxxx/legatoWorkspace/legatoAF │  
╞═══════════════════════════════════════════════════════════════════════════════════════════╡  
│ Profile: FX30S2 [current] (sync) │  
├──────────┬─────────────────────┬──────────────────────────────────────────────────────────┤  
│ Packages │ Identifier │ Description │  
├──────────┼─────────────────────┼──────────────────────────────────────────────────────────┤  
│ Included │ swi-fx30-catm\_2.0.0 │ SDK for FX30-CATM (Release R11.0.0.007 + Legato 18.09.4) │  
└──────────┴─────────────────────┴──────────────────────────────────────────────────────────┘

And this is on my FX30S target device:  
18.09.4\_92d7161e103930183c97876ec59c9990\_modified

Also information about the app I am trying to use from my client app:  
modemService  
status: running  
running processes:  
modemDaemon[1330] (1330, 1459, 1468, 1471, 1475, 1477, 1478, 1480, 1488, 1489, 1492, 1495, 1498, 1509, 1560, 1565, 1567, 1696)  
rSimDaemon[1331] (1331)  
app.name: modemService  
app.md5: 2336e1f571c9b0ac792925dde8f8d610  
app.version:  
legato.version: 18.09.4

---

<div class="post-metadata">

**Author:** ![claudiobaldini](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@claudiobaldini](https://mangoh.discourse.group/u/claudiobaldini)\
**Post date:** [November 6, 2020, 6:48am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/16 "2020-11-06T06:48:30Z")

</div>

I can bind the mqttClientAws.mqttClientAwsComponent.le\_info -\> modemService.le\_info module but if I try to bind any of the following two modules I will get the error:  
mqttClientAws.mqttClientAwsComponent.le\_data -\> dataConnectionService.le\_data  
mqttClientAws.mqttClientAwsComponent.le\_mdc -\> modemService.le\_mdc

This is the adef for the app which is trying to use the modemService:  
start: auto  
sandboxed: false  
version: 5.0

executables:  
{  
mqttClientAws = ( mqttClientAwsComponent )  
}

processes:  
{  
run:  
{  
(mqttClientAws)  
}  
//faultAction: restart  
}

bindings:  
{  
mqttClientAws.mqttClientAwsComponent.le\_info -\> modemService.le\_info  
mqttClientAws.mqttClientAwsComponent.le\_data -\> dataConnectionService.le\_data  
mqttClientAws.mqttClientAwsComponent.le\_mdc -\> modemService.le\_mdc  
}

extern:  
{  
mqttClientAws = mqttClientAws.mqttClientAwsComponent.mqttClientAws  
}

I have also tried to re-clonethe legato-af github in case of any changes with the code for the new firmware, didn`t fix the issue.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [November 6, 2020, 9:57am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/17 "2020-11-06T09:57:55Z")

</div>

can you attach your sample app here?

---

<div class="post-metadata">

**Author:** ![jchitty](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jchitty/32/846_2.png) [@jchitty](https://mangoh.discourse.group/u/jchitty)\
**Post date:** [November 7, 2020, 1:51am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/18 "2020-11-07T01:51:44Z")

</div>

Hmm… This type of error should not be possible if both the client and the server apps are being built fresh as part of an mksys build.

Perhaps try doing a `make clean`. I wonder if there’s a dependency issue that’s resulting in something not getting rebuilt that should be rebuilt.

Is the modemService being provided to you as a pre-built `.app` file, perhaps? (Sorry, I’m not very familiar with the FX30 Legato distribution.)

The good news is, the mechanism for ensuring compatible interfaces is working. 😉 It may not feel good right now, but without that check, things would fail in potentially much more bizarre ways.

–Jen

---

<div class="post-metadata">

**Author:** ![claudiobaldini](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@claudiobaldini](https://mangoh.discourse.group/u/claudiobaldini)\
**Post date:** [November 9, 2020, 1:08am UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/19 "2020-11-09T01:08:22Z")

</div>

Yes, I prefer having this problem instead of the application crashing for unknown reasons, but I would also like this to get this to work… 🙂

This is the TestApp which I am using, reduced to the bone.  
[myTestSystem.sdef](https://mangoh.discourse.group/uploads/short-url/93zZLCuB8osKcQw28yhmhPESWJa.sdef) (99 Bytes)  
[TestApp.tar.xz](https://mangoh.discourse.group/uploads/short-url/fq8SL6wO5mm2vgOZuF2ZPbDbmZx.xz) (744 Bytes)

The modemService I believe is pre-built and installed with the firmware, I have removed the modemService from the target to avoid that the new built is not installed.  
The modemService app which is used by my system is the one from the github, I did clone again the whole repository to prevent that there was an update issue.

Where should I run the make clean command? Is this for the leaf environment or the system?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [November 9, 2020, 12:43pm UTC](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373/20 "2020-11-09T12:43:22Z")

</div>

I tried to compiled your TestApp with Developer Studio on Wp77 R9 package, I changed the component.cdef as follows:

* * *

requires:  
{  
api:  
{  
modemServices/le\_info.api  
modemServices/le\_mdc.api  
// $HOME/legatoWorkspace/legato-af/interfaces/modemServices/le\_info.api  
// $HOME/legatoWorkspace/legato-af/interfaces/le\_data.api  
// $HOME/legatoWorkspace/legato-af/interfaces/modemServices/le\_mdc.api  
}  
}

* * *

I can now compile the application.

[Next page](https://mangoh.discourse.group/t/runtime-failure-when-client-tries-to-connect-to-service/4373.md?page=2)
