EAP 6 server stopped due to HornetQ Duplicate connection factory

Solution Unverified - Updated -

Issue

We have 2 HornetQ nodes in cluster mode. When the server start, we have the following error :

Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.jboss.exported.NoPrefetchConnectionFactory is already registered

We noticed that the connection factory is duplicated in the standalone.xml :

                   <connection-factory name="RemoteConnectionFactory">
                        <connectors>
                            <connector-ref connector-name="netty"/>
                        </connectors>
                        <entries>
                            <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
                            <entry name="java:jboss/exported/RemoteConnectionFactory"/>
                            <entry name="java:jboss/exported/NoPrefetchConnectionFactory"/>
                            <entry name="java:jboss/exported/jms/NoPrefetchConnectionFactory"/>
                        </entries>
                        <retry-interval>1000</retry-interval>
                        <retry-interval-multiplier>1.5</retry-interval-multiplier>
                        <max-retry-interval>60000</max-retry-interval>
                        <reconnect-attempts>1000</reconnect-attempts>
                    </connection-factory>
                    <connection-factory name="NoPrefetchConnectionFactory">
                        <connectors>
                            <connector-ref connector-name="netty"/>
                        </connectors>
                        <entries>
                            <entry name="java:jboss/exported/NoPrefetchConnectionFactory"/>
                        </entries>
                        <consumer-window-size>0</consumer-window-size>
                    </connection-factory> 

Can you please tell us how it can be duplicated in this file and what is the good configuration ?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content