okta-aws-cli-assume-role
okta-aws-cli-assume-role copied to clipboard
okta-aws on headless
Describe the bug jar is built with GUI dependencies and abends on headless systems
To Reproduce Steps to reproduce the behavior:
- Install following instructions
- run 'okta-aws'
Expected behavior Prompt for missing arguments/configuration
Screenshots headless-server:~$ okta-aws Graphics Device initialization failed for : es2, sw Error initializing QuantumRenderer: no suitable pipeline found java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280) at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:243) at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124) ... 1 more Exception in thread "main" java.lang.RuntimeException: No toolkit found at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) at java.base/java.lang.Thread.run(Thread.java:834)
Additional context Add any other context about the problem here.
I am encountering the same issue.
same here.
Sorry - I have not had much time to dedicate to this recently. I understand this is blocking several people that do not need browser auth. The current reason javafx is used is for organizations that delegate their Okta authentication to other providers like Google, in this case a browser window is needed to perform the authentication and SAML flow. I am thinking of adding a separate maven build profile that will build a jar without these dependencies. Then you would either use the headless, or browserauth jar depending on your needs.
I'm having too much trouble getting this installed, so better would be to use a docker container, but I require the web prompt, which I can't do in a docker container. It seems the docs are out of date and the docker container that was used awhile ago is outdated as well.
Any plans to move away from java or to make the install more reliable?
faced into same issue
For those still experiencing this issue can you paste the java -version
you are using and your OS? It seemed to start out as an issue specific for people running linux though this thread has grown quite long and want to be sure.
For what its worth I am running openjdk 11.0.2 on Mac OS X 10.15.7 so will need to verify/troubleshoot on different platforms depending on where people are having the issue
Same issue with java 11 and 14 on Fedora (using okta-aws-cli-2.0.4.jar)
java -version
openjdk version "14.0.2" 2020-07-14
OpenJDK Runtime Environment AdoptOpenJDK (build 14.0.2+12)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14.0.2+12, mixed mode, sharing)
$ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
$ okta-aws xxx sts get-caller-identity
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:243)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
... 1 more
Exception in thread "main" java.lang.RuntimeException: No toolkit found
Update: I used java 8 with okta-aws-cli-2.0.0.jar
and first got:
java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
...
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/openjfx/rt/lib/amd64/libjfxwebkit.so
After installing the necessary drivers ( sudo dnf install mesa-dri-drivers.i686
) I got this:
Exception in thread "main" java.lang.UnsupportedOperationException: Internal Error
at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:158)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:140)
at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:278)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
ANOTHER UPDATE: added -Djdk.gtk.verbose=true \
and saw that it was looking for GTK version 3
(trying GTK library libgtk-3.so.0
) which solved by doing dnf install libgtk-3.so.0
. That made it work for Java 8
with okta-aws-cli-2.0.0.jar
. Solving it for java 11+ is still pending.
ping @jeremyplichtafc? Is there a plan to make this work for headless? Or is there any workaround for this available?
This solved this issue on windows. edited config.properties (c:\users<your name>.okta)
#OktaAWSCLI
OKTA_ORG=
I did similar thing for mac and it solved the issue as well:
nano ~/.okta/config.properties
# OktaAWSCLI
OKTA_ORG=your-okta-org-url
OKTA_AWS_APP_URL=your-okta-aws-app-url
OKTA_USERNAME=your-okta-username
OKTA_BROWSER_AUTH=false