StrongKey / fido2

Open-source FIDO server, featuring the FIDO2 standard. https://demo4.strongkey.com/getstarted/#/openapi/fido
202 stars 59 forks source link

FIDO server is not working on Ubuntu #216

Open pramodbhaskar opened 1 year ago

pramodbhaskar commented 1 year ago

We were trying to install StrongKey FIDO server (v4.7) on Ubuntu machine (v20.4). However, we could not complete the setup as while initiating the SKFS server, we were getting below exception on the Payara server:

[2022-10-20T09:50:35.323+0000] [Payara 5.2021.6] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=103 _ThreadName=admin-thread-pool::admin-listener(1)] [timeMillis: 1666259435323] [levelValue: 1000] [[ Exception while invoking class org.glassfish.ejb.startup.EjbApplication start method javax.ejb.EJBException: javax.ejb.CreateException: Initialization failed for Singleton startServices at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:689) at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:421) at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:219) at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:180) at org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:159) at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:171) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:123) . . . Caused by: javax.ejb.CreateException: Initialization failed for Singleton startServices at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:542) at com.sun.ejb.containers.AbstractSingletonContainer.access$000(AbstractSingletonContainer.java:81) at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:687) ... 68 more Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:459) at com.strongkey.crypto.utility.cryptoCommon.loadJWTSigningKeys(cryptoCommon.java:713) at com.strongkey.skfs.txbeans.startServices.initialize(startServices.java:110) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Thanks in advance.

push2085 commented 1 year ago

Hi @pramodbhaskar, We will need a little more details to debug this issue. Can you attach or paste more contents from the server.log from the test server. The server file is located in the following directory: /usr/local/strongkey/payara5/glassfish/domains/domain1/logs/server.log

Can you also paste the output from running the install script.

Once we have them, we can look into it and try to find out why its failing.

I would also want to let you know that while it should theoretically work with Ubuntu, we have only thoroughly tested the fido server with RHEL based OS (Centos 7 and Rocky 8) and so I would recommend that while you wait for us to figure out the ubuntu problem, you should try deploying a CentoOS/Rocky 8 linux vm/machine with openjdk 11.

In case of Rocky linux, you should also run the following before running the install script. The command below will enable an additional repository for installing openldap.

dnf config-manager --set-enabled plus

Let us know if those OS work for you.

Thank you Pushkar