7 Replies Latest reply on Nov 18, 2015 1:09 AM by sridhar thiyagarajan

    HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException

    sridhar thiyagarajan Novice

      Hello,

       

      I have migrated an EAR application from JBoss 6.1.0 AS to Wildfly-8.2.0.Final. I am using default Hornet-Q resource adapter and standalone-full-ha.xml configuration file to start the application server in LINUX. I am getting many times the below error in server.log while starting the application server (Wildfly-8.2.0.Final) and application server gets failed to start.

       

      ERROR [org.hornetq.core.client] (Thread-1 (HornetQ-server-HornetQServerImpl::serverUUID=26d1fe73-890b-11e5-8284-6f0a7df0b6c3-978081450)) HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException

          at sun.nio.ch.Net.checkAddress(Net.java:123) [rt.jar:1.8.0_51]

          at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622) [rt.jar:1.8.0_51]

          at io.netty.channel.socket.nio.NioSocketChannel.doConnect(NioSocketChannel.java:176) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:169) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.DefaultChannelPipeline$HeadHandler.connect(DefaultChannelPipeline.java:1008) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:495) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:480) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.ChannelOutboundHandlerAdapter.connect(ChannelOutboundHandlerAdapter.java:47) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.CombinedChannelDuplexHandler.connect(CombinedChannelDuplexHandler.java:168) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:495) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:480) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.ChannelDuplexHandler.connect(ChannelDuplexHandler.java:50) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:495) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:480) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:465) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:847) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:199) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.bootstrap.Bootstrap$2.run(Bootstrap.java:165) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [netty-all-4.0.15.Final.jar:4.0.15.Final]

          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]


      I am using the below interface definitions in standalone-full-ha.xml.

       

      <interfaces>

              <interface name="management">       

                  <any-address/>

              </interface>

              <interface name="public">           

                  <any-address/>           

              </interface>

              <!-- TODO - only show this if the jacorb subsystem is added  -->

              <interface name="unsecure">

                  <!--

                    ~  Used for IIOP sockets in the standard configuration.

                    ~                  To secure JacORB you need to setup SSL

                    -->

                  <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>

              </interface>

      </interfaces>


      Can anyone please help me about why this error occurs and how to resolve the same. Many thanks.

        • 1. Re: HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException
          Justin Bertram Master

          Can you attach your standalone-full.xml?

           

          In general, I would say that you should try to bind your server to a specific IP address rather than the <any-address/> (which is basically 0.0.0.0 as I understand).

          1 of 1 people found this helpful
          • 2. Re: HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException
            sridhar thiyagarajan Novice

            Many thanks for the response.. Justin. I tried binding specific binding but the same problem. I also tried the solution given in the link http://stackoverflow.com/questions/28913520/required-ports-for-jms-using-hornetq-jboss-to-expose-on-docker-container but I am still facing the same problem. Getting HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException continuously.

             

            I am not aware of uploading a file option and hence, copied the content of standalone-full-ha.xml. Many thanks for the help.. Justin and awaiting your valuable response.

             

            In the below XML, application specific configurations are surrounded by start (<!-- [BEGIN] Wildfly 8 changes) and end (<!-- [END] Wildfly 8 changes -->) comments.

             

            <?xml version='1.0' encoding='UTF-8'?>

             

            <server xmlns="urn:jboss:domain:2.2">

                <extensions>

                    <extension module="org.jboss.as.clustering.infinispan"/>

                    <extension module="org.jboss.as.clustering.jgroups"/>

                    <extension module="org.jboss.as.connector"/>

                    <extension module="org.jboss.as.deployment-scanner"/>

                    <extension module="org.jboss.as.ee"/>

                    <extension module="org.jboss.as.ejb3"/>

                    <extension module="org.jboss.as.jacorb"/>

                    <extension module="org.jboss.as.jaxrs"/>

                    <extension module="org.jboss.as.jdr"/>

                    <extension module="org.jboss.as.jmx"/>

                    <extension module="org.jboss.as.jpa"/>

                    <extension module="org.jboss.as.jsf"/>

                    <extension module="org.jboss.as.jsr77"/>

                    <extension module="org.jboss.as.logging"/>

                    <extension module="org.jboss.as.mail"/>

                    <extension module="org.jboss.as.messaging"/>

                    <extension module="org.jboss.as.modcluster"/>

                    <extension module="org.jboss.as.naming"/>

                    <extension module="org.jboss.as.pojo"/>

                    <extension module="org.jboss.as.remoting"/>

                    <extension module="org.jboss.as.sar"/>

                    <extension module="org.jboss.as.security"/>

                    <extension module="org.jboss.as.transactions"/>

                    <extension module="org.jboss.as.webservices"/>

                    <extension module="org.jboss.as.weld"/>

                    <extension module="org.wildfly.extension.batch"/>

                    <extension module="org.wildfly.extension.io"/>

                    <extension module="org.wildfly.extension.undertow"/>

                </extensions>

                <management>

                    <security-realms>

                        <security-realm name="ManagementRealm">

                            <authentication>

                                <local default-user="$local" skip-group-loading="true"/>

                                <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                            </authentication>

                            <authorization map-groups-to-roles="false">

                                <properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>

                            </authorization>

                        </security-realm>

                        <security-realm name="ApplicationRealm">

                            <authentication>

                                <local default-user="$local" allowed-users="*" skip-group-loading="true"/>

                                <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>

                            </authentication>

                            <authorization>

                                <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>

                            </authorization>

                        </security-realm>

                        <!-- [BEGIN] Wildfly 8 changes - SSL - configured security-realm to utilize key store file while launching with https protocol -->

                        <security-realm name="UndertowRealm">

                            <server-identities>

                                <ssl>

                                    <keystore path="${jboss.modules.dir}/configuration/main/ssl/${keystore_filename}" keystore-password="${keystore_password}" alias="${keystore_alias}" key-password="${keystore_password}"/>

                                </ssl>

                            </server-identities>

                        </security-realm>

                           <!-- [END] Wildfly 8 changes -->          

                    </security-realms>

                    <audit-log>

                        <formatters>

                            <json-formatter name="json-formatter"/>

                        </formatters>

                        <handlers>

                            <file-handler name="file" formatter="json-formatter" relative-to="jboss.server.data.dir" path="audit-log.log"/>

                        </handlers>

                        <logger log-boot="true" log-read-only="false" enabled="false">

                            <handlers>

                                <handler name="file"/>

                            </handlers>

                        </logger>

                    </audit-log>

                    <management-interfaces>

                        <http-interface security-realm="ManagementRealm" http-upgrade-enabled="true">

                            <socket-binding http="management-http"/>

                        </http-interface>

                    </management-interfaces>

                    <access-control provider="simple">

                        <role-mapping>

                            <role name="SuperUser">

                                <include>

                                    <user name="$local"/>

                                </include>

                            </role>

                        </role-mapping>

                    </access-control>

                </management>

                <profile>

                    <subsystem xmlns="urn:jboss:domain:logging:2.0">

                        <!-- [BEGIN] Wildfly 8 changes - excluding server logging dependencies and enabling deployment logging configuration -->

                        <add-logging-api-dependencies value="false"/>

                        <use-deployment-logging-config value="true"/>

                        <!-- [END] Wildfly 8 changes -->

                        <console-handler name="CONSOLE">

                            <level name="INFO"/>

                            <formatter>

                                <named-formatter name="COLOR-PATTERN"/>

                            </formatter>

                        </console-handler>

                        <periodic-rotating-file-handler name="FILE" autoflush="true">

                            <formatter>

                                <named-formatter name="PATTERN"/>

                            </formatter>

                            <file relative-to="jboss.server.log.dir" path="server.log"/>

                            <suffix value=".yyyy-MM-dd"/>

                            <append value="true"/>

                        </periodic-rotating-file-handler>

                        <logger category="com.arjuna">

                            <level name="WARN"/>

                        </logger>

                        <logger category="org.apache.tomcat.util.modeler">

                            <level name="WARN"/>

                        </logger>

                        <logger category="org.jboss.as.config">

                            <level name="DEBUG"/>

                        </logger>

                        <logger category="sun.rmi">

                            <level name="WARN"/>

                        </logger>

                        <logger category="jacorb">

                            <level name="WARN"/>

                        </logger>

                        <logger category="jacorb.config">

                            <level name="ERROR"/>

                        </logger>

                        <root-logger>

                            <level name="INFO"/>

                            <handlers>

                                <handler name="CONSOLE"/>

                                <handler name="FILE"/>

                            </handlers>

                        </root-logger>

                        <formatter name="PATTERN">

                            <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                        </formatter>

                        <formatter name="COLOR-PATTERN">

                            <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                        </formatter>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:batch:1.0">

                        <job-repository>

                            <in-memory/>

                        </job-repository>

                        <thread-pool>

                            <max-threads count="10"/>

                            <keepalive-time time="30" unit="seconds"/>

                        </thread-pool>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:datasources:2.0">

                        <!-- [BEGIN] Wildfly 8 changes - Datasource configuration is defined below -->

                        <datasources>

                            <datasource jta="true" jndi-name="java:/SybaseDB" pool-name="SybaseDB" enabled="true" use-java-context="true" spy="false" use-ccm="true">

                                <connection-url>${db.url}</connection-url>

                                <driver-class>${db.driver}</driver-class>

                                <connection-property name="HOSTNAME">${name}</connection-property>

                                <connection-property name="SQLINITSTRING">set quoted_identifier,forceplan off</connection-property>

                                <connection-property name="LANGUAGE">us_english</connection-property>

                                <connection-property name="CHARSET">iso_1</connection-property>

                                <connection-property name="APPLICATIONNAME">EAR_application</connection-property>

                                <connection-property name="IS_CLOSED_TEST">select 1</connection-property>

                                <connection-property name="PACKETSIZE">1024</connection-property>

                                <driver>SybaseDB</driver>

                                <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                                <pool>

                                    <min-pool-size>5</min-pool-size>

                                    <initial-pool-size>5</initial-pool-size>

                                    <max-pool-size>200</max-pool-size>

                                    <prefill>false</prefill>

                                    <use-strict-min>false</use-strict-min>

                                    <flush-strategy>FailingConnectionOnly</flush-strategy>

                                </pool>

                                <security>

                                    <security-domain>EncryptDBPassword</security-domain>

                                </security>

                                <validation>

                                    <check-valid-connection-sql>select 1</check-valid-connection-sql>

                                    <use-fast-fail>true</use-fast-fail>

                                </validation>

                                <timeout>

                                    <blocking-timeout-millis>15000</blocking-timeout-millis>

                                    <idle-timeout-minutes>30</idle-timeout-minutes>

                                </timeout>

                                <statement>

                                    <track-statements>false</track-statements>

                                </statement>

                            </datasource>

                            <drivers>

                                <driver name="SybaseDB" module="jdbc.jconn4"/>

                            </drivers>

                        </datasources>

                        <!-- [END] Wildfly 8 changes -->

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">

                        <!-- [BEGIN] Wildfly 8 changes - "auto-deploy-exploded" is set to TRUE to deploy exploded deployment files (WAR, EAR etc)-->

                        <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" auto-deploy-exploded="true" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>

                        <!-- [END] Wildfly 8 changes -->

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:ee:2.0">

                        <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>

                        <concurrent>

                            <context-services>

                                <context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default" use-transaction-setup-provider="true"/>

                            </context-services>

                            <managed-executor-services>

                                <managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" core-threads="5" max-threads="25" keepalive-time="5000"/>

                            </managed-executor-services>

                            <managed-scheduled-executor-services>

                                <managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-threshold="60000" core-threads="2" keepalive-time="3000"/>

                            </managed-scheduled-executor-services>

                            <managed-thread-factories>

                                <managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>

                            </managed-thread-factories>

                        </concurrent>

                        <!-- [BEGIN] Wildfly 8 changes - Datasource with JNDI name "java:SybaseDB" is bounded as default datasource -->

                        <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:/SybaseDB" jms-connection-factory="java:jboss/DefaultJMSConnectionFactory" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>

                        <!-- [END] Wildfly 8 changes -->

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:ejb3:2.0">

                        <session-bean>

                            <stateful default-access-timeout="5000" cache-ref="distributable" passivation-disabled-cache-ref="simple"/>

                            <singleton default-access-timeout="5000"/>

                        </session-bean>

                        <mdb>

                            <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:hornetq-ra.rar}"/>

                            <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

                        </mdb>

                        <pools>

                            <bean-instance-pools>

                                <!-- A sample strict max pool configuration -->

                                <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                                <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                            </bean-instance-pools>

                        </pools>

                        <caches>

                            <cache name="simple"/>

                            <cache name="distributable" aliases="passivating clustered" passivation-store-ref="infinispan"/>

                        </caches>

                        <passivation-stores>

                            <passivation-store name="infinispan" cache-container="ejb" max-size="10000"/>

                        </passivation-stores>

                        <async thread-pool-name="default"/>

                        <!-- [BEGIN] Wildfly 8 changes - "EJB-timer-store" database datastore utilizing "java:/SybaseDB" datasource is created to save EJB3 timer service data in database -->

                        <timer-service thread-pool-name="default" default-data-store="EJB-timer-store">

                            <data-stores>

                                <file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>

                                <database-data-store name="EJB-timer-store" database="sybase" datasource-jndi-name="java:/SybaseDB" partition=""/>

                            </data-stores>

                        </timer-service>

                        <!-- [END] Wildfly 8 changes -->

                        <remote connector-ref="http-remoting-connector" thread-pool-name="default"/>

                        <thread-pools>

                            <thread-pool name="default">

                                <max-threads count="10"/>

                                <keepalive-time time="100" unit="milliseconds"/>

                            </thread-pool>

                        </thread-pools>

                        <iiop enable-by-default="false" use-qualified-name="false"/>

                        <default-security-domain value="other"/>

                        <default-missing-method-permissions-deny-access value="true"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:io:1.1">

                        <worker name="default"/>

                        <buffer-pool name="default"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:infinispan:2.0">

                        <cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server">

                            <transport lock-timeout="60000"/>

                            <replicated-cache name="default" mode="SYNC" batching="true">

                                <locking isolation="REPEATABLE_READ"/>

                            </replicated-cache>

                        </cache-container>

                        <cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan">

                            <transport lock-timeout="60000"/>

                            <distributed-cache name="dist" mode="ASYNC" batching="true" l1-lifespan="0" owners="2">

                                <file-store/>

                            </distributed-cache>

                        </cache-container>

                        <cache-container name="ejb" aliases="sfsb" default-cache="dist" module="org.wildfly.clustering.ejb.infinispan">

                            <transport lock-timeout="60000"/>

                            <distributed-cache name="dist" mode="ASYNC" batching="true" l1-lifespan="0" owners="2">

                                <file-store/>

                            </distributed-cache>

                        </cache-container>

                        <cache-container name="hibernate" default-cache="local-query" module="org.hibernate">

                            <transport lock-timeout="60000"/>

                            <local-cache name="local-query">

                                <transaction mode="NONE"/>

                                <eviction strategy="LRU" max-entries="10000"/>

                                <expiration max-idle="100000"/>

                            </local-cache>

                            <invalidation-cache name="entity" mode="SYNC">

                                <transaction mode="NON_XA"/>

                                <eviction strategy="LRU" max-entries="10000"/>

                                <expiration max-idle="100000"/>

                            </invalidation-cache>

                            <replicated-cache name="timestamps" mode="ASYNC">

                                <transaction mode="NONE"/>

                                <eviction strategy="NONE"/>

                            </replicated-cache>

                        </cache-container>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jacorb:1.3">

                        <orb socket-binding="jacorb" ssl-socket-binding="jacorb-ssl">

                            <initializers transactions="spec" security="identity"/>

                        </orb>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:jca:2.0">

                        <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>

                        <bean-validation enabled="true"/>

                        <default-workmanager>

                            <short-running-threads>

                                <core-threads count="50"/>

                                <queue-length count="50"/>

                                <max-threads count="50"/>

                                <keepalive-time time="10" unit="seconds"/>

                            </short-running-threads>

                            <long-running-threads>

                                <core-threads count="50"/>

                                <queue-length count="50"/>

                                <max-threads count="50"/>

                                <keepalive-time time="10" unit="seconds"/>

                            </long-running-threads>

                        </default-workmanager>

                        <cached-connection-manager/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:jgroups:2.0" default-stack="udp">

                        <stack name="udp">

                            <transport type="UDP" socket-binding="jgroups-udp"/>

                            <protocol type="PING"/>

                            <protocol type="MERGE3"/>

                            <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>

                            <protocol type="FD_ALL"/>

                            <protocol type="VERIFY_SUSPECT"/>

                            <protocol type="pbcast.NAKACK2"/>

                            <protocol type="UNICAST3"/>

                            <protocol type="pbcast.STABLE"/>

                            <protocol type="pbcast.GMS"/>

                            <protocol type="UFC"/>

                            <protocol type="MFC"/>

                            <protocol type="FRAG2"/>

                            <protocol type="RSVP"/>

                        </stack>

                        <stack name="tcp">

                            <transport type="TCP" socket-binding="jgroups-tcp"/>

                            <protocol type="MPING" socket-binding="jgroups-mping"/>

                            <protocol type="MERGE2"/>

                            <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>

                            <protocol type="FD"/>

                            <protocol type="VERIFY_SUSPECT"/>

                            <protocol type="pbcast.NAKACK2"/>

                            <protocol type="UNICAST3"/>

                            <protocol type="pbcast.STABLE"/>

                            <protocol type="pbcast.GMS"/>

                            <protocol type="MFC"/>

                            <protocol type="FRAG2"/>

                            <protocol type="RSVP"/>

                        </stack>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jmx:1.3">

                        <expose-resolved-model/>

                        <expose-expression-model/>

                        <remoting-connector/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jpa:1.1">

                        <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:jsf:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:mail:2.0">

                        <mail-session name="default" jndi-name="java:jboss/mail/Default">

                            <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                        </mail-session>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:messaging:2.0">

                        <hornetq-server>

                            <cluster-password>${jboss.messaging.cluster.password:CHANGE ME!!}</cluster-password>

                            <journal-file-size>102400</journal-file-size>

                            <!-- [BEGIN] Wildfly 8 changes - JMS configurations - Set the ttl explicitly to -1 so that connection lives forever -->

                            <connection-ttl-override>-1</connection-ttl-override>

                            <security-enabled>false</security-enabled>

                            <!-- [END] Wildfly 8 changes -->

                            <connectors>

                                <http-connector name="http-connector" socket-binding="http">

                                    <param key="http-upgrade-endpoint" value="http-acceptor"/>

                                </http-connector>

                                <http-connector name="http-connector-throughput" socket-binding="http">

                                    <param key="http-upgrade-endpoint" value="http-acceptor-throughput"/>

                                    <param key="batch-delay" value="50"/>

                                </http-connector>

                                <in-vm-connector name="in-vm" server-id="0"/>

                            </connectors>

                            <acceptors>

                                <http-acceptor name="http-acceptor" http-listener="default"/>

                                <http-acceptor name="http-acceptor-throughput" http-listener="default">

                                    <param key="batch-delay" value="50"/>

                                    <param key="direct-deliver" value="false"/>

                                </http-acceptor>

                                <in-vm-acceptor name="in-vm" server-id="0"/>

                            </acceptors>

                            <broadcast-groups>

                                <broadcast-group name="bg-group1">

                                    <socket-binding>messaging-group</socket-binding>

                                    <connector-ref>http-connector</connector-ref>

                                </broadcast-group>

                            </broadcast-groups>

                            <discovery-groups>

                                <discovery-group name="dg-group1">

                                    <socket-binding>messaging-group</socket-binding>

                                </discovery-group>

                            </discovery-groups>

                            <cluster-connections>

                                <cluster-connection name="my-cluster">

                                    <address>jms</address>

                                    <connector-ref>http-connector</connector-ref>

                                    <discovery-group-ref discovery-group-name="dg-group1"/>

                                </cluster-connection>

                            </cluster-connections>

                            <security-settings>

                                <security-setting match="#">

                                    <permission type="send" roles="guest"/>

                                    <permission type="consume" roles="guest"/>

                                    <permission type="createNonDurableQueue" roles="guest"/>

                                    <permission type="deleteNonDurableQueue" roles="guest"/>

                                </security-setting>

                            </security-settings>

                            <address-settings>

                                <!--default for catch all-->

                                <address-setting match="#">

                                    <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                    <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                    <!-- [BEGIN] Wildfly 8 changes - JMS configurations - Setting the re-delivery attempts size and delay time -->

                                    <redelivery-delay>10000</redelivery-delay>

                                    <max-delivery-attempts>20</max-delivery-attempts>

                                    <!-- [END] Wildfly 8 changes -->

                                    <redistribution-delay>1000</redistribution-delay>

                                    <max-size-bytes>10485760</max-size-bytes>

                                    <page-size-bytes>2097152</page-size-bytes>

                                    <message-counter-history-day-limit>10</message-counter-history-day-limit>

                                </address-setting>

                            </address-settings>

                            <jms-connection-factories>

                                <connection-factory name="InVmConnectionFactory">

                                    <connectors>

                                        <connector-ref connector-name="in-vm"/>

                                    </connectors>

                                    <entries>

                                        <entry name="java:/ConnectionFactory"/>

                                    </entries>

                                </connection-factory>

                                <connection-factory name="RemoteConnectionFactory">

                                    <connectors>

                                        <connector-ref connector-name="http-connector"/>

                                    </connectors>

                                    <entries>

                                        <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                                    </entries>

                                    <ha>true</ha>

                                    <block-on-acknowledge>true</block-on-acknowledge>

                                    <reconnect-attempts>-1</reconnect-attempts>

                                </connection-factory>

                                <pooled-connection-factory name="hornetq-ra">

                                    <transaction mode="xa"/>

                                    <connectors>

                                        <connector-ref connector-name="in-vm"/>

                                    </connectors>

                                    <entries>

                                        <entry name="java:/JmsXA"/>

                                        <!-- Global JNDI entry used to provide a default JMS Connection factory to EE application -->

                                        <entry name="java:jboss/DefaultJMSConnectionFactory"/>

                                    </entries>

                                </pooled-connection-factory>

                            </jms-connection-factories>

                            <jms-destinations>

                                <jms-queue name="ExpiryQueue">

                                    <entry name="java:/jms/queue/ExpiryQueue"/>

                                </jms-queue>

                                <jms-queue name="DLQ">

                                    <entry name="java:/jms/queue/DLQ"/>

                                </jms-queue>

                                <!-- [BEGIN] Wildfly 8 changes - "EPProcessorQueue" JMS queue is created bounded to JNDI name "java:/jms/queue/EPProcessorQueue" -->

                                <jms-queue name="EPProcessorQueue">

                                    <entry name="java:/jms/queue/EPProcessorQueue"/>

                                </jms-queue>

                                <!-- [END] Wildfly 8 changes -->

                            </jms-destinations>

                        </hornetq-server>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:modcluster:1.2">

                        <mod-cluster-config advertise-socket="modcluster" connector="ajp">

                            <dynamic-load-provider>

                                <load-metric type="cpu"/>

                            </dynamic-load-provider>

                        </mod-cluster-config>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:naming:2.0">

                        <remote-naming/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:remoting:2.0">

                        <endpoint worker="default"/>

                        <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:resource-adapters:2.0"/>

                    <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

                    <subsystem xmlns="urn:jboss:domain:security:1.2">

                        <security-domains>

                            <!-- [BEGIN] Wildfly 8 changes - "EncryptDBPassword" security domain is created which contains DB credentials with encrypted password -->

                            <security-domain name="EncryptDBPassword">

                                <authentication>

                                    <login-module name="org.picketbox.datasource.security.SecureIdentityLoginModule" code="org.picketbox.datasource.security.SecureIdentityLoginModule" flag="required">

                                        <module-option name="username" value="${db.user}"/>

                                        <module-option name="password" value="${db.password.ecrypted}"/>

                                    </login-module>

                                </authentication>

                            </security-domain>

                            <!-- [END] Wildfly 8 changes -->

                            <security-domain name="other" cache-type="default">

                                <authentication>

                                    <login-module code="Remoting" flag="optional">

                                        <module-option name="password-stacking" value="useFirstPass"/>

                                    </login-module>

                                    <login-module code="RealmDirect" flag="required">

                                        <module-option name="password-stacking" value="useFirstPass"/>

                                    </login-module>

                                </authentication>

                            </security-domain>

                            <security-domain name="jboss-web-policy" cache-type="default">

                                <authorization>

                                    <policy-module code="Delegating" flag="required"/>

                                </authorization>

                            </security-domain>

                            <security-domain name="jboss-ejb-policy" cache-type="default">

                                <authorization>

                                    <policy-module code="Delegating" flag="required"/>

                                </authorization>

                            </security-domain>

                        </security-domains>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:transactions:2.0">

                        <core-environment>

                            <process-id>

                                <uuid/>

                            </process-id>

                        </core-environment>

                        <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:undertow:1.2">

                        <buffer-cache name="default"/>

                        <server name="default-server">

                            <!-- [BEGIN] Wildfly 8 changes - SSL - configured https listener -->

                            <https-listener name="https" socket-binding="https" security-realm="UndertowRealm"/>

                            <!-- [END] Wildfly 8 changes -->

                            <http-listener name="default" socket-binding="http"/>

                            <ajp-listener name="ajp" socket-binding="ajp"/>

                            <host name="default-host" alias="localhost">

                                <location name="/" handler="welcome-content"/>

                                <filter-ref name="server-header"/>

                                <filter-ref name="x-powered-by-header"/>

                            </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="WildFly/8"/>

                            <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>

                        </filters>

                    </subsystem>

                    <subsystem xmlns="urn:jboss:domain:webservices:1.2">

                        <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>

                        <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>

                    <subsystem xmlns="urn:jboss:domain:weld:2.0"/>

                </profile>

                <interfaces>

                    <!-- [BEGIN] Wildfly 8 changes - binding to all IPs -->  

                    <interface name="management">      

                        <any-address/>

                    </interface>

                    <interface name="public">          

                        <any-address/>          

                    </interface>

                    <!-- [END] Wildfly 8 changes -->

                    <!-- TODO - only show this if the jacorb subsystem is added  -->

                    <interface name="unsecure">

                        <!--

                          ~  Used for IIOP sockets in the standard configuration.

                          ~                  To secure JacORB you need to setup SSL

                          -->

                        <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>

                    </interface>

                </interfaces>

                <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

                    <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

                    <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>

                    <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>

                    <socket-binding name="http" port="${jboss.http.port:8080}"/>

                    <socket-binding name="https" port="${jboss.https.port:8443}"/>

                    <socket-binding name="jacorb" interface="unsecure" port="3528"/>

                    <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>

                    <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>

                    <socket-binding name="jgroups-tcp" port="7600"/>

                    <socket-binding name="jgroups-tcp-fd" port="57600"/>

                    <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>

                    <socket-binding name="jgroups-udp-fd" port="54200"/>

                    <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:9876}"/>

                    <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>

                    <socket-binding name="txn-recovery-environment" port="4712"/>

                    <socket-binding name="txn-status-manager" port="4713"/>

                    <outbound-socket-binding name="mail-smtp">

                        <remote-destination host="localhost" port="25"/>

                    </outbound-socket-binding>

                </socket-binding-group>

            </server>

            • 3. Re: HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException
              sridhar thiyagarajan Novice

              Just adding a few details.. There is only one application server server running on the LINUX box and there is no clustering used. There are two MDBs in the application using default hornet resource adapter.  java:comp/DefaultJMSConnectionFactory is the CONNECTION_FACTORY_JNDI_NAME used in the code and implemented as per the link How to use hornetq-ra.rar on Wildfly.

               

              I tried a few solutions like using ip address, creating an interface, output-socket-binding and using it but am still getting the same exception running in an infinite loop.

               

              ERROR [org.hornetq.core.client] (Thread-5 (HornetQ-server-HornetQServerImpl::serverUUID=31962577-8c3f-11e5-be9e-19475bb3a1aa-1293503082)) HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException

                  at sun.nio.ch.Net.checkAddress(Net.java:123) [rt.jar:1.8.0_51]

                  at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622) [rt.jar:1.8.0_51]

                  at io.netty.channel.socket.nio.NioSocketChannel.doConnect(NioSocketChannel.java:176) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:169) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.DefaultChannelPipeline$HeadHandler.connect(DefaultChannelPipeline.java:1008) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:495) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:480) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.ChannelOutboundHandlerAdapter.connect(ChannelOutboundHandlerAdapter.java:47) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.CombinedChannelDuplexHandler.connect(CombinedChannelDuplexHandler.java:168) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:495) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:480) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.ChannelDuplexHandler.connect(ChannelDuplexHandler.java:50) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:495) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:480) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:465) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:847) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:199) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.bootstrap.Bootstrap$2.run(Bootstrap.java:165) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [netty-all-4.0.15.Final.jar:4.0.15.Final]

                  at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]

              • 4. Re: HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException
                Justin Bertram Master

                I used your configuration on my own fresh install of Wildfly 8.2.0.Final.  Once I reverted some of your changes which I couldn't support (e.g. Sybase DB connection, system properties, etc.) everything started fine.  I think this issue is environmental so I recommend you turn your investigation that direction.

                • 5. Re: HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException
                  sridhar thiyagarajan Novice

                  Many thanks for the response.. Justin. I am not getting the error mentioned in Windows but getting it in an infinite loop in LINUX. Today, I tried switching to netty connector in the messaging configuration as mentioned below. I could overcome from HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException but server gets stopped.immediately after deploying EAR with a FATAL ERROR (ERROR [stderr] (ServerService Thread Pool -- 80) [Fatal Error] :-1:-1: Premature end of file.) related to Premature end of file.

                   

                  I am using JDK 1.8_51 update and wildfly-8.2.0.Final running in LINUX box. I don't have any clue from where Premature end of file occurs. Could you please give a pointer. Many thanks.

                   

                  <subsystem xmlns="urn:jboss:domain:messaging:2.0">

                              <hornetq-server>

                                  <persistence-enabled>true</persistence-enabled>

                                  <shared-store>true</shared-store>

                                  <journal-type>ASYNCIO</journal-type>

                                  <journal-file-size>102400</journal-file-size>

                                  <journal-min-files>2</journal-min-files>

                                  <connection-ttl-override>-1</connection-ttl-override>

                                  <security-enabled>false</security-enabled>

                                  <connectors>

                                      <netty-connector name="netty" socket-binding="messaging"/>

                                      <netty-connector name="netty-throughput" socket-binding="messaging-throughput">

                                          <param key="batch-delay" value="50"/>

                                      </netty-connector>

                                      <in-vm-connector name="in-vm" server-id="0"/>

                                  </connectors>

                                  <acceptors>

                                      <netty-acceptor name="netty" socket-binding="messaging"/>

                                      <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">

                                          <param key="batch-delay" value="50"/>

                                          <param key="direct-deliver" value="false"/>

                                      </netty-acceptor>

                                      <in-vm-acceptor name="in-vm" server-id="0"/>

                                  </acceptors>

                                  <security-settings>

                                      <security-setting match="#">

                                          <permission type="send" roles="guest"/>

                                          <permission type="consume" roles="guest"/>

                                          <permission type="createNonDurableQueue" roles="guest"/>

                                          <permission type="deleteNonDurableQueue" roles="guest"/>

                                      </security-setting>

                                  </security-settings>

                                  <address-settings>

                                      <!--default for catch all-->

                                      <address-setting match="#">

                                          <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                          <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                          <redelivery-delay>10000</redelivery-delay>

                                          <max-delivery-attempts>20</max-delivery-attempts>

                              <redistribution-delay>1000</redistribution-delay>

                                          <max-size-bytes>10485760</max-size-bytes>

                                          <page-size-bytes>2097152</page-size-bytes>

                                          <message-counter-history-day-limit>10</message-counter-history-day-limit>

                                      </address-setting>

                                  </address-settings>

                                       <jms-connection-factories>

                                      <connection-factory name="InVmConnectionFactory">

                                          <connectors>

                                              <connector-ref connector-name="in-vm"/>

                                          </connectors>

                                          <entries>

                                              <entry name="java:/ConnectionFactory"/>

                                          </entries>

                                      </connection-factory>

                                      <connection-factory name="RemoteConnectionFactory">

                                          <connectors>

                                              <connector-ref connector-name="netty"/>

                                          </connectors>

                                          <entries>

                                              <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                                          </entries>

                                      </connection-factory>

                                      <pooled-connection-factory name="hornetq-ra">

                                          <transaction mode="xa"/>

                                          <connectors>

                                              <connector-ref connector-name="in-vm"/>

                                          </connectors>

                                          <entries>

                                              <entry name="java:/JmsXA"/>

                                              <!-- Global JNDI entry used to provide a default JMS Connection factory to EE application -->

                                              <entry name="java:jboss/DefaultJMSConnectionFactory"/>

                                          </entries>

                                      </pooled-connection-factory>

                                  </jms-connection-factories>

                                  <jms-destinations>

                                      <jms-queue name="ExpiryQueue">

                                          <entry name="java:/jms/queue/ExpiryQueue"/>

                                      </jms-queue>

                                      <jms-queue name="DLQ">

                                          <entry name="java:/jms/queue/DLQ"/>

                                      </jms-queue>

                                      <jms-queue name="EPProcessorQueue">

                                          <entry name="java:/jms/queue/EPProcessorQueue"/>

                                      </jms-queue>

                                  </jms-destinations>

                              </hornetq-server>

                  </subsystem>

                   

                   

                  <socket-binding name="messaging" port="5445" />

                  <socket-binding name="messaging-throughput" port="5455"/>

                  • 6. Re: HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException
                    Justin Bertram Master

                    I think the "Premature end of file" error you are seeing is related to something in your EAR rather than in your server configuration file.  If there was a problem with the server config file the error would be thrown when it was parsed when the server started.

                     

                    For what it's worth, I conducted my previous test where your config worked on Linux.

                    1 of 1 people found this helpful
                    • 7. Re: HQ214016: Failed to create netty connection: java.nio.channels.UnresolvedAddressException
                      sridhar thiyagarajan Novice

                      Many thanks .. Justin. "Premature end of file" error is due to an application xml file and it is resolved. Many thanks again for testing my configuration in LINUX. http-connector didn't work in the environment I have but netty-connector worked. Many thanks for the support .