AcademySoftwareFoundation / OpenCue

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

Import errors in rqd #481

Closed gregdenton closed 4 years ago

gregdenton commented 4 years ago

Changes on #411 broke our rqd rpm. For some reason, changing the way rqcore imports internal modules broke our rpm with ImportError.

ruchitinfushion commented 4 years ago

With v0.2.119

2019-10-16 09:48:22,178 WARNING   rqd3-__main__   RQD Starting Up
2019-10-16 09:48:23,021 WARNING   rqd3-rqcore     OVERRIDE_NIMBY is not defined, Nimby startup has been disabled
Traceback (most recent call last):
  File "/home/ruchit/Desktop/RQD/venv/bin/rqd", line 11, in <module>
  File "/home/ruchit/Desktop/RQD/venv/lib/python2.7/site-packages/rqd-0.2.119-py2.7.egg/rqd/__main__.py", line 165, in main
  File "/home/ruchit/Desktop/RQD/venv/lib/python2.7/site-packages/rqd-0.2.119-py2.7.egg/rqd/rqcore.py", line 573, in start
  File "/home/ruchit/Desktop/RQD/venv/lib/python2.7/site-packages/rqd-0.2.119-py2.7.egg/rqd/rqnetwork.py", line 201, in start_grpc
  File "/home/ruchit/Desktop/RQD/venv/lib/python2.7/site-packages/rqd-0.2.119-py2.7.egg/rqd/rqnetwork.py", line 162, in __init__
  File "/home/ruchit/Desktop/RQD/venv/lib/python2.7/site-packages/grpc/__init__.py", line 1662, in server
ImportError: cannot import name _server
gregdenton commented 4 years ago

@ruchitinfushion, We have seen similar errors before in #418 . Could verify the permissions on the _server file as mentioned in Donal's comment: https://github.com/AcademySoftwareFoundation/OpenCue/issues/418#issuecomment-524549766

bcipriano commented 4 years ago

I believe this has since been fixed, but if anyone is running into this please feel free to reopen.

michimussato commented 1 year ago

@bcipriano, I hope you don't mind...

(venv) [user@manjaro-xfce Downloads]$ sudo rqd
[sudo] password for user: 
2022-10-08 09:43:29,725 WARNING   rqd3-__main__   RQD Starting Up
Traceback (most recent call last):
  File "/home/user/Downloads/venv/bin/rqd", line 33, in <module>
  File "/home/user/Downloads/venv/lib/python3.7/site-packages/rqd-0.15.22-py3.7.egg/rqd/__main__.py", line 134, in main
  File "/home/user/Downloads/venv/lib/python3.7/site-packages/rqd-0.15.22-py3.7.egg/rqd/rqcore.py", line 620, in start
  File "/home/user/Downloads/venv/lib/python3.7/site-packages/rqd-0.15.22-py3.7.egg/rqd/rqnetwork.py", line 209, in start_grpc
  File "/home/user/Downloads/venv/lib/python3.7/site-packages/rqd-0.15.22-py3.7.egg/rqd/rqnetwork.py", line 143, in __init__
  File "/home/user/Downloads/venv/lib/python3.7/site-packages/grpc/__init__.py", line 2063, in server
ImportError: cannot import name '_server' from 'grpc' (/home/user/Downloads/venv/lib/python3.7/site-packages/grpc/__init__.py)
(venv) [user@manjaro-xfce Downloads]$ sudo -u daemon cat /home/user/Downloads/venv/lib/python3.7/site-packages/grpc/_server.py 
[sudo] password for user: 
cat: /home/user/Downloads/venv/lib/python3.7/site-packages/grpc/_server.py: Permission denied
(venv) [user@manjaro-xfce Downloads]$ python --version
Python 3.7.14
(venv) [user@manjaro-xfce Downloads]$ uname -r
5.15.71-1-MANJARO
bcipriano commented 1 year ago

Based on the output of that cat command, it looks like RQD doesn't have access to that _server.py file.

A few things you could try:

  1. You could try doing something like chmod 777 on that file/directory where _server.py lives.
  2. Try disabling RQD's user-switching behavior via the RQD_BECOME_JOB_USER setting. See https://lists.aswf.io/g/opencue-user/topic/78961259#390 for more info on how to do that.