After Join Accept returns ctx_id=nil

Good day,

Thank you for creating great tool. However I having problem connecting end-node.
I have few devices that works properly. But there is some that hangs on in JoinRequest-JoinAccept loop. As I understand problem is in Application Server:

    level=info msg="device-keys updated" ctx_id="<nil>"

Here is more log:

    time="2020-01-03T06:23:05Z" level=info msg="backend/joinserver: request received" message_type=JoinReq receiver_id=a000000000000100 sender_id=000000 transaction_id=3557916121
    time="2020-01-03T06:23:05Z" level=info msg="device-keys updated" ctx_id="<nil>" dev_eui=a84041000181d581
    time="2020-01-03T06:23:05Z" level=info msg="backend/joinserver: sending response" message_type=JoinAns receiver_id=000000 result_code=Success sender_id=a000000000000100 transaction_id=3557916121
    time="2020-01-03T06:23:18Z" level=info msg="gateway updated" ctx_id=3f965767-c9c9-4357-b5b4-23e04b2833a0 id=008000000001635d name=multi-tech-01

I use Multi-Tech gateway. Also used ic880a with RPi 3.
My question is - How to track down where is the problem? I changed logging level to debug, but no luck with it. Then tried to look at source code in github, but could not figure out how code works (I am Java developer)

There are already a few OTAA related topics covering failed OTAA joins, see: https://forum.chirpstack.io/search?q=otaa%20debug.