Closed AussieScorpio closed 1 year ago
Hi, I'm seeing the same behaviour in a k8s install, locally using the same image it worked flawlessly
Found a cause and a workaround, this problem seem to happen only when there are more than one db accessible to the db user, if only one db accessible for the odoo user, everything goes fine..
Found a cause and a workaround, this problem seem to happen only when there are more than one db accessible to the db user, if only one db accessible for the odoo user, everything goes fine..
I'm still to test this, but if this is the case (and it might be given a similar issue I've had in the past), that's a huge caveat missing from the module documentation and effectively renders the module useless to a large number of users. And of course some might implement, have it working fine, only to have it fail further down the track when they add a new database. This is conceivably something that could happen in production and bring a business to a halt as they rush to find out why it's stopped working.
Totally agree, i've already lost 12 hours digging this, and worse the supposed posible solution someone gave me, using queue_job_cron_jobrunner, didnt work either, it seems that the regular job runner continue to work
After suffering and analyzing what happened in odoo16 and comparing against our latest installed version that is v12 we are almost sure that main culprit of this bug has more todo with core odoo changes than this module changes, almost nothing has changed in queue_job from v12 at least nothing very fundamental to the extension, instead it seems that odoo itself has changed the conditions and preparations before calling the nondb controller.. that controller gets called whenever a server with multiple db is called as the system does not select a "default" db to create a "default" env and cursor, and bang..env is none when it is needed..
In case you missed it: could you check if this change fixed it? #504
Ok, problem solved, many thanks, i continue to see this more as a odoo bug than a queue bug, but it worked flawlessly , for me #532 is solved by the solution to #504
Thanks for the feedback!
When the controller ("/queue_job/runjob") gets called, a fatal error occurs.
Oddly, if I take the URL that it's trying to reach and replace the http://localhost:8069/ with https://my-domain/, and execute it from my browser where I'm logged in, it works. (I have Nginx acting as reverse proxy and doing SSL termination; hence the https and the use of a hostname).
If I try the same thing from a clean browser with no cookies, it fails.
The only thing that I can think of that's different is the fact that I'm a logged in user when it succeeds. This would seem to be contrary to documentation that I've read that states that it's intended for anonymous users to be able to call the controller.
Running everything locally with Odoo16 in Docker.
Am I missing something?