我是一个使用JBoss的新手,我正在建立一个集群来进行测试。我按照from middleware的说明在使用JBoss JBoss 7.1.6的单个Linux上设置了Linux域集群。我现在正在尝试使用管理控制台将一个web应用程序部署到我的集群,以测试集群是否正常工作。
我已经使用liweinan's cluster demo source code创建了一个简单的hello world web应用程序,它应该显示当前时间。我测试了这个应用程序,它在一个独立的集群上显示正确,但当我测试我的域名集群时,我看到了一个页面,告诉我需要禁用欢迎内容。我做错了什么?是否也需要在从设备上进行配置?
下面是我的应用程序大战中的jboss-web.xml:
<jboss-web>
<context-root>/</context-root>
</jboss-web>在host-master.xml中,域控制器为:
<domain-controller>
<local/>
</domain-controller>在domain.xml文件中,我更新了接口以匹配我机器的地址。我还注释掉了下面的欢迎内容。
<subsystem xmlns="urn:jboss:domain:undertow:4.0">
<buffer-cache name="default"/>
<server name="default-server">
<ajp-listener name="ajp" socket-binding="ajp"/>
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
<host name="default-host" alias="localhost">
<!--<location name="/" handler="welcome-content"/>-->
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
</server>
<servlet-container name="default">
<jsp-config/>
<websockets/>
</servlet-container>
<handlers>
<!--<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>-->
</handlers>
<filters>
<response-header name="server-header" header-name="Server" header-value="JBoss-EAP/7"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
</filters>
</subsystem>在这两个host-lave.xml文件中,我都更新了套接字接口管理端口、接口inet-address,并为服务器添加了一个偏移量。
如有任何帮助或建议,将不胜感激。我已经研究这个问题好几天了,但没有成功。
发布于 2020-09-22 20:42:49
结果发现问题不在我的配置上。当您部署应用程序时,您不能更改名称。我把它从ClusterDemo.war改为ClusterDemo。当我把.war留在名字上时,应用程序运行起来没有任何问题。
https://stackoverflow.com/questions/64009736
复制相似问题