aaronsmithtv / Houdini-Docker

🐳 An automated workflow for containerizing SideFX Houdini installations with Docker
MIT License
76 stars 10 forks source link

Errors running hython #10

Closed johanboekhoven closed 9 months ago

johanboekhoven commented 9 months ago

Hi @aaronsmithtv,

I'm able to succesfully build/run the docker and do the following steps:

docker run -it --rm aaronsmithtv/hbuild:latest
hserver -C -S https://www.sidefx.com/license/sesinetd --clientid $SIDEFX_CLIENT --clientsecret $SIDEFX_SECRET
sesictrl ping --client-id $SIDEFX_CLIENT --client-secret $SIDEFX_SECRET

With the correct API keys etc, eveything looks succesful.

But when I try to run hython from that shell I get the following error:

root@248923a03d83:/opt/hfs20.0/houdini# hython
OpenCL Exception: No OpenCL platform found. (-32)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

415:  (sent by pid 415)
-- TRACEBACK BEGIN --
Traceback from /opt/houdini/build/bin/hkey-bin 20.0.547 (Compiled on linux-x86_64-gcc9.3):
malloc_usable_size <hkey-bin>
malloc_usable_size <hkey-bin>
malloc_usable_size <hkey-bin>
malloc_usable_size <hkey-bin>
raise <libc.so.6>
raise <libc.so.6>
abort <libc.so.6>
QMessageLogger::fatal(char const*, ...) const <libQt5Core.so.5>
QGuiApplicationPrivate::createPlatformIntegration() <libQt5Gui.so.5>
QGuiApplicationPrivate::createEventDispatcher() <libQt5Gui.so.5>
QCoreApplicationPrivate::init() <libQt5Core.so.5>
QGuiApplicationPrivate::init() <libQt5Gui.so.5>
QApplicationPrivate::init() <libQt5Widgets.so.5>
write <hkey-bin>
write <hkey-bin>
write <hkey-bin>
__libc_start_main <libc.so.6>
write <hkey-bin>
-- TRACEBACK END --
No licenses could be found to run this application.
        Please check for a valid license server host

I'm not sure if I'm missing any configuration steps, or perhaps Hou20 needs another config.
The above is running from windows/docker desktop.

Thanks for any info, -Johan

aaronsmithtv commented 9 months ago

Hey Johan, thanks for raising this with me, before I do some investigating do you think you could see if a previous hbuild image version works? 19.5.716 is the latest non-20 version.

johanboekhoven commented 9 months ago

Hey Aaron, thanks for the quick reply. Here are the 19.5 results:

F:_test_projects\hou-docker > docker pull aaronsmithtv/hbuild:19.5.716-base

19.5.716-base: Pulling from aaronsmithtv/hbuild
14726c8f7834: Pull complete
b96c5db6cbae: Pull complete
Status: Downloaded newer image for aaronsmithtv/hbuild:19.5.716-base
docker.io/aaronsmithtv/hbuild:19.5.716-base

What's Next?
  1. Sign in to your Docker account → docker login
  2. View a summary of image vulnerabilities and recommendations → docker scout quickview aaronsmithtv/hbuild:19.5.716-base

F:_test_projects\hou-docker > docker run -it --rm aaronsmithtv/hbuild:19.5.716-base

root@ca66bca99b53:/# hserver -C -S https://www.sidefx.com/license/sesinetd --clientid $clientid --clientsecret $cliendsecret 

No hserver found running at http://127.0.0.1:1714
Run hserver to start an hserver daemon.
Unable to connect to hserver. Attempting to restart hserver...
Successfully started hserver after 500ms.
License server changed to https://www.sidefx.com/license/sesinetd.
root@ca66bca99b53:/# sesictrl ping --client-id $clientid --client-secret $cliendsecret 

Pinging: 'https://www.sidefx.com/license/sesinetd'
  Successfully pinged. 
Total time 384.757ms
 Connect time 12.956ms
root@ca66bca99b53:/# hython

No licenses could be found to run this application.
        Please check for a valid license server host
Details: https://www.sidefx.com: 422 You must be logged in

Spawn Error: : No such file or directory
Error running xdg-open
Argument list:
   0: xdg-open
   1: https://www.sidefx.com/license/sesinetd
root@ca66bca99b53:/# 

I've hidden the api details, again a login error, albeit a bit different, so I'm probably doing something wrong, just not sure what.

edhar-rybak commented 9 months ago

@johanboekhoven, it looks like you didn't log in to SideFX so hython can't redeem the license. For my cases, I am doing it like this, and it works.


# Connect to license server
hserver -C -S https://www.sidefx.com/license/sesinetd \
    --clientid $SIDEFX_CLIENT \
    --clientsecret $SIDEFX_SECRET

# Check that license is available with sesictrl
sesictrl ping
# Redeem license
sesictrl login --email $SIDEFX_EMAIL --password $SIDEFX_PASSWORD
echo "Sleeping for 5 seconds to allow license to be redeemed"
sleep 5
hython
johanboekhoven commented 9 months ago

@edhar-rybak Ok, that does work, thanks! Looking back it does hint at it in the error, but I was assuming the API key would be enough. So what is the relation between the API key and the login then? In my view you need only one of the two.

aaronsmithtv commented 9 months ago

Glad to see you managed to get a fix @johanboekhoven! Thanks so much for helping out @edhar-rybak. I will be closing this issue now but feel free to open another if you run into anything else :)