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

beacon is dead after network error #108

Open
vim-zz opened this issue Mar 20, 2017 · 1 comment
Open

beacon is dead after network error #108

vim-zz opened this issue Mar 20, 2017 · 1 comment

Comments

@vim-zz
Copy link

vim-zz commented Mar 20, 2017

I have the following scenario on which there is a network problem during beacon setup, where I get the following exception inside ZBeacon:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pyre/zbeacon.py", line 118, in prepare_udp
    socket.IP_ADD_MEMBERSHIP, mreq)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 19] No such device

The problem is that the caller cannot know it happened as the exception was triggered inside ZActor which has it's own thread (using Threading package).

@papr
Copy link
Contributor

papr commented Aug 29, 2017

I would like to revive this issue and discuss possible solutions to this issue.

  1. The udp beacon setup happens on sending CONFIGURE + <port> to the actor. The actor reacts by answering with the address. How about answering with <empty string> (or an other token) on udp beacon setup failure? The user could test for the token and act appropriately.
  2. Implement an ALIVE command that returns a boolean indicating a possible failure of the beacon. The user can check the answer and reinitiate the setup if required.

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