When I'm configuring OIDC I'm getting this error i...
# troubleshoot
f
When I'm configuring OIDC I'm getting this error in logs 150708 [application-akka.actor.default-dispatcher-279] ERROR application - 1 @7ohe603jp - Internal server error, for (GET) (/authenticate?redirect_uri=82F] -> play.api.UnexpectedException: Unexpected exception[TechnicalException: java.net.ConnectException: Connect: at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:340) at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:263) at play. core, server.AkkaHttpServer$$anonfun$1.applyOrELse(AkkaHttpServer.scala:443) at play.core. server.AkkaHttpServer$$anonfun$1.applyorElse(AkkaHttpServer.scala:441) at scala. concurrent.Future. $anonfun$recoverwith$1 (Future. scala:417) at scala. concurrent. impl.Promise. $anonfun$transformwith$1 (Promise.scala:41) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64) at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) at akka.dispatch.BatchingExecutor$BlockableBatch.Sanonfun$run$1(BatchingExecutor.scala:92) at scala. runtime. java8.JFunctione$mcv$sp.apply(JFunctione$mev$sp. java: 23) at scala. concurrent. BlockContext$.withBlockContext (BlockContext. scala: 85) at akka. dispatch. BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:92) at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala: at atta. dispatch. forkjoin. Fork o intoot, torresuére-kuninTacko/MA.7%90..java:1330) at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Caused by: org.pac4j.core.exception.TechnicalException: java.net.ConnectException: Connection refused (Connec at org.pacuj.oidc.config.OidcConfiguration.internalInit(oidcConfiguration.java:136) at org.pacuj.core.util.InitializableObject.init(InitializableObject.java:20) at auth.sso.oidc.custom.CustomoidcClient.clientInit(CustomOidctlient.java:21) at org.pacuj.core.client.IndirectClient.internalInit(Indirectclient.java:58) at org.pacuj.core.util.InitializableObject.init(Initializableobject.java:20) at org.pacuj.core.client.Indirectclient.getRedirectAction(Indirectclient.java:93) at org.pacuj.core.client.Indirectclient.redirect(Indirectclient.java:79) at controllers.AuthenticationController.redirectToIdentityProvider(AuthenticationController.java:278) at controllers.AuthenticationController.authenticate(AuthenticationController.java:89) at router.Routes$$anonfun$routes$1.$anonfun$applyOrElse$8(Routes.scala:489) at play.core.routing.HandlerInvokerFactory$$anon$6.resultCall(HandlerInvoker.scala:139) at play.core.routing.HandlerInvokerFactory$$anon$6.resultcall(HandlerInvoker.scala:138) at play.core.routing.HandlerInvokerFactory$JavaActionInvokerFactory$$anon$3$$anon$u$$anon$5.invocation(Hand" at play.core.j.JavaAction$$anon$1.call(JavaAction.scala:128) at play.mvc.Action. lambda$call$@ (Action. java: 89) at java.util.Optional.map(Optional. java:215) at play.mvc.Action.call(Action. java: 81) at play.http.DefaultActionCreator$1.call(DefaultActionCreator.java:33) at play.core. j.JavaAction.$anonfun$apply$8(JavaAction.scala:188) at scala. concurrent.Future$. $anonfun$apply$1 (Future.scala:659) at scala.util.Success.$anonfun$map$1(Try.scala:255) at scala.util.Success.map(Try. scala: 213; at scala.concurrent. Future. $anonfun$map$1 (Future, scala:292) at scala.concurrent. impl. Promise.LiftedTree1$1 (Promise.scala:33) at scala. concurrent. impl. Promise. Sanonfun$transform$1 (Promise.scala: 33) at scala.concurrent. impl. CallbackRunnable. run(Promise. scala: 64) at play.core. j .HttpExecutionContext$$anon$2. run (HttpExecutioncontext, scala:77) at play.api.libs.streams.Execution$trampoline$.execute(Execution.scala:70) at play.core. j.HttpExecutionContext,execute(HttpExecutionContext.scala:69) at scala. concurrent. impt. CallbackRunnable. executewithvalue(Promise. scala:72) at scala. concurrent. impl. Promise$KeptPromise$Kept. onComplete (Promise.scala:372) at scala. concurrent. impt.Promise$KeptPromise$Kept, onComplete$(Promise,scala:371) scala. concurrent. impl. Promise$KeptPronise$Successful. onComplete(Promise.scala:379) <pod> <containers> _«Logs>
l
Check network connection to your OIDC provider. I saw such an error when my Pod couldn't connect (routing problem) to Keycloak.
btw, try to form your question with additional formatting. it improves reading.
m
That might also be related to not have given the front the needed files (keystore or trustore), so it isn't able to resolve the other information given by the OIDC provider (the information given by the
.well-known/openid-configuration
URL)
And you have all these variables set??
AUTH_OIDC_ENABLED, AUTH_OIDC_CLIENT_ID, AUTH_OIDC_CLIENT_SECRET, AUTH_OIDC_DISCOVERY_URI, AUTH_OIDC_BASE_URL
f
Yes
Can we disable ssl verify in JVM? And also how to add trust store or key store inside JVM
m
To add the truststore inside the JVM you will have to write these following variables in the JAVA_OPTS:
Copy code
-Djavax.net.ssl.trustStore -Djavax.net.ssl.trustStorePassword
f
@microscopic-mechanic-13766 is there a way to disable ssl verify?
m
Why do you want to do that?
f
I think proxy and certs are set in the container but JVM is not picking them. What are the things that I need to set for JVM?
@microscopic-mechanic-13766 in my organisation I need to set up proxy and add some certificates as well, I added those things in my container but looks like JVM is not able to pick those up. Can you please help me how to configure those for the JVM
@big-carpet-38439 @square-activity-64562 @incalculable-ocean-74010 can anyone please help here?Thanks!
I'm able to resolve this by setting proxy for JVM, using JAVA_OPTS env