skycoin / skywire

Skywire Node implementation
73 stars 45 forks source link

'unused' transport entries deleted before they can be used #1774

Open 0pcom opened 3 months ago

0pcom commented 3 months ago

after running this in order to create transports to every visor with a proxy server on the latest version:

$ skywire-cli proxy list | while read _pk ; do skywire cli visor tp add $_pk ; done

I had a list of transports that I was going to use to test the proxy. However, I see that they started to be deleted automatically while they were not in use

[2024-03-16T08:38:25.692633087-05:00] DEBUG [transport_manager]: Deleted 1 unused transport entries
[2024-03-16T08:38:25.828714559-05:00] DEBUG [tp:035d70]: Error deleting transport error=<nil> tp-id=44050081-5b87-0e7c-8cc9-f75e154b67f4
[2024-03-16T08:47:55.469007734-05:00] DEBUG readPacket [tp:02d8c0]: Failed to read packet header. error="EOF"
[2024-03-16T08:47:55.469154479-05:00] WARN [tp:02d8c0]: Failed to read packet, closing transport error="EOF" src="read_loop"
[2024-03-16T08:47:55.469266558-05:00] DEBUG [tp:02d8c0]: Stopped log loop
[2024-03-16T08:47:55.469345611-05:00] DEBUG [tp:02d8c0]: Stopped serving. remaining_tps=302 remote_pk=02d8c0e781cc9199880c1dc817dd888492e719af395030f5d86430c24f8856e6bc tp_id=7bb87c86-139c-0af0-b575-d1448af34506 tp_index=135
[2024-03-16T08:47:55.692671237-05:00] DEBUG [transport_manager]: Deleted 1 unused transport entries
[2024-03-16T08:47:55.975865404-05:00] DEBUG [tp:02d8c0]: Error deleting transport error="404 Not Found: {"error":"transport not found"}" tp-id=7bb87c86-139c-0af0-b575-d1448af34506
[2024-03-16T08:50:58.295534477-05:00] DEBUG readPacket [tp:03a896]: Failed to read packet header. error="EOF"
[2024-03-16T08:50:58.29569484-05:00] WARN [tp:03a896]: Failed to read packet, closing transport error="EOF" src="read_loop"
[2024-03-16T08:50:58.295814726-05:00] DEBUG [tp:03a896]: Stopped log loop
[2024-03-16T08:50:58.295878012-05:00] DEBUG [tp:03a896]: Stopped serving. remaining_tps=301 remote_pk=03a896b23a6253b511fc8d8ec5a42c4a492dbfd13cc5e03500f35c326dceede731 tp_id=a8f602ce-5fe0-04db-9830-bc2fe0f8c5d6 tp_index=266
[2024-03-16T08:50:58.692805134-05:00] DEBUG [transport_manager]: Deleted 1 unused transport entries
[2024-03-16T08:50:58.786999121-05:00] DEBUG [tp:03a896]: Error deleting transport error="404 Not Found: {"error":"transport not found"}" tp-id=a8f602ce-5fe0-04db-9830-bc2fe0f8c5d6

This is not desirable behavior for user-created transports and there is no way to configure or disable this behavior, that I know of.

By their nature, transports are reusable; so they should persist until the visor is shut down unless we have some advanced option which allows configuring this behavior.