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

Cannot install queue_job on odoo 16/windows (OSError: [WinError 10038] An operation was attempted on something that is not a socket) #564

Open
johancitybee opened this issue Sep 25, 2023 · 4 comments
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@johancitybee
Copy link

When installing queue_job on odoo 16 community + enterprise edition, the queue_job does not start correctly (although jobs seems to be aunched correctly) and the log displays the same error message every 5 seconds

Module

queue_job

Describe the bug

After installing the module on a pristine DB running odoo 16 and following installation instructions (server_wide_modules = web,web_kanban,queue_job), restarting odoo, the following error message shows up every 5 seconds:
2023-09-25 19:48:32,476 4704 INFO ? odoo.addons.queue_job.jobrunner.runner: initializing database connections
2023-09-25 19:48:32,591 4704 INFO ? odoo.addons.queue_job.jobrunner.runner: queue job runner ready for db dev16
2023-09-25 19:48:32,591 4704 INFO ? odoo.addons.queue_job.jobrunner.runner: database connections ready
2023-09-25 19:48:32,591 4704 ERROR ? odoo.addons.queue_job.jobrunner.runner: exception: sleeping 5s and retrying
Traceback (most recent call last):
File "c:\git\wr-odoo-addons\3rd-parties\addons\queue_job\jobrunner\runner.py", line 521, in run
self.wait_notification()
File "c:\git\wr-odoo-addons\3rd-parties\addons\queue_job\jobrunner\runner.py", line 494, in wait_notification
events = sel.select(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\selectors.py", line 323, in select
r, w, _ = self._select(self._readers, self._writers, [], timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\selectors.py", line 314, in _select
r, w, x = select.select(r, w, w, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 10038] An operation was attempted on something that is not a socket

To Reproduce

16.0.2.5.0

Steps to reproduce the behavior:

  1. Install queue_job on a new DB running odoo 16 / odoo enterrpsie 16 on windows 11
  2. Restart odoo-bin with server_wide_modules conf
  3. Error message shows up.

Expected behavior
Not sure the error message should pop up, although feature seems to be working properly

Additional context
Windows 11 / python 3.11.4 / pip 23.1.2

@wimvanhouts
Copy link

I encounter the same issue, and, it is filling the logs with exceptions. The cause is actually described here: https://docs.python.org/3/library/select.html#select.select. Calling select() on something that is not a winsock thing on windows results in this specific error.

The none winsock thing in the list of connections is a pipe that is created. See runner.py, line 368
self._stop_pipe = os.pipe()

This is added to the list of connections (runner.py line 472) to interrupt the select when the stop function is called (runner.py line 505)

This is probably done to free the select call that would otherwise be blocking if no data would be send over the sockets (and you have to wait for the select timeout).

Unfortunately, even though the cause is clear, I do not have a solution (yet)

@nesryn
Copy link

nesryn commented Jan 10, 2024

Has anyone found a solution?

@Maralai
Copy link

Maralai commented May 7, 2024

I believe I have this resolved in this PR: #647

Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

4 participants