AVSystem / Anjay

C implementation of the client-side OMA LwM2M protocol
Other
188 stars 68 forks source link

Anjay docker'ization with Leshan fails #41

Closed ehirdoy closed 2 years ago

ehirdoy commented 4 years ago

Hi, I tried to run Anjay with Leshan server in docker-compose environment. I succeeded to run Leshan server and Leshan client in docker-compose environment. Then I tried to replace Leshan client with Anjay in docker-compose environment. It failed with:

anjay_1 | 2020-04-01 11:52:26.609954 INFO [demo] [/Anjay/demo/demo.c:663]: ANJAY DEMO STARTUP FINISHED anjay_1 | 2020-04-01 11:52:26.610001 WARNING [fw_update] [/Anjay/modules/fw_update/src/fw_update.c:962]: Firmware Update Result change to 0 not allowed in State 0 anjay_1 | 2020-04-01 11:52:26.610089 TRACE [anjay] [/Anjay/src/anjay_core.c:177]: deleting anjay object anjay_1 | 2020-04-01 11:52:26.610108 TRACE [anjay] [/Anjay/src/servers/servers_internal.c:70]: cleaning up 0 servers anjay_1 | 2020-04-01 11:52:26.610137 DEBUG [avs_sched] [/Anjay/deps/avs_commons/sched/src/sched.c:224]: Scheduler "Anjay": shutting down anjay_1 | 2020-04-01 11:52:26.610148 DEBUG [avs_sched] [/Anjay/deps/avs_commons/sched/src/sched.c:241]: Scheduler "Anjay": shut down anjay_1 | 2020-04-01 11:52:26.610164 DEBUG [avs_sched] [/Anjay/deps/avs_commons/sched/src/sched.c:224]: Scheduler "eventlog": shutting down anjay_1 | 2020-04-01 11:52:26.610174 DEBUG [avs_sched] [/Anjay/deps/avs_commons/sched/src/sched.c:241]: Scheduler "eventlog": shut down leshandemo_anjay_1 exited with code 0

Is there any hint why this fails?

This is the change I did to introduce Anjay: https://github.com/ehirdoy/leshandemo/commit/b09a466d9b49ea4fc38fe6906c3cd202de2178f9

Here's console log: https://asciinema.org/a/7XNembCsXwBlNgk3U7wKD3OHb

Mierunski commented 3 years ago

Hello, Sorry for the late reply, it seems that the demo client is shutting down, because it expects stdin to be available. You can pass the -t flag which will disable stdin and make client run like a daemon. Which can be seen in repository you linked, so it probably means that you managed to solve the problem

Best regards,