我的一位同事想自动化其JBOSS(JBOSS EAP v7.4.0)部署。
到目前为止,他们手动遵循的过程是:
- 关闭JBOSS完全
- 复制新的
.war
文件,目录>目录
- 由目录重新启动服务器。执行
andalone.sh
此过程,尽管有点“转储”,但在没有问题的情况下设法部署了该应用程序。
另一方面,我尝试使用JBOSS的自动重新发送功能,因此我只是将新的.war文件粘贴在/jboss-eap-7.4.4.0/standalone/dandalone/deployments
Directory下。
JBOSS确实拾取了新的.war,并自动启动重新部署过程。
从server.log文件中,首先,该应用程序已成功部署。
但是,当我尝试从浏览器访问它时,它会崩溃并给出代码500响应(请参阅帖子末尾的错误日志)。预期的行为将是将我重新部署到KeyCloak以登录。
如果我尝试手动 undeploy
和部署
jboss.cli
war。
有任何提示吗?
我无法弄清楚该错误是在服务器还是应用程序端。
为了使应用程序正确部署,应该需要完整的JBOSS服务器重新启动,这似乎有些奇怪。
先感谢您。
服务器日志:
2022-06-14 17:22:25,850 warn [org.apache.jcp.xml.dsig.internal.dom.domReference](默认任务1)输入字节对摘要操作的输入字节为无效。这可能是由于参考URI或其转换的问题。
2022-06-14 17:22:25,879错误[io.undertow.request](默认任务1)ut005023:异常处理请求到 /myApplication:java.lang.runtimeexception:无法创建身份验证请求。
at [email protected]//org.keycloak.adapters.saml.AbstractInitiateLogin 。
at [email  prectioned] 。
at [email protected]//org.keycloak.adapters.saml.elytron .Keycloakhttpserverauthenticationmechanism.evaluaterequest(keycloakhttpserverauthenticationmechanism.java:125)
at [email protected]//org.wildfly.security.http.util .setMechanisminformationMechanismFactory $ 1.EVALUATEREQUEST(setMechanisminisminimenforationMechanismFactory.java:119)
[email  prectioned] //org.wildfly.security.security.http.util .socketDressCallbackServerMechanismFactory $ 1.EvaluatereQuest(socketAddressCallbackServerServerMechanismFactory.java:82)
at [email protected]//org.wildfly.security.auth.server 。
at [email  procearted] //org.wildfly.security.security.http.http.httpauthenticator $ authenticationExchange.authenticate(httpauthenticator.java:326)
at [email protected]//org.wildfly.security.http.HttpAuthenticator $ AuthenticationExchange.Access $ 800(httpauthenticator.java:301)
at [email protected]//org.wildfly.security.http.HttpAuthenticator .authenticate(httpauthenticator.java:94)
atorg.wildfly.security.elytron-web.undertow-server@1.9.0.final-redhat-00001//org.wildfly.elytron.web.undertow.sertow.server.securitycontextimpl.authentimpl.authenticate(secusecontextimpl.java:99)
at org.wildfly.security.elytron-web.undertow-server-servlet@1.9.0.Final-redhat-00001//org.wildfly.elytron.web.undertow.server.servlet.ServletSecurityContextImpl.authenticate(ServletSecurityContextImpl.java: 115)
at [email protected]//io.undertow.servlet.handlers.security 。
at [email protected]//io.undertow.server.handlers.DisableCacheHandler 。
在 //io.undertow.server.handlers.predicatehandler 。
at [email protected]//io.undertow.security.handlers.AuthenticationConstraintHandler 。
at [email protected]//io.undertow.security.handlers.AbstractConfidentialityHandler 。
at [email protected]//io.undertow.servlet.handlers.security 。
at [email protected]//io.undertow.servlet.handlers.security 。
at [email protected]//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler 。
at org.wildfly.security.elytron-web.undertow-server-servlet@1.9.0.Final-redhat-00001//org.wildfly.elytron.web.undertow.server.servlet.CleanUpHandler.handleRequest(CleanUpHandler.java: 38)
at [email protected]//io.undertow.server.handlers.PredicateHandler 。
at [email protected]//org.wildfly.extension.undertow.security 。
at [email protected]//io.undertow.server.handlers.PredicateHandler 。
at [email protected]//org.wildfly.extension.undertow.deployment 。
at [email protected]//io.undertow.servlet.handlers.SendErrorPageHandler 。
at [email protected]//io.undertow.server.handlers.PredicateHandler 。
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler 。
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler 。
at [email  preconted] //io.undertow.servlet.handlers.servletinitialhandler $ 2.CALL(ServletinitialHandler.java:133)
at [email 受保护] //io.undertow.servlet.handlers.servletinitialhandler $ 2.CALL(ServletinitialHandler.java:130)
at [email  prected] //io.undertow.servlet.core.servletrequestContextThreadSetupaction $ 1.CALL(ServletRequestContextThreadSetupaction.java:48)
at [email protected]//io.undertow.servlet.core.ContextClassLoaderSetupAction $ 1.CALL(ContextClassLoaderSetupaction.java:43)
at [email protected]//org.wildfly.extension.undertow.deployment 。
at [email protected]//org.wildfly.extension.undertow.deployment 。
at [email protected]//org.wildfly.extension.undertow.deployment 。
at [email protected]//org.wildfly.extension.undertow.deployment 。
at [email protected]//org.wildfly.extension.undertow.deployment 。
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler .disPatchRequest(servletinitialhandler.java:249)
at [email  prected] //io.undertow.servlet.handlers.servletinitialhandler .ACCESS $ 000(Servletinitialhandler.java:78)
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler $ 1.HandLereQuest(Servletinitialhandler.java:99)
at [email protected]//io.undertow.server.Connectors.executeRootHandler (connectors.java:387)
at [email protected]//io.undertow.server.HttpServerExchange$1.运行(httpserverexchange.java:841)
at [email  preconted] //org.jboss.threads.contextclassloadersavingrunnable.run (contextClassLoadersavingRunnable.java:35)
at [email  preconted] //org.jboss.threads.enhancedqueueexecutor.saferun (Enhancedqueueeexecutor.java:1990)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody 。
在 //org.jboss.threads.enhancedqueueexecutor$ threadbody 。
at [email protected]//org.xnio.XnioWorker$WorkerThreadFactory$1$1 .lun(xnioworker.java:1280)
在java.base/java.lang.thread.run(thread.java:834)
Caused by: org.apache.xml.serializer.utils.WrappedRuntimeException: class org.apache.xml.serializer.ToXMLSAXHandler cannot be cast to class org.apache.xml.serializer.SerializationHandler (org.apache.xml.serializer .toxmlSaxHandler在加载程序的未命名模块中
在deployment.myapplication.war // org.apache.xml.serializer.serializerfactory.getSerialializer(serializerfactory.java:179)
在deployment.myapplication.war // org.apache.xalan.transformer.transformerIndentityImpl.CreateResultContContentHandler(Transformererindentityimpl.java:261)
在deployment.myapplication.war // org.apache.xalan.transformer.transformerIndentityImpl.Transform(TransformerIndentityImpl.java:330)
//org.keycloak.saml.common.util 。
//org.keycloak.saml.common.util 。
at //org.keycloak.saml.basesaml2bindingbuilder.buildhtmlpostresponse (basesaml2bindingbuilder.java:307)
at [email  preconted] //org.keycloak.adapters.saml.samlutil .sendsaml(samlutil.java:45)
at [email  prection] //org.keycloak.adapters.saml.profile 。
at [email 受保护] //org.keycloak.adapters.saml.abstractinitiatelogin .challenge(AbstractInitiateLogin.java:61)
A colleague of mine wants to automate their JBoss (JBoss EAP v7.4.0) deployments.
So far the process they followed manually was:
- Shutdown Jboss entirely
- Copy the new
.war
file under /jboss-eap-7.4.0/standalone/deployments
directory
- Restart the server by executing
standalone.sh
This process, although a bit 'dump', manages to deploy the application with no issues.
I on the other hand, tried to make use of JBoss's auto-redeployment feature, so I simply pasted the new .war file under the /jboss-eap-7.4.0/standalone/deployments
directory.
JBoss indeed picks up the new .war and automatically starts the redeployment process.
From the server.log file, it seems at first that the application deploys successfully.
However when I try to access it from my browser, it crashes and gives a code 500 response (See error logs at the end of the post). The expected behavior would be to redeploy me to keycloak in order to login.
The exact same error occurs if I try to manually undeploy
and deploy
the .war from the jboss.cli
.
Any hints on the issue?
I can't figure out if the error is on the server or the application side.
It seems a bit odd that it should require a full JBoss server restart in order for the application to be properly deployed.
Thank you in advance.
Server logs:
2022-06-14 17:22:25,850 WARN [org.apache.jcp.xml.dsig.internal.dom.DOMReference] (default task-1) The input bytes to the digest operation are null. This may be due to a problem with the Reference URI or its Transforms.
2022-06-14 17:22:25,879 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /myapplication: java.lang.RuntimeException: Could not create authentication request.
at [email protected]//org.keycloak.adapters.saml.AbstractInitiateLogin.challenge(AbstractInitiateLogin.java:64)
at [email protected]//org.keycloak.adapters.saml.elytron.ElytronHttpFacade.noAuthenticationInProgress(ElytronHttpFacade.java:123)
at [email protected]//org.keycloak.adapters.saml.elytron.KeycloakHttpServerAuthenticationMechanism.evaluateRequest(KeycloakHttpServerAuthenticationMechanism.java:125)
at [email protected]//org.wildfly.security.http.util.SetMechanismInformationMechanismFactory$1.evaluateRequest(SetMechanismInformationMechanismFactory.java:119)
at [email protected]//org.wildfly.security.http.util.SocketAddressCallbackServerMechanismFactory$1.evaluateRequest(SocketAddressCallbackServerMechanismFactory.java:82)
at [email protected]//org.wildfly.security.auth.server.SecurityIdentityServerMechanismFactory$1.evaluateRequest(SecurityIdentityServerMechanismFactory.java:85)
at [email protected]//org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:326)
at [email protected]//org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$800(HttpAuthenticator.java:301)
at [email protected]//org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:94)
at org.wildfly.security.elytron-web.undertow-server@1.9.0.Final-redhat-00001//org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:99)
at org.wildfly.security.elytron-web.undertow-server-servlet@1.9.0.Final-redhat-00001//org.wildfly.elytron.web.undertow.server.servlet.ServletSecurityContextImpl.authenticate(ServletSecurityContextImpl.java:115)
at [email protected]//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:55)
at [email protected]//io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at [email protected]//io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
at [email protected]//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at [email protected]//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at [email protected]//io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
at [email protected]//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at org.wildfly.security.elytron-web.undertow-server-servlet@1.9.0.Final-redhat-00001//org.wildfly.elytron.web.undertow.server.servlet.CleanUpHandler.handleRequest(CleanUpHandler.java:38)
at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at [email protected]//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at [email protected]//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
at [email protected]//io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
at [email protected]//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
at [email protected]//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at [email protected]//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
at [email protected]//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1530)
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
at [email protected]//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
at [email protected]//io.undertow.server.Connectors.executeRootHandler(Connectors.java:387)
at [email protected]//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:841)
at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at [email protected]//org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.xml.serializer.utils.WrappedRuntimeException: class org.apache.xml.serializer.ToXMLSAXHandler cannot be cast to class org.apache.xml.serializer.SerializationHandler (org.apache.xml.serializer.ToXMLSAXHandler is in unnamed module of loader 'deployment.myapplication.war' @15a25903; org.apache.xml.serializer.SerializationHandler is in unnamed module of loader 'deployment.myapplication.war' @68ae4310)
at deployment.myapplication.war//org.apache.xml.serializer.SerializerFactory.getSerializer(SerializerFactory.java:179)
at deployment.myapplication.war//org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:261)
at deployment.myapplication.war//org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:330)
at [email protected]//org.keycloak.saml.common.util.DocumentUtil.getNodeAsString(DocumentUtil.java:228)
at [email protected]//org.keycloak.saml.common.util.DocumentUtil.getDocumentAsString(DocumentUtil.java:207)
at [email protected]//org.keycloak.saml.BaseSAML2BindingBuilder.getSAMLResponse(BaseSAML2BindingBuilder.java:311)
at [email protected]//org.keycloak.saml.BaseSAML2BindingBuilder.buildHtmlPostResponse(BaseSAML2BindingBuilder.java:307)
at [email protected]//org.keycloak.saml.BaseSAML2BindingBuilder$BasePostBindingBuilder.getHtmlRequest(BaseSAML2BindingBuilder.java:172)
at [email protected]//org.keycloak.adapters.saml.SamlUtil.sendSaml(SamlUtil.java:45)
at [email protected]//org.keycloak.adapters.saml.profile.AbstractSamlAuthenticationHandler$3.sendAuthnRequest(AbstractSamlAuthenticationHandler.java:622)
at [email protected]//org.keycloak.adapters.saml.AbstractInitiateLogin.challenge(AbstractInitiateLogin.java:61)
发布评论