将Jboss6迁移到WildFly8.2
在wildlfy8.2中处理https keystone连接。使用http://blog.eisele.net/2015/01/ssl-with-wildfly-8-and-undertow.html在standalone-full.xml conf上配置我的应用程序之后。我能够在我的应用程序上访问http和https我必须单独访问https阻止http。在web.xml中添加 security-constraint 后,我可以重定向到https。但我不希望在我的新版本中包含web.xml中的任何内容,这会影响我的旧jboss用户。
在某种情况下,有人使用jboss6应用程序而没有SSL密钥库配置,并且人们在Https中使用相同的应用程序。 较旧版本的jboss允许在server.xml本身中配置http和https。在wildfly中,我们必须编辑应用程序war文件而不是服务器配置文件。
注意:我在https://developer.jboss.org/thread/253008?_sscc=t中解决了同一问题。根据指示进行了更改。但它不起作用,我们使用的是standalone-full.xml而不是standalone.xml。
进行更改后,我收到了网络服务端口错误:
jboss.deployment.subunit."XXX.ear"."XXXEJB3.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "XXXEJB3.jar" of deployment "XXX.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
Caused by: java.lang.IllegalStateException: JBAS017350: Could not find the port number listening for protocol HTTP/1.1
at org.wildfly.extension.undertow.WebServerService.getPort(WebServerService.java:67)
at org.jboss.as.webservices.config.WebServerInfoImpl.getPort(WebServerInfoImpl.java:36)
答案 0 :(得分:2)
对于Http bloacking和Https,可以对standalone-full.xml(即自定义服务器)或standalone.xml进行如下更改
1:在消息传递中 - hornetq-server子系统连接器将http更改为https
<http-connector name="http-connector" socket-binding="https">
<http-connector name="http-connector-throughput" socket-binding="https">
2:在进行子系统更改
<http-listener name="default" socket-binding="http"/>
到
<https-listener name="default-ssl" socket-binding="https" security-realm="UndertowRealm"/>
注意:https-listener name default-ssl 在消息传递子系统http-acceptor和远程子系统http-connector
中使用此名称3:发送消息 - hornetq-server子系统http-acceptor和远程子系统http-connector的connector-ref为https-listener name
<subsystem xmlns="urn:jboss:domain:messaging:2.0">....
<http-acceptor http-listener="default-ssl" name="http-acceptor"/>
<http-acceptor http-listener="default-ssl" name="http-acceptor-throughput">...</subsystem>
<subsystem xmlns="urn:jboss:domain:remoting:2.0">....
<http-connector name="http-remoting-connector" connector-ref="default-ssl" security-realm="ApplicationRealm"/>....</subsystem>
出于错误:将modify-wsdl-address添加到 true ,将wsdl-port添加到 80 ,而不是https工作阻止http。
<subsystem xmlns="urn:jboss:domain:webservices:1.2">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
<wsdl-port>80</wsdl-port>
<endpoint-config name="Standard-Endpoint-Config"/>
<endpoint-config name="Recording-Endpoint-Config">
<pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
<handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
</pre-handler-chain>
</endpoint-config>
<client-config name="Standard-Client-Config"/>
</subsystem>