Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker quickstart RQD error #1301

Open
Tilix4 opened this issue Jun 27, 2023 · 2 comments
Open

Docker quickstart RQD error #1301

Tilix4 opened this issue Jun 27, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Tilix4
Copy link

Tilix4 commented Jun 27, 2023

Describe the bug
RQD set up from the quickstart will never start. It throws a no module named pynput first, and when I access the container to install it manually, I get a second error.
Ubuntu 22.04

To Reproduce
Steps to reproduce the behavior: Strictly follow quickstart

Expected behavior
That it works without error.

Screenshots

rqd_1     | WARNING:root:CUEBOT_HOSTNAME: cuebot
rqd_1     | WARNING:root:RQD Starting Up
rqd_1     | 2023-06-27 17:17:21,763 WARNING   openrqd-__main__   RQD Starting Up
rqd_1     | ERROR:rqd.rqnimby:Failed to import pynput, falling back to Select module
rqd_1     | Traceback (most recent call last):
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/rqd-0.21.13-py3.6.egg/rqd/rqnimby.py", line 55, in getNimby
rqd_1     |     import pynput
rqd_1     | ModuleNotFoundError: No module named 'pynput'
rqd_1     | 2023-06-27 17:17:21,764 ERROR     openrqd-rqnimby    Failed to import pynput, falling back to Select module
rqd_1     | Traceback (most recent call last):
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/rqd-0.21.13-py3.6.egg/rqd/rqnimby.py", line 55, in getNimby
rqd_1     |     import pynput
rqd_1     | ModuleNotFoundError: No module named 'pynput'
rqd_1     | WARNING:rqd.rqnimby:Using Nimby nop! Something went wrong on nimby's initialization.
rqd_1     | 2023-06-27 17:17:21,765 WARNING   openrqd-rqnimby    Using Nimby nop! Something went wrong on nimby's initialization.
rqd_1     | WARNING:rqd.rqnetwork:GRPC connection failed. Retrying in 15 seconds
rqd_1     | 2023-06-27 17:17:21,799 WARNING   openrqd-rqnetwork  GRPC connection failed. Retrying in 15 seconds

After the manual pip install pynput inside the container.

rqd_1     | WARNING:root:CUEBOT_HOSTNAME: cuebot
rqd_1     | WARNING:root:RQD Starting Up
rqd_1     | 2023-06-27 17:03:10,467 WARNING   openrqd-__main__   RQD Starting Up
rqd_1     | ERROR:rqd.rqnimby:Failed to import pynput, falling back to Select module
rqd_1     | Traceback (most recent call last):
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/rqd-0.21.13-py3.6.egg/rqd/rqnimby.py", line 55, in getNimby
rqd_1     |     import pynput
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/pynput/__init__.py", line 40, in <module>
rqd_1     |     from . import keyboard
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/pynput/keyboard/__init__.py", line 31, in <module>
rqd_1     |     backend = backend(__name__)
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/pynput/_util/__init__.py", line 82, in backend
rqd_1     |     if resolutions else '')
rqd_1     | ImportError: this platform is not supported: ('failed to acquire X connection: Can\'t connect to display ":0": [Errno 111] Connection refused', DisplayConnectionError(':0', '[Errno 111] Connection refused'))
rqd_1     | 
rqd_1     | Try one of the following resolutions:
rqd_1     | 
rqd_1     |  * Please make sure that you have an X server running, and that the DISPLAY environment variable is set correctly
rqd_1     | 2023-06-27 17:03:10,499 ERROR     openrqd-rqnimby    Failed to import pynput, falling back to Select module
rqd_1     | Traceback (most recent call last):
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/rqd-0.21.13-py3.6.egg/rqd/rqnimby.py", line 55, in getNimby
rqd_1     |     import pynput
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/pynput/__init__.py", line 40, in <module>
rqd_1     |     from . import keyboard
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/pynput/keyboard/__init__.py", line 31, in <module>
rqd_1     |     backend = backend(__name__)
rqd_1     |   File "/usr/local/lib/python3.6/site-packages/pynput/_util/__init__.py", line 82, in backend
rqd_1     |     if resolutions else '')
rqd_1     | ImportError: this platform is not supported: ('failed to acquire X connection: Can\'t connect to display ":0": [Errno 111] Connection refused', DisplayConnectionError(':0', '[Errno 111] Connection refused'))
rqd_1     | 
rqd_1     | Try one of the following resolutions:
rqd_1     | 
rqd_1     |  * Please make sure that you have an X server running, and that the DISPLAY environment variable is set correctly
rqd_1     | WARNING:rqd.rqnimby:Using Nimby nop! Something went wrong on nimby's initialization.
rqd_1     | 2023-06-27 17:03:10,500 WARNING   openrqd-rqnimby    Using Nimby nop! Something went wrong on nimby's initialization.
rqd_1     | WARNING:rqd.rqnetwork:GRPC connection failed. Retrying in 15 seconds
rqd_1     | 2023-06-27 17:03:10,517 WARNING   openrqd-rqnetwork  GRPC connection failed. Retrying in 15 seconds
flyway_1  | A new version of Flyway is available
flyway_1  | Upgrade to Flyway 9.20.0: https://rd.gt/2X0gakb
flyway_1  | Flyway Community Edition 9.11.0 by Redgate
flyway_1  | See what's new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.11.0
flyway_1  | 
flyway_1  | Database: jdbc:postgresql://db:5432/cuebot (PostgreSQL 15.1)
flyway_1  | Successfully validated 16 migrations (execution time 00:00.065s)
flyway_1  | Current version of schema "public": 16
flyway_1  | Schema "public" is up to date. No migration necessary.
opencue_flyway_1 exited with code 0
cuebot_1  | 
cuebot_1  |   .   ____          _            __ _ _
cuebot_1  |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
cuebot_1  | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
cuebot_1  |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
cuebot_1  |   '  |____| .__|_| |_|_| |_\__, | / / / /
cuebot_1  |  =========|_|==============|___/=/_/_/_/
cuebot_1  |  :: Spring Boot ::        (v2.2.1.RELEASE)
cuebot_1  | 
rqd_1     | WARNING:rqd.rqcore:RQD Started
rqd_1     | 2023-06-27 17:03:25,677 WARNING   openrqd-rqcore     RQD Started

Version Number
Current master (d2057d3)

Additionnal Info
I've also noticed that the requirements.txt in the running container is not the same as the one in the repo. Maybe that's because I've tried to build https://github.com/AcademySoftwareFoundation/OpenCue/releases/tag/v0.21.13 in the first place, but I cannot make it up-to-date.

@Tilix4 Tilix4 added the bug Something isn't working label Jun 27, 2023
@n-jay
Copy link
Contributor

n-jay commented Aug 4, 2023

Hi @Tilix4, I ran RQD via docker and came across a similar set of errors.
Selection_098

It seems like there is a limitation with the pynput module when running in a docker container as it requires an X11 server for the GUI. It's detailed in this doc.
Hence why it didn't work even after you manually installed it.
I've created a fix and sent a PR which will be referenced below.

However, this does not have an effect over RQD being unable to connect to CueBot over gRPC.
I still got the same GRPC connection failed issue with CueBot simply running locally via the IntellIJ IDE even after the pynput fix.

@bcipriano
Copy link
Collaborator

A couple of things to note here:

  • There does appear to be an issue with pynput, but it shouldn't prevent RQD from starting up.
    • A fix is in progress and I've commented on Fix pynput import error in RQD docker #1311.
    • If Nimby is not able to start, RQD should just essentially deactivate it -- per the Using Nimby nop messages it looks like that's working here.
  • When you're using the quickstart's sandbox setup, some RQD connection errors are expected.
    • The way our Docker compose setup works is to start all containers at the same time. Most of these containers will need to wait for another component's container to be up and running in order to start properly. What you're seeing here is the RQD container has started but the Cuebot container isn't up and running yet, so RQD throws an error then waits a while before it retries.
    • Based on the output in your second screenshot, RQD startup did succeed after Cuebot finished starting up.

Prior to you installing pynput, I would have expected the same -- that RQD would finish starting up eventually despite the error. Is it possible for you to check this again with a fresh setup?

Maybe a "Known Issues" section on the quickstart doc page would help clarify some of these things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants