Page 1 of 2

Rules upgrade from 2.41 to 3.3

Posted: Mon Feb 13, 2023 4:33 pm
by priel71
Hi Timur,

Have there been any changes in deps for Rules from 2.4.x to 3.3.x?
Spent today trying to get a webserver on Rocky 9 working, but it hangs after loading the front GUI, says:

"Failed to load resource: the server responded with a status of 404 (Not Found)" /server:1

I thought at first it might be php that was not correct setup, but if I run a test file in the cgru folder it does spit out proper php status.

Thanks for any ideas,

Peter.

Re: Rules upgrade from 2.41 to 3.3

Posted: Mon Feb 13, 2023 4:49 pm
by timurhai
Hi, Peter!
Rules server 3.3.x was rewritten from PHP to Python.
And now it based on WSGI Python3:
https://github.com/CGRU/cgru/blob/maste ... xample#L18

Re: Rules upgrade from 2.41 to 3.3

Posted: Mon Feb 13, 2023 4:56 pm
by priel71
Yeah I saw that when I was poking around in your source code!

I do have it installed,..

---snip---
systemd_module (shared)
cgid_module (shared)
http2_module (shared)
proxy_http2_module (shared)
wsgi_module (shared)

Any way of getting some more logs so I can see what's going on? I can't seem to get much info about why it hangs

Re: Rules upgrade from 2.41 to 3.3

Posted: Mon Feb 13, 2023 6:00 pm
by timurhai
You site should have this directives in .conf:

Code: Select all

        WSGIScriptAlias /server /opt/cgru/rules/wsgi.py
        WSGIPassAuthorization On

Re: Rules upgrade from 2.41 to 3.3

Posted: Tue Feb 14, 2023 3:33 pm
by priel71
Thanks Timur, that did the trick.

Would it be a bad idea to point the new rules onto a project folder which has been running with rules 2.4? Have the structure changed or .rule json data changed?
I'm most concerned about loosing stuff ike the body in a shot, and comments etc.. Of course I'd prefer to do this in between jobs, but that's not really an option right now.

Re: Rules upgrade from 2.41 to 3.3

Posted: Tue Feb 14, 2023 3:36 pm
by timurhai
It should be compatible.

Re: Rules upgrade from 2.41 to 3.3

Posted: Wed Feb 15, 2023 2:22 pm
by priel71
Did the switch today, but I got something strange happening with the thumbnails and other rules specific files generated, it goes into a folder called "undefined"

#80 21:19:40.345: GetFile cached[scene_bodies]: projects/BAXTER/SCENES/SC003/BK_SC003-0010/undefined/body.html

Any idea what that might be?

Re: Rules upgrade from 2.41 to 3.3

Posted: Wed Feb 15, 2023 2:36 pm
by timurhai
Very strange.
Where did you got Rules?
From 3.3.0 Linux CGRU package?

Better to get the latest version from GitHub.
And serve Rules not from /opt, but from some other custom folder.

In 3.3.0 Rules was just switched to Python.
Now it is 3.3.1 - some bug was fixed.

Re: Rules upgrade from 2.41 to 3.3

Posted: Wed Feb 15, 2023 2:43 pm
by priel71
Yeah I got it from Github, running 3.3.1 now
Serving rules from a studio-wide share, so not from /opt

Re: Rules upgrade from 2.41 to 3.3

Posted: Wed Feb 15, 2023 2:50 pm
by priel71
I think perhaps the "undefined" folder came from me doing a thumbnails process... because I can only see it in the project I did it in, not the others.

This is what the thumbnail source looks like when I view at SCENES level in rules: