Keycloak 6.0.1 - Getting Started - securing servlet app fails to load - keycloak

Running new Keycloak 6.0.1 install. Following "Getting Started" - using keycloak-quickstarts/app-profile-jee-vanilla application. Wildfly version is 16.0.0.Final. Why am I unable to load the vanilla.war file?
This is the error after running: mvn clean wildfly:deploy
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final:deploy (default-cli) on project keycloak-app-profile-jee-vanilla: Failed to execute goal deploy: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"vanilla.war\".undertow-deployment" => "java.lang.RuntimeException: java.lang.IllegalStateException: The required mechanism 'BASIC' is not available in mechanisms [KEYCLOAK] from the HttpAuthenticationFactory.
[ERROR] Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: The required mechanism 'BASIC' is not available in mechanisms [KEYCLOAK] from the HttpAuthenticationFactory.
[ERROR] Caused by: java.lang.IllegalStateException: The required mechanism 'BASIC' is not available in mechanisms [KEYCLOAK] from the HttpAuthenticationFactory."}}}}

This question may be a possible duplicate of: How To Resolve "The required mechanism 'BASIC' is not available in mechanisms [KEYCLOAK] from the HttpAuthenticationFactory"
However, I'm assuming you're following the following documentation: Getting Started Guide - Keycloak.
If that's the case, following the Github README for the quickstart is much better. Here's the link: keycloak-quickstarts
The README is more tailored for this quickstart project. Also, the documentation on the official page for this particular quickstart project isn't well ordered and might easily throw you off the bench.

Related

Failed to restart after installed APOC Plugin in Neo4j

I would like to install the APOC plugin for Neo4j. However once generated jar file and restart, neo4j not able to restart again
Follow Guide
https://github.com/neo4j-contrib/neo4j-apoc-procedures/tree/3.1
Error msg:
ERROR Failed to start Neo4j: Starting Neo4j failed: Component ' org.neo4j.server.database.LifecycleManagingDatabase#3b6579d6' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component ' org.neo4j.server.database.LifecycleManagingDatabase#3b6579d6' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server. database.LifecycleManagingDatabase#3b6579d6' was successfully initialized, but failed to sta rt. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(Serv erStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:227)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:68)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.databa se.LifecycleManagingDatabase#3b6579d6' was successfully initialized, but failed to start. Pl ease see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:4 43)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:199)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDat abaseFacadeFactory, /root/NEO4J_HOME/data/databases/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabase FacadeFactory.java:193)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseF acadeFactory.java:124)
at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:57)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDataba se.java:89)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:4 33)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.p roc.Procedures#2200fd80' was successfully initialized, but failed to start. Please see attac hed cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:4 43)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabase FacadeFactory.java:189)
... 9 more
Caused by: org.neo4j.kernel.api.exceptions.ProcedureException: Unable to register procedure, because the name `apoc.algo.betweenness` is already in use.
at org.neo4j.kernel.impl.proc.ProcedureRegistry.register(ProcedureRegistry.java:81)
at org.neo4j.kernel.impl.proc.Procedures.register(Procedures.java:103)
at org.neo4j.kernel.impl.proc.Procedures.register(Procedures.java:76)
at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:209)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:4 33)
... 11 more
the jar file name: apoc-3.1.0.4-SNAPSHOT-al.jar
neo4j version: 3.1.1
The stacktrace says: "the name apoc.algo.betweenness is already in use". So, perhaps you forgot to remove a previous APOC jar file from the plugins directory.

Wildfly 10: Cannot upload deployment, Required services that are not installed

Every time I deploy a war file in wildfly 10, I got this following error :
Cannot upload deployment: {"WFLYCTL0080: Failed services" =>
{"jboss.deployment.unit.\"member.war\".FIRST_MODULE_USE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"member.war\".FIRST_MODULE_USE: WFLYSRV0153:
Failed to process phase FIRST_MODULE_USE of deployment \"member.war\"
Caused by:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
WFLYJCA0064: Exception deploying datasource java:/PostgresDS Caused
by: org.jboss.msc.service.DuplicateServiceException: Service
jboss.data-source.\"jboss.naming.context.java.PostgresDS\" is already
registered"},"WFLYCTL0412: Required services that are not installed:"
=> ["jboss.deployment.unit.\"member.war\".FIRST_MODULE_USE"],"WFLYCTL0180:
Services with missing/unavailable dependencies" => undefined}
It happens when I changed my persistence.xml and *-ds.xml which is telling my application to use the PostgresDS as its datasource.
Without looking at the files, it seems like you are registering your data source twice, once in the *-ds.xml and once in the persistence.xml (or maybe in the standalone.xml?).
Regarding missing/unavailable dependencies, are you certain the the Postgres SQL Module is installed in Wildfly and the driver is configured in the standalone.xml?
See also:
Wildfly DuplicateServiceException
How to add PostgreSQL datasource to WildFly 9.0?

Wildfly 10 Not using database but getting a jpa error

I recently installed Wildfly-10.0.0.Final. To get my feet wet, I created an elementary EJB that does not require a database connection. For some reason when I try to deploy the EJB, I get the following error:
Cannot upload deployment: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"JavaEE_Wildfly1.jar\".
FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.
\"JavaEE_Wildfly1.jar\".
FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment \"JavaEE_Wildfly1.jar\"
Caused by: javax.persistence.PersistenceException: WFLYJPA0057: PersistenceProvider 'org.eclipse.persistence.jpa.PersistenceProvider' not found"}}
Since I am not using a database, do I still have to specify a Persistence provider? I do not have a persistence.xml because I did not think I needed one.
I don't think you need a persistence.xml. Check out this EJB-In-A-War wildfly quickstart for an example of a #Stateless EJB deployed without a persistence.xml.

Error when trying to create a new JBOSS OpenShift project

I am trying to have a play around with openshift, but am running into a config issue at the first hurdle.
i have RedHatJBOSS Developer Studio 8.0.0 installed, and have the JBOSS Integration and SOA Development Plugin installed.
I also have an openshift user account and can login just fine to their website.
Basically, when I select the create openshift project from the JBoss central page, and enter my valid openshift credentials and pres next, it tries to connect and immediately throws an error stating an SSL handshake exception occurred (details below).
I am a bit lost if I am honest; is there something I need to install?
I am using JRE 7 in case that is significant
com.openshift.client.OpenShiftEndpointException: Could not request https://openshift.redhat.com/broker/rest/api: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.openshift.internal.client.RestService.request(RestService.java:120)
at com.openshift.internal.client.RestService.request(RestService.java:92)
at com.openshift.internal.client.AbstractOpenShiftConnectionFactory.getConnection(AbstractOpenShiftConnectionFactory.java:36)
at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:198)
at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:158)
at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:114)
at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:103)
at org.jboss.tools.openshift.express.internal.core.connection.Connection.createUser(Connection.java:229)
at org.jboss.tools.openshift.express.internal.core.connection.Connection.connect(Connection.java:205)
at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPageModel.connect(ConnectionWizardPageModel.java:247)
at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPage$ConnectJob.run(ConnectionWizardPage.java:479)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: com.openshift.internal.client.httpclient.HttpClientException: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:201)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:161)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:140)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:99)
at com.openshift.internal.client.RestService.request(RestService.java:160)
at com.openshift.internal.client.RestService.request(RestService.java:107)
... 11 more
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:85)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:541)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1686)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1684)
at java.security.AccessController.doPrivileged(AccessController.java:330)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1682)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1255)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:479)
at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:40)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:184)
... 16 more
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.ibm.jsse2.j.a(j.java:33)
at com.ibm.jsse2.j.a(j.java:31)
at com.ibm.jsse2.qc.b(qc.java:190)
at com.ibm.jsse2.qc.a(qc.java:456)
at com.ibm.jsse2.qc.h(qc.java:352)
at com.ibm.jsse2.qc.a(qc.java:523)
at com.ibm.jsse2.qc.startHandshake(qc.java:730)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:70)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:9)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311)
at com.ibm.net.ssl.www2.protocol.https.b.getInputStream(b.java:89)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:157)
... 15 more
This looks very weird, I didnt spot this so far. SSL handshake is failing for some unknown reason.
What is the exact version of your JDK7?
What is your OS?
Cheers
Andre

Error Deploying Java App on OpenShift Express

I am attempting to deploy my java app to OpenShift Express.
The app runs fine on my local tomcat and on CloudFoundry platform. I have created the app in the management console, and have then pushed my app code to the openshift created git repository.
When I perform the push, I see that the maven build has completed successfully with no errors, however, if I then check the status of the app (using the command: rhc app status) then I get the following errors displayed:
at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.deploy(JPAAnnotationParseProcessor.java:90)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
2012/04/04 15:01:42,138 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "ROOT.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ROOT.war\".DEPENDENCIES" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ROOT.war\".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment \"ROOT.war\""}}
2012/04/04 15:01:42,462 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment ROOT.war in 320ms
2012/04/04 15:01:42,464 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."ROOT.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."ROOT.war".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment "ROOT.war"
2012/04/04 15:01:42,539 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ROOT.war\".DEPENDENCIES" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ROOT.war\".DEPENDENCIES: Failed to process phase DEPENDENCIES of deployment \"ROOT.war\""}}}}
As well as this error, I can see the end of a stacktrace, so have tried to tail the logs of the application using rhc-tail-file command, but when I do that I get the following error: Error in trying to tail files
Has anyone come across this or have any advice on how to resolve?
Go ahead and SSH into your application using the same UUID and hostname as your git repository. If you go into appname/logs you should be able to see the complete logs.
Once you get that you should have a better sense of the error.