Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endpoints fail to reconnect after wifi reconnection #706

Open
snyderra opened this issue Mar 2, 2022 · 3 comments
Open

endpoints fail to reconnect after wifi reconnection #706

snyderra opened this issue Mar 2, 2022 · 3 comments

Comments

@snyderra
Copy link

snyderra commented Mar 2, 2022

Using ZYRE on android phones with the latest build from the releases. Its working great except after the wifi connection drops and reconnects. It seems that the remote connection does not know that the connection was lost??? also worth noting, the name of the node is lost. It was set to the last four of the device serial. Any help or workarounds appreciated. Would zmq heartbeats help? Not quite sure how to enable and test. Any help or workarounds appreciated.

PHONE 1 Log (this one lost wifi for ~5 seconds)

zbeacon: failed to transmit, attempting reconnection. reason=invalid socket
03-02 17:54:18.551 18686 19027 D zsys : zbeacon: failed to transmit, attempting reconnection. reason=invalid socket
03-02 17:54:19.563 18686 19027 D zsys : zbeacon: failed to transmit, attempting reconnection. reason=invalid socket
03-02 17:54:20.565 18686 19027 D zsys : zbeacon: failed to transmit, attempting reconnection. reason=invalid socket
03-02 17:54:20.565 18686 19027 I zsys : zbeacon: interface=wlan0 address=10.9.8.122 broadcast=10.9.8.255
03-02 17:54:20.566 18686 19027 I zsys : zbeacon: configured, hostname=10.9.8.122
03-02 17:54:21.125 18686 19026 I zsys : (N42B) connect to peer: endpoint=tcp://10.9.8.127:49152
03-02 17:54:21.125 18686 19026 I zsys : (N42B) send HELLO to peer=- sequence=1
03-02 17:54:27.032 18686 19026 I zsys : (N42B) peer does not send messages (evasive) name= endpoint=tcp://10.9.8.127:49152
03-02 17:54:27.032 18686 19026 I zsys : (N42B) send PING to peer=- sequence=2
03-02 17:54:27.033 18686 19011 I zsys : zyre_event:
03-02 17:54:27.033 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:27.033 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:27.033 18686 19011 I zsys : zyre_event:
03-02 17:54:27.033 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:27.033 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:28.033 18686 19026 I zsys : (N42B) peer does not send messages (evasive) name= endpoint=tcp://10.9.8.127:49152
03-02 17:54:28.033 18686 19026 I zsys : (N42B) send PING to peer=- sequence=3
03-02 17:54:28.034 18686 19026 I zsys : (N42B) peer '' has not answered ping after 1000 milliseconds (silent)
03-02 17:54:28.034 18686 19011 I zsys : zyre_event:
03-02 17:54:28.034 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:28.034 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:28.034 18686 19011 I zsys : zyre_event:
03-02 17:54:28.034 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:28.034 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:28.034 18686 19011 I zsys : zyre_event:
03-02 17:54:28.034 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:28.034 18686 19011 I zsys : - type=SILENT
03-02 17:54:28.034 18686 19011 I zsys : zyre_event:
03-02 17:54:28.034 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:28.035 18686 19011 I zsys : - type=SILENT
03-02 17:54:29.034 18686 19026 I zsys : (N42B) peer does not send messages (evasive) name= endpoint=tcp://10.9.8.127:49152
03-02 17:54:29.035 18686 19026 I zsys : (N42B) send PING to peer=- sequence=4
03-02 17:54:29.035 18686 19026 I zsys : (N42B) peer '' has not answered ping after 1000 milliseconds (silent)
03-02 17:54:29.035 18686 19011 I zsys : zyre_event:
03-02 17:54:29.035 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:29.035 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:29.035 18686 19011 I zsys : zyre_event:
03-02 17:54:29.035 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:29.035 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:29.035 18686 19011 I zsys : zyre_event:
03-02 17:54:29.035 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:29.035 18686 19011 I zsys : - type=SILENT
03-02 17:54:29.035 18686 19011 I zsys : zyre_event:
03-02 17:54:29.036 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:29.036 18686 19011 I zsys : - type=SILENT
03-02 17:54:30.035 18686 19026 I zsys : (N42B) peer does not send messages (evasive) name= endpoint=tcp://10.9.8.127:49152
03-02 17:54:30.035 18686 19026 I zsys : (N42B) send PING to peer=- sequence=5
03-02 17:54:30.035 18686 19026 I zsys : (N42B) peer '' has not answered ping after 1000 milliseconds (silent)
03-02 17:54:30.035 18686 19011 I zsys : zyre_event:
03-02 17:54:30.035 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:30.035 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:30.035 18686 19011 I zsys : zyre_event:
03-02 17:54:30.035 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:30.035 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:30.035 18686 19011 I zsys : zyre_event:
03-02 17:54:30.035 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:30.036 18686 19011 I zsys : - type=SILENT
03-02 17:54:30.036 18686 19011 I zsys : zyre_event:
03-02 17:54:30.036 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:30.036 18686 19011 I zsys : - type=SILENT
03-02 17:54:31.035 18686 19026 I zsys : (N42B) peer does not send messages (evasive) name= endpoint=tcp://10.9.8.127:49152
03-02 17:54:31.036 18686 19026 I zsys : (N42B) send PING to peer=- sequence=6
03-02 17:54:31.036 18686 19026 I zsys : (N42B) peer '' has not answered ping after 1000 milliseconds (silent)
03-02 17:54:31.036 18686 19011 I zsys : zyre_event:
03-02 17:54:31.036 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:31.036 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:31.036 18686 19011 I zsys : zyre_event:
03-02 17:54:31.037 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:31.037 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:31.037 18686 19011 I zsys : zyre_event:
03-02 17:54:31.037 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:31.037 18686 19011 I zsys : - type=SILENT
03-02 17:54:31.037 18686 19011 I zsys : zyre_event:
03-02 17:54:31.037 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:31.037 18686 19011 I zsys : - type=SILENT
03-02 17:54:32.036 18686 19026 I zsys : (N42B) peer does not send messages (evasive) name= endpoint=tcp://10.9.8.127:49152
03-02 17:54:32.037 18686 19026 I zsys : (N42B) send PING to peer=- sequence=7
03-02 17:54:32.037 18686 19026 I zsys : (N42B) peer '' has not answered ping after 1000 milliseconds (silent)
03-02 17:54:32.037 18686 19011 I zsys : zyre_event:
03-02 17:54:32.037 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:32.037 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:32.037 18686 19011 I zsys : zyre_event:
03-02 17:54:32.037 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:32.037 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:32.038 18686 19011 I zsys : zyre_event:
03-02 17:54:32.038 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:32.038 18686 19011 I zsys : - type=SILENT
03-02 17:54:32.038 18686 19011 I zsys : zyre_event:
03-02 17:54:32.038 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:32.038 18686 19011 I zsys : - type=SILENT
03-02 17:54:33.037 18686 19026 I zsys : (N42B) peer does not send messages (evasive) name= endpoint=tcp://10.9.8.127:49152
03-02 17:54:33.037 18686 19026 I zsys : (N42B) send PING to peer=- sequence=8
03-02 17:54:33.038 18686 19026 I zsys : (N42B) peer '' has not answered ping after 1000 milliseconds (silent)
03-02 17:54:33.040 18686 19011 I zsys : zyre_event:
03-02 17:54:33.040 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:33.040 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:33.040 18686 19011 I zsys : zyre_event:
03-02 17:54:33.040 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:33.040 18686 19011 I zsys : - type=EVASIVE
03-02 17:54:33.041 18686 19011 I zsys : zyre_event:
03-02 17:54:33.041 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:33.041 18686 19011 I zsys : - type=SILENT
03-02 17:54:33.041 18686 19011 I zsys : zyre_event:
03-02 17:54:33.041 18686 19011 I zsys : - from name= uuid=577D94087B82870C6B04C71AB95361D2
03-02 17:54:33.041 18686 19011 I zsys : - type=SILENT

PHONE 2 Log

03-02 17:54:26.405 32503 4106 I zsys : (YK7R) peer does not send messages (evasive) name=N42B endpoint=tcp://10.9.8.122:49152
03-02 17:54:26.405 32503 4106 I zsys : (YK7R) send PING to peer=N42B sequence=2
03-02 17:54:26.405 32503 4105 I zsys : zyre_event:
03-02 17:54:26.406 32503 4105 I zsys : - from name=N42B uuid=97B49BCFFD337455082C93B2A4F71099
03-02 17:54:26.406 32503 4105 I zsys : - type=EVASIVE
03-02 17:54:26.406 32503 4105 I zsys : zyre_event:
03-02 17:54:26.406 32503 4105 I zsys : - from name=N42B uuid=97B49BCFFD337455082C93B2A4F71099
03-02 17:54:26.406 32503 4105 I zsys : - type=EVASIVE
03-02 17:54:26.984 32503 4106 I zsys : (YK7R) recv PING from peer=N42B sequence=2
03-02 17:54:26.984 32503 4106 I zsys : (YK7R) send PING_OK to peer=N42B sequence=3
03-02 17:54:27.985 32503 4106 I zsys : (YK7R) recv PING from peer=N42B sequence=3
03-02 17:54:27.986 32503 4106 I zsys : (YK7R) send PING_OK to peer=N42B sequence=4
03-02 17:54:29.756 32503 4106 I zsys : (YK7R) recv PING from peer=N42B sequence=4
03-02 17:54:29.756 32503 4106 I zsys : (YK7R) send PING_OK to peer=N42B sequence=5
03-02 17:54:30.105 32503 4106 I zsys : (YK7R) recv PING from peer=N42B sequence=5
03-02 17:54:30.105 32503 4106 I zsys : (YK7R) send PING_OK to peer=N42B sequence=6
03-02 17:54:30.987 32503 4106 I zsys : (YK7R) recv PING from peer=N42B sequence=6
03-02 17:54:30.987 32503 4106 I zsys : (YK7R) send PING_OK to peer=N42B sequence=7
03-02 17:54:31.993 32503 4106 I zsys : (YK7R) recv PING from peer=N42B sequence=7
03-02 17:54:31.993 32503 4106 I zsys : (YK7R) send PING_OK to peer=N42B sequence=8
03-02 17:54:33.014 32503 4106 I zsys : (YK7R) recv PING from peer=N42B sequence=8

@sphaero
Copy link
Contributor

sphaero commented Apr 12, 2022

It seems indeed. Your host has gotten a new ipaddress it seems? Which confuses the remote host

@snyderra
Copy link
Author

snyderra commented Apr 12, 2022 via email

@sphaero
Copy link
Contributor

sphaero commented Apr 13, 2022

This requires some tracing of the logic. The code is not hard to read, you could try the require_peer method see if it is caused there:

zyre_node_require_peer (zyre_node_t *self, zuuid_t *uuid, const char *endpoint, const char *public_key)

It would also help to create a code snippet that reproduces the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants