skycoin / skywire-services

0 stars 4 forks source link

transport setup-node cannot be shut down with `CTRL+C` #60

Open 0pcom opened 3 months ago

0pcom commented 3 months ago
$ skywire svc tps -l debug -c ~/tpsn-config.json
[2024-03-24T09:44:32.487508277-05:00] DEBUG disc.NewHTTP [transport_setup]: Created HTTP client. addr="http://dmsgd.skywire.skycoin.com"
2024/03/24 09:44:39 [node/IvyIVOrONz-000001] "GET http://127.0.0.1:8080/ HTTP/1.1" from 127.0.0.1:57868 - 404 19B in 70.802µs
2024/03/24 09:44:40 [node/IvyIVOrONz-000002] "GET http://127.0.0.1:8080/favicon.ico HTTP/1.1" from 127.0.0.1:57868 - 404 19B in 65.299µs
[2024-03-24T09:51:57.87766163-05:00] DEBUG [dmsg_client]: Dialing session... remote_pk=03d5b55d1133b26485c664cf8b95cff6746d1e321c34e48c9fed293eff0d6d49e5
[2024-03-24T09:51:58.825531986-05:00] DEBUG [dmsg_client]: Serving session. remote_pk=03d5b55d1133b26485c664cf8b95cff6746d1e321c34e48c9fed293eff0d6d49e5
[2024-03-24T09:51:59.332401813-05:00] ERROR [transport_setup]: RequestID="node/IvyIVOrONz-000003" error="remote connection closed (visor may not trust current pkey)" status="Internal Server Error"
2024/03/24 09:51:59 [node/IvyIVOrONz-000003] "GET http://127.0.0.1:8080/0323272a60895f56aad82cb767fb5c413807adcf7c9fb0578b1b1c5807c7f29d4c/transports HTTP/1.1" from 127.0.0.1:52964 - 500 72B in 2.165345841s
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C

image

0pcom commented 2 months ago

This may be related to the inclusion of the transport setup-node in the unified binary as it seems it does not happen when it's separately compiled.

as a temporary workaround, it can be invoked in the following way

skywire svc tps -l debug -c ~/tpsn-config.json || kill  -9 $(pgrep -f "skywire svc tps")

it will be killed on CTRL+Z

^Z[1]   Killed                  skywire svc tps -l debug -c ~/tpsn-config.json

[2]+  Stopped                 skywire svc tps -l debug -c ~/tpsn-config.json

image