<div dir="ltr">thanks Marek,<div><br></div><div>it was coming from my provider jar depending on another jar that has a bean.xml in it. don't know why but when i take off the bean.xml everything works fine and when i put it back -used to load some CDI stuff at runtime- it does not work anymore ..</div><div><br></div><div>thanks anyway we have decided to do things slightly differently.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 5:06 PM, Marek Posolda <span dir="ltr"><<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi,<br>
<br>
another possible workaround is to add realm public key directly to
configuration of your adapter. In that case it doesn't need to be
downloaded remotely from Keycloak. Something like this:
<a href="https://github.com/keycloak/keycloak/blob/master/examples/demo-template/customer-app/src/main/webapp/WEB-INF/keycloak.json#L4" target="_blank">https://github.com/keycloak/keycloak/blob/master/examples/demo-template/customer-app/src/main/webapp/WEB-INF/keycloak.json#L4</a><br>
<br>
You can also try to update to newest 1.1.0.Beta2, which has some
additional fixes (or wait for 1.1.0.Final which is going to be
released quite soon).<br>
<br>
Also are there any other errors in server log? Since it returns
"status 500" from keycloak server, I would suspect there will be
some error in keycloak server log too?<br>
<br>
Marek<div><div class="h5"><br>
<br>
On 21.1.2015 14:38, Alexander Chriztopher wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hi Guys,
<div><br>
</div>
<div>Here and then we are getting this error on a server that
used to work nicely and without any apparent reason :</div>
<div><br>
</div>
<div>
<div>14:33:58,380 ERROR [io.undertow.request]
[handleFirstRequest] (default task-2) UT005022: Exception
generating error page /<a href="http://error.cv" target="_blank">error.cv</a>:
java.lang.RuntimeException: java.lang.RuntimeException:
Unable to resolve realm public key remotely, status = 500</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:408)
[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:319)
[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:263)
[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.Connectors.executeRootHandler(Connectors.java:177)
[undertow-core-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727)
[undertow-core-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_11]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_11]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_11]</div>
<div>Caused by: java.lang.RuntimeException: Unable to resolve
realm public key remotely, status = 500</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.adapters.AdapterDeploymentContext.resolveRealmKey(AdapterDeploymentContext.java:107)
[keycloak-adapter-core-1.1.0.Beta1.jar:1.1.0.Beta1]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.adapters.AdapterDeploymentContext.resolveDeployment(AdapterDeploymentContext.java:82)
[keycloak-adapter-core-1.1.0.Beta1.jar:1.1.0.Beta1]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:61)
[keycloak-undertow-adapter-1.1.0.Beta1.jar:1.1.0.Beta1]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
[undertow-core-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
[undertow-core-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:229)
[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:172)
[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:402)
[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]</div>
</div>
<div><br>
</div>
<div>This happens on dev servers and we don't know what is
causing this as it happens very rarely and the only workout
found till now is to restart with a fresh install.</div>
<div><br>
</div>
<div>We are using Wildfly with keycloak war.</div>
<div><br>
</div>
<div>Thanks for any help.</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
keycloak-user mailing list
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div></div>