I would like to configure JBoss in standalone mode, and access my application using either localhost (http://localhost:8084/MyApp) or the ip of my machine (http://ip:8084/MyApp) ?
I could configure a interface to connect using either localhost or the ip but not both.
Here is my configuration :
<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:127.0.0.1}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
<interface name="my-interface">
<inet-address value="IP"/>
</interface>
</interfaces>
Try add the tag any-address instead of inet-address in the public interface
Eg:
<interfaces>
...
<interface name="public">
<any-address/>
</interface>
...
</interfaces>
See also: https://docs.jboss.org/author/display/AS7/Interfaces+and+ports
Related
I have a standalone WildFly server running and would like to setup the embedded instance of ActiveMQ Artemis, but I'm not sure if I've done it correctly. Here are the related parts from my standalone-full.xml:
<server>
...
<profile>
...
<subsystem xmlns="urn:jboss:domain:messaging-activemq:13.1">
<server name="default">
...
<http-connector name="http-connector" socket-binding="activemq" endpoint="http-acceptor"/>
<http-connector name="http-connector-throughput" socket-binding="activemq" endpoint="http-acceptor-throughput">
<param name="batch-delay" value="50"/>
</http-connector>
<http-acceptor name="http-acceptor" http-listener="activemq"/>
<http-acceptor name="http-acceptor-throughput" http-listener="activemq">
<param name="batch-delay" value="50"/>
<param name="direct-deliver" value="false"/>
</http-acceptor>
...
</server>
</subsystem>
...
<subsystem xmlns="urn:jboss:domain:undertow:12.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
<server name="default-server">
...
<http-listener name="activemq" socket-binding="activemq" enable-http2="true"/>
...
</server>
</subsystem>
...
</profile>
...
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
...
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<socket-binding name="managemnet" interface="activemq-interface" port="${jboss.activemq.port:8081}"/>
...
</socket-binding-group>
</server>
When I try to connect to the server at tcp://localhost:8081 nothing seems to happen. Is there some tool out there that can help me examine the issue or do you guys know what might be wrong?
EDIT: Sorry guys I forgot to add a few things. I have standalone-full.xml That was a typo. However i was receving an error when using the standard configuration
AMQ122005: Invalid "host" value "0.0.0.0" detected for "http-connector" connector.
So I assumed something was badly configured and that this was the cause for not being able to reach the imbedded artemis instance. I'm unsure what the standard port is for Artemis? is it localhost:9990?
Regarding versions
Applicaiton
Version
Artemis
2.19.1
Wildfly
26.1
I'm trying to connect wit the Quarkus JMS example described here
https://quarkus.io/guides/jms
The AMQ122005 message is warning you that you've bound the "activemq" socket-binding which is being used by the "http-connector" http-connector to 0.0.0.0 which is not valid. A remote client looking up any JMS ConnectionFactory which is configured to use that connector will receive a stub pointing to 0.0.0.0 which won't work.
The only thing you need to do here is to instead bind the server to a concrete, remotely-accessible interface rather than 0.0.0.0. Therefore, you don't need the extra http-listener, etc.
If you are using JNDI then you can connect embedded broker using a URL like this as demonstrated here:
http-remoting://host:8080
If you aren't using JNDI then you can connect to the embedded broker using a URL like:
tcp://host:8080?httpUpgradeEnabled=true
This is what you'd configure in Quarkus' application.properties in which case you can just ignore the AMQ122005 message since you're not using JNDI.
Why don't you use standalone-full.xml which has a complete working embedded Artemis broker.
Another solution with WildFly 27 is to use Galleon and provision the embedded-activemq layer.
I am running a deployed application on localhost and accessing it from browser but not able to access it on browser though 8080 is listening.
Sometime it is showing "Refused to connect" or "Webpages not found"
This is my standalone.xml
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure: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="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="ajp" port="8009"/>
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<socket-binding name="jacorb" interface="unsecure" port="3528"/>
<socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>
<socket-binding name="messaging" port="5445"/>
<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="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"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
<outbound-socket-binding name="remote-ejb-connection1">
<remote-destination host="localhost" port="4689"/>
</outbound-socket-binding>
</socket-binding-group>
<deployments>
<deployment name="ace-ear-1.0.11-SNAPSHOT.ear" runtime-name="ace-ear-1.0.11-SNAPSHOT.ear">
<content sha1="213bc2a0282e8488d75711d9c49fbdb2c607e84b"/>
</deployment>
<deployment name="ace-admin-ear-1.0.11-SNAPSHOT-LOCAL.ear" runtime-name="ace-admin-ear-1.0.11-SNAPSHOT-LOCAL.ear">
<content sha1="d609bf2cc5284b06229579c64eed2570ebc3b7ca"/>
</deployment>
</deployments>
As you have mentioned sometimes you were getting "Refused to connect" or "Webpages not found", can you clarify is it working most of the times and sometimes you were getting this error or every time?
Can you check in your server log 8080 port is listening on your configured IP? for eg:
INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener http listening on 127.0.0.1:8080
When I try to execute integration test with arquillian and jboss eap 6 remote on linux, now return
the:org.jboss.arquillian.container.spi.client.container.DeploymentException: Could not deploy to container: Authentication failed: all available authentication mechanisms failed
On windows work very fine as localhost as other machine.
This is my configuration:
file arquillian.xml
<defaultProtocol type="Servlet 3.0" />
<container qualifier="jboss7" default="true">
<configuration>
<property name="managementAddress">127.0.0.1</property>
<property name="managementPort">9999</property>
<property name="username">deploy</property>
<property name="password">xxxx</property>
</configuration>
</container>
pom.xm:
<profile>
<id>test-int</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
<version>7.1.2.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
standalone.xml = jboss eap 6.0
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</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: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="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="ajp" port="8009"/>
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<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>
Anyone can help me ?
Try to add a management user in your remote instance, in your case:
user deploy/
I have troubles finding a reference for allowing access to server console from local connections only.
Is there configurable option / best practice for this? Preferably without disabling web interface or involving OS / network options for this.
WildFly only allows local connections by default, so if you get remote management connections, it seems you've changed the defaults already.
This is the relevant section in standalone.xml
<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:127.0.0.1}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>
Make sure that jboss.bind.address.management is set to a local address.
Jboss 7.0 is (by default) configured to limit the access to the local ip by defining this in standalone.xml:
<interfaces>
<interface name="public">
<inet-address value="127.0.0.1"/>
</interface>
</interfaces
I know I can change that to make it publicly available to all ips by putting this:
<interfaces>
<interface name="public">
<any-address/>
</interface>
</interfaces
But how can I limit this to local IPs only, e.g. all IP addresses that start with 10.x.x.x?
I think that this could help: https://docs.jboss.org/author/display/AS71/Interfaces+and+ports
<interface name="default">
<!-- Match any interface/address on the right subnet -->
<subnet-match value="192.168.0.0/16"/>
</interface>
In this way you can match all addresses in the given subnet.