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

ipdevpolld on FreeBSD does not work #2503

Closed
ingeborgoh opened this issue Nov 10, 2022 · 1 comment · Fixed by #2604
Closed

ipdevpolld on FreeBSD does not work #2503

ingeborgoh opened this issue Nov 10, 2022 · 1 comment · Fixed by #2604
Assignees
Labels

Comments

@ingeborgoh
Copy link
Contributor

ingeborgoh commented Nov 10, 2022

NAV 5.5.2
FreeBSD 12.3
python 3.8.15

Error introduced around version 5.3(?) when epollreactor2 was added

ipdevpoll will not start:

Traceback (most recent call last):
  File "/usr/local/bin/ipdevpolld", line 19, in <module>
    from nav.ipdevpoll.epollreactor2 import install
  File "/usr/local/lib/python3.8/site-packages/nav/ipdevpoll/epollreactor2.py",
 line 24, in <module>
    from twisted.internet import epollreactor
  File "/usr/local/lib/python3.8/site-packages/twisted/internet/epollreactor.py
", line 16, in <module>
    from select import epoll, EPOLLHUP, EPOLLERR, EPOLLIN, EPOLLOUT
ImportError: cannot import name 'epoll' from 'select' 
(/usr/local/lib/python3.8/lib-dynload/select.cpython-38.so)

Solution is to remove lines 19-22 in bin/ipdevpolld

@lunkwill42 lunkwill42 added the bug label Nov 11, 2022
@lunkwill42
Copy link
Member

The most likely fix for this would be to explicitly install the epollreactor2 only if the running system is Linux (it would be irrelevant elsewhere). Something similar has been done in a branch that is working on getting the test suite to pass outside of a Linux container:

https://github.com/lunkwill42/nav/blob/069273ceab21df9931859c01e26b71a568eaccf8/tests/integration/conftest.py#L35-L39

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

Successfully merging a pull request may close this issue.

3 participants