AcademySoftwareFoundation / OpenCue

A render management system you can deploy for visual effects and animation productions.
https://www.opencue.io
Apache License 2.0
827 stars 199 forks source link

RQD fresh install - CRITICAL:root:Please run launch as root #804

Closed flinfo closed 3 years ago

flinfo commented 3 years ago

New Centos8 install. Python3 installed (also tried with Python2). User in Sudoers. Installed RQD as per - Option 3: Installing from the published release (https://www.opencue.io/docs/getting-started/deploying-rqd/#option-3-installing-from-the-published-release) $rqd - results in CRITICAL:root:Please run launch as root $sudo rqd - results in sudo: rqd: command not found

I must have something set up wrong. Any help appreciated.

bcipriano commented 3 years ago

Yeah, because of RQD's built-in behavior of switching users based on who submitted the job, it needs to run as root. It's not ideal, and something we should address eventually, but that's the current behavior.

sudo rqd likely isn't working because it isn't running within the virtual environment you set up as your non-root user. Probably the best way to resolve this is to become root via sudo su then follow those instructions again, setting up a virtual environment for use by root then running rqd within that virtual environment.

flinfo commented 3 years ago

Thanks Brian, I see. Yes not ideal. sudo su did get us further but now:

WARNING:root:RQD Starting Up Traceback (most recent call last): File "/home/renderloc/rqdInstall/venv/bin/rqd", line 33, in File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/main.py", line 135, in main File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/rqcore.py", line 547, in init File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/rqmachine.py", line 82, in init File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/rqmachine.py", line 408, in initMachineStats File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/rqutil.py", line 55, in call__ File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/rqutil.py", line 69, in cacheGet File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/rqutil.py", line 55, in File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/rqmachine.py", line 360, in getHostname File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/rqutil.py", line 150, in getHostname File "/home/renderloc/rqdInstall/venv/lib/python3.6/site-packages/rqd-0.4.55-py3.6.egg/rqd/rqutil.py", line 143, in getHostIp LookupError: unknown encoding: idna

Thoughts?

bcipriano commented 3 years ago

Here's that line in the code:

https://github.com/AcademySoftwareFoundation/OpenCue/blob/v0.4.55/rqd/rqd/rqutil.py#L143

It's pretty simple, just tries to get the IP address of the current host, which Cuebot will use to communicate with that host.

Try starting a Python shell (within the same virtual environment) and run the same line of code:

import socket
socket.gethostbyname(socket.gethostname())

Does that succeed, or do you get the same error?

flinfo commented 3 years ago

Thanks Brian.

(venv) [someuser@nodenode202 rqdInstall]$ python Python 2.7.17 (default, Jun 5 2020, 03:38:32) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. |>>> import socket |>>> socket.gethostbyname(socket.gethostname()) '192.168.12.217'

So it seems to work fine from here and returns it's ip address. That is what is expected correct?

matthewpallotta commented 3 years ago

Is the expectation on the NFS server for the shared folders to be 777? Exporting with root_squash is tough.

bcipriano commented 3 years ago

@flinfo Yes, that's the expected result. Oddly, it's working in your shell but not in the context of RQD, even though both are using (I assume) the same virtual environment.

Could you try switching to root and doing the same? It looks like you ran that shell as a non-root user, so it would be good to check.

bcipriano commented 3 years ago

@matthewpallotta I don't believe there's any expectation of permissions. The render process will need to be able to read any input files and write to the output directory of course, but RQD shouldn't require anything more specific than that.

splhack commented 3 years ago

The solution is RQD_BECOME_JOB_USER 🙂 https://lists.aswf.io/g/opencue-user/message/390