Analysis and Resolution of deployment conflicts between multiple Netty3-dependent applications on the same JBOSS Server

Source: Internet
Author: User
Tags jboss server

Analysis and Resolution of deployment conflicts between multiple Netty3-dependent applications on the same JBOSS Server

Recently encountered a problem in the project, is to deploy multiple war on the same server of the wildfly-8.1.0, and these war are dependent on netty3, resulting in only one war package successful, after troubleshooting, the discovery is a bug of the jboss server itself (https://issues.jboss.org/browse/IMMUTANT-144), the reason is that the jboss itself for the same "expansion" can only be registered once, And the jboss-beans.xml in netty3 is to provide plug-in service, if you register for multiple scans, DuplicateServiceException is returned.

The specific analysis process is as follows:

Startup exception:

 

Internal Server Error{    "outcome" => "failed",    "result" => undefined,    "failure-description" => "JBAS010839: Operation failed or was rolled back on all servers.",    "rolled-back" => true,    "server-groups" => {"main-server-group" => {"host" => {"master" => {"server-one" => {"response" => {        "outcome" => "failed",        "failure-description" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"wd-web-in.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"wd-web-in.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"wd-web-in.war\"    Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.pojo.\"org.jboss.netty.internal.LoggerConfigurator\".DESCRIBED is already registered"}},        "rolled-back" => true    }}}}}}}
Based on
org.jboss.netty.internal.LoggerConfigurator
Keyword query to Jboss bug single https://issues.jboss.org/browse/IMMUTANT-144

 

The Chinese explanation is "errors occur when both applications are deployed on io. netty/netty"

The solution provided by Jim Crossley below is "Removed the pojo subsystem from standalone. xml. this prevents random jboss-beans.xml files from being discovered/deployed. the netty jar contains one. "Chinese means" from standalone. xml removes pojo subsystem, which prevents any jboss-beans.xml file from being found/deployed, and netty's jar contains ".

Here is a comparison between the Netty3 Jar package and the Netty4 Jar package:

Obviously netty3 has a jboss-beans.xml file, here is a problem, what is the role of jboss-beans.xml in netty3.5?

Check the information that is similar to the plug-in. xml, that is, the plug-in loading, netty3 in the jboss-beans.xml content is as follows:

   
  
 
This is because of the Bug that has been repeatedly registered. This bug is caused by the extension As a result, you can solve from this pojo, you can also directly Delete the jboss-beans.xml of the dependency netty3 Jar package, put the deleted package under the webapp \ WEB-INF \ lib directory

 

The question is, what is the role of this pojo? The official documents are described as follows:

Deploy applications to include the JBoss Microcontainer service and support earlier versions of JBoss application servers, that isOptional. Delete it, and find it under the corresponding profile. Then delete and restart the server. You can deploy the server.

Set Profile

Set deployment on the same logical service node:

Start the service

The role of jboss-deployment-structure.xml: prevents the server from automatically adding some dependencies

The content is as follows:

<jboss-deployment-structure>      <deployment>          <!-- Exclusions allow you to prevent the server from automatically adding some dependencies     -->          <exclusions>              <module name="org.slf4j" />              <module name="org.sl4j.jcl-over-slf4j" />              <module name="org.slf4j.impl" />              <module name="org.jboss.logging.jul-to-slf4j-stub" />              <module name="io.netty" />              <module name="org.jboss.netty" />          </exclusions>      </deployment>  </jboss-deployment-structure>  
 
  
 
This prevents repeated conflicts with Jboss caused by Netty referenced in the application.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.