threefoldtecharchive / jumpscaleX_core

Apache License 2.0
1 stars 6 forks source link

Actors' response blocked until the interactive console is stimulated #759

Closed robvanmieghem closed 4 years ago

robvanmieghem commented 4 years ago

I deployed https://github.com/threefoldfoundation/tft-stellar/tree/master/ThreeBotPackages/unlock-service in a threebot in a local container( started with j.servers.threebot.start(), then executed the following request in a different shell:

 curl -v -H "Content-Type: application/json" -d '{ "args": { "unlockhash": "TBRWRROFJZ7XITHGYCNI2TMVGSATRAUE5LY2KPBV2RIAVMXUDMTA3APV","transaction_xdr":"AAAAAOZagjJNeF2pQReStULsfSDHk6WoYTloVY7NBq8AbbgsAAAAZAAMY10AAAADAAAAAQAAAABedOIYAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAABAG24LAAAAEDPghy9Oq3+WYK0wTYnj3gyFwYqRzkDxkBWLdQAG8ykZxY+CMLBpz4tW6/M+ctInZNdVu6dzrajSC4mrlBY5uoM"  }}' "http://localhost:7000/threefoldfoundation/unlock_service/create_unlockhash_transaction"
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 7000 (#0)
> POST /threefoldfoundation/unlock_service/create_unlockhash_transaction HTTP/1.1
> Host: localhost:7000
> User-Agent: curl/7.64.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 397
>
* upload completely sent off: 397 out of 397 bytes
< HTTP/1.1 200 OK
< Server: openresty/1.13.6.2
< Date: Thu, 23 Apr 2020 06:24:36 GMT
< Content-Type: application/json
< Content-Length: 394
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET, POST, PUT, OPTIONS, DELETE
< Access-Control-Allow-Headers: Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token
<

It was blocked until I went to the kosmos shell, presssed "Enter", then I immediately got the right response in the curl shell:

* Connection #0 to host localhost left intact
{"unlockhash": "TBRWRROFJZ7XITHGYCNI2TMVGSATRAUE5LY2KPBV2RIAVMXUDMTA3APV", "transaction_xdr": "AAAAAOZagjJNeF2pQReStULsfSDHk6WoYTloVY7NBq8AbbgsAAAAZAAMY10AAAADAAAAAQAAAABedOIYAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAABAG24LAAAAEDPghy9Oq3+WYK0wTYnj3gyFwYqRzkDxkBWLdQAG8ykZxY+CMLBpz4tW6/M+ctInZNdVu6dzrajSC4mrlBY5uoM", "id": 1}* Closing connection 0
robvanmieghem commented 4 years ago

from the chat: can you try passing with_shell=False kosmos -p 'j.servers.threebot.start(with_shell=False)'

robvanmieghem commented 4 years ago

using this and then from another kosmos: j.tools.threebot_packages.threefoldfoundation__unlock_service.start() did the trick

waleedhammam commented 4 years ago

can't reproduce now