-
1. Re: listening on all interfaces
jaikiran Jun 30, 2011 10:56 PM (in response to adriancole)Add a new interface under the interfaces section of standalone.xml with <any-address> element:
<interfaces> <interface name="management"> <inet-address value="127.0.0.1"/> </interface> <interface name="public"> <inet-address value="127.0.0.1"/> </interface> <!-- Equivalent of -b 0.0.0.0 --> <interface name="any"> <any-address/> </interface> </interfaces>
and use this new interface in the socket-binding-group:
<!-- Use the "any" interface --> <socket-binding-group name="standard-sockets" default-interface="any"> <socket-binding name="http" port="8080"/> <socket-binding name="https" port="8443"/> <socket-binding name="jmx-connector-registry" port="1090"/> <socket-binding name="jmx-connector-server" port="1091"/> <socket-binding name="jndi" port="1099"/> <socket-binding name="osgi-http" port="8090"/> <socket-binding name="remoting" port="4447"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> </socket-binding-group>
The xsd can be found here
-
2. Re: listening on all interfaces
prasad.deshpande Jul 13, 2011 9:10 AM (in response to jaikiran)I've done the same
<interfaces> <interface name="management"> <inet-address value="127.0.0.1"/> </interface> <interface name="public"> <inet-address value="127.0.0.1"/> </interface> <!-- Equivalent of -b 0.0.0.0 --> <interface name="any"> <any-address/> </interface> </interfaces>
and use this new interface in the socket-binding-group:
<!-- Use the "any" interface --> <socket-binding-group name="standard-sockets" default-interface="any">
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443" />
<socket-binding name="jacorb" port="3528"/>
<socket-binding name="jacorb-ssl" port="3529"/>
<socket-binding name="jndi" port="1099"/>
<socket-binding name="messaging" port="5445"/>
<socket-binding name="messaging-throughput" port="5455"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
</socket-binding-group>
but I'm getting exception as :
14:03:10,843 ERROR [org.apache.catalina.core.StandardService] (MSC service thread 1-1) Connector.start: LifecycleException: service.getName(): "jboss.web"; Protocol handler start failed: java.net.SocketException: Protocol family not supported
I tried keeping default-interface to public & tried adding interface to socket-binding tag, nothing different...
Any guess?
-
3. Re: listening on all interfaces
jaikiran Jul 13, 2011 10:38 AM (in response to prasad.deshpande)Is that the entire exception stacktrace? Can you post the console logs?
-
4. Re: listening on all interfaces
prasad.deshpande Jul 13, 2011 10:45 AM (in response to jaikiran)I've attached server.log. Could you please have a look?
-
server.log.zip 2.6 KB
-
-
5. Re: listening on all interfaces
jaikiran Jul 13, 2011 11:12 AM (in response to prasad.deshpande)1 of 1 people found this helpful15:43:56,359 SEVERE [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-6) Failure in initialisation: org.jboss.netty.channel.ChannelException: Failed to bind to: /0:0:0:0:0:0:0:0:5455
The any-address I mentioned in my post refers to:
Empty element indicating that sockets using this interface
should be bound to a wildcard address. The IPv6 wildcard
address (::) will be used unless the java.net.preferIpV4Stack
system property is set to true, in which case the IPv4
wildcard address (0.0.0.0) will be used. If a socket is
bound to an IPv6 anylocal address on a dual-stack machine,
it can accept both IPv6 and IPv4 traffic; if it is bound to
an IPv4 (IPv4-mapped) anylocal address, it can only accept
IPv4 traffic.
In your case, it's using IPv6. Try using any-ipv4-address element instead, as follows:
<interfaces> <interface name="management"> <inet-address value="127.0.0.1"/> </interface> <interface name="public"> <inet-address value="127.0.0.1"/> </interface> <!-- IPv4 --> <interface name="any"> <any-ipv4-address/> </interface> </interfaces> <!-- Use the any interface --> <socket-binding-group name="standard-sockets" default-interface="any"> <socket-binding name="http" port="8080"/> <socket-binding name="https" port="8443"/> <socket-binding name="jmx-connector-registry" port="1090"/> <socket-binding name="jmx-connector-server" port="1091"/> <socket-binding name="jndi" port="1099"/> <socket-binding name="osgi-http" port="8090"/> <socket-binding name="remoting" port="4447"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> </socket-binding-group>
-
6. Re: listening on all interfaces
prasad.deshpande Jul 13, 2011 11:28 AM (in response to jaikiran)Thanks Jaikiran, That worked!
-
7. Re: listening on all interfaces
daveryan Oct 6, 2011 12:15 AM (in response to adriancole)In addition to the new any-address element per Jaikiran's great examples, I've been informed that -b has been restored for AS 7.0.2.
-
8. Re: listening on all interfaces
jaikiran Oct 6, 2011 7:51 AM (in response to daveryan)That's right. Starting AS 7.0.2, the -b command line option has been reintroduced and also a new -bmanagement option has been introduced. See this http://jaitechwriteups.blogspot.com/2011/09/jboss-as-702-arc-released.html for more details.
-
9. Re: listening on all interfaces
lkrzyzanek Oct 5, 2012 3:47 AM (in response to jaikiran)Thanks,
works perfeclty.
Libor
-
10. Re: listening on all interfaces
niraz Dec 9, 2012 5:41 AM (in response to adriancole)Hi All,
I have the following configurations in the standalone.xml file:
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
<interface name="unsecured">
<inet-address value="0.0.0.0" />
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<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:9443}"/>
<socket-binding name="osgi-http" interface="management" port="8090"/>
<socket-binding name="remoting" port="4447"/>
<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>
And I'm still not able to access the URL from outside.
What am I doing wrong?
Thanks in advance!
Nir
-
11. Re: listening on all interfaces
nickarls Dec 9, 2012 9:42 AM (in response to niraz)Any firewalls etc that might interfere? Same result with the
<any-address/>
mentioned above?(you might want to start separate threads for your own issues)
-
12. Re: listening on all interfaces
niraz Dec 16, 2012 8:01 AM (in response to nickarls)Hi,
Adding:
<interface name="any">
<any-ipv4-address/>
</interface>
And changing <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
to <socket-binding-group name="standard-sockets" default-interface="any">
Solved the issue.
Thanks everyone
-
13. Re: listening on all interfaces
linuxblackghostzektorprokulo7silvadotnet Aug 8, 2017 2:39 PM (in response to jaikiran)Thanks