Rules upgrade from 2.41 to 3.3

Install and setup web server.
User avatar
priel71
Posts: 63
Joined: Fri Jan 20, 2017 2:10 am
Location: Kuala Lumpur
Contact:

Rules upgrade from 2.41 to 3.3

Post 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.
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Rules upgrade from 2.41 to 3.3

Post 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
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
priel71
Posts: 63
Joined: Fri Jan 20, 2017 2:10 am
Location: Kuala Lumpur
Contact:

Re: Rules upgrade from 2.41 to 3.3

Post 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
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Rules upgrade from 2.41 to 3.3

Post by timurhai »

You site should have this directives in .conf:

Code: Select all

        WSGIScriptAlias /server /opt/cgru/rules/wsgi.py
        WSGIPassAuthorization On
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
priel71
Posts: 63
Joined: Fri Jan 20, 2017 2:10 am
Location: Kuala Lumpur
Contact:

Re: Rules upgrade from 2.41 to 3.3

Post 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.
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Rules upgrade from 2.41 to 3.3

Post by timurhai »

It should be compatible.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
priel71
Posts: 63
Joined: Fri Jan 20, 2017 2:10 am
Location: Kuala Lumpur
Contact:

Re: Rules upgrade from 2.41 to 3.3

Post 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?
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Rules upgrade from 2.41 to 3.3

Post 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.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
priel71
Posts: 63
Joined: Fri Jan 20, 2017 2:10 am
Location: Kuala Lumpur
Contact:

Re: Rules upgrade from 2.41 to 3.3

Post by priel71 »

Yeah I got it from Github, running 3.3.1 now
Serving rules from a studio-wide share, so not from /opt
User avatar
priel71
Posts: 63
Joined: Fri Jan 20, 2017 2:10 am
Location: Kuala Lumpur
Contact:

Re: Rules upgrade from 2.41 to 3.3

Post 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:
Attachments
wsbKCP48RC.png
wsbKCP48RC.png (24.92 KiB) Viewed 7819 times
Post Reply