18

I am new to WildFly/JBOSS. I am using WildFly 8.2.0. I have installed it as a service on Linux using an installation script from http://sukharevd.net/wildfly-8-installation.html. Everything works fine. I connect to my Linux remotely using SSH. It doesnt have GUI. So I need to be able to remotely connect to administration console. I cannot connect and it shows the following message:

"An automatic redirect to the Administration Console is not currently available. This is most likely due to the administration console being exposed over a network interface different from the one to which you are connected to."

I see the same issue mentioned in the following link

https://github.com/jboss-dockerfiles/wildfly/issues/3

The link has solution to it but it uses "docker". How can I do it without using docker? I am using standalone configuration. What configuraiton do I need to change?

vinay
  • 950
  • 1
  • 11
  • 27

3 Answers3

23

You should start WildFly using following command. Use of 0.0.0.0 will bind WildFly to all the available IP addresses on your linux box. If you want to bind to specific IP address; you can replace 0.0.0.0 with the relevant IP address.

$WILDFLY_HOME/bin/standalone.sh -b=0.0.0.0 -bmanagement=0.0.0.0

EDIT : Once the installation was complete using the script. We have to go to /etc/init.d/service and change JBOSS_SCRIPT=$JBOSS_HOME/bin/standalone.sh to JBOSS_SCRIPT="$JBOSS_HOME/bin/standalone.sh -b=0.0.0.0 -bmanagement=0.0.0.0"

vinay
  • 950
  • 1
  • 11
  • 27
Aparna Chaudhary
  • 1,325
  • 8
  • 10
  • Thank you very much. I know passing will make it work. But I dint know how to setup this as service. Looks like adding these parameters to line 88 of the install script should do. Install script source https://dl.dropboxusercontent.com/u/5339027/shared/dsps/wildfly-install.sh – vinay Mar 19 '15 at 19:25
  • I am on RHEL. Actually the script copies bin/init.d/wildfly-init-redhat.sh into etc/init.d/wildfly service. I have edited the service to add the additional parameters but I get "line 57: -b=0.0.0.0: command not found" – vinay Mar 19 '15 at 20:01
14

The Second Possible Solution

As an alternative to adding parameters do your start command, you can edit your standalone.xml to enable remote access from any source. This approach is more useful if you need the remote access enabled most of the time, this way, you don’t need to remember to pass additional parameters to the start command, as shown above.

First, go to your Wildfly configuration folder:

terminal

cd /opt/wildfly-8.2.0.Final/standalone/configuration

Next, edit the standalone.xml file using your preferred file editor and do the changes below: Replace this:

standalone.xml

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

With this:

standalone.xml

<interface name="management">
    <any-address/>
</interface>
<interface name="public">
    <any-address/>
</interface>

Make sure to save your changes and restart your Wildfly:

on terminal

/opt/wildfly-8.2.0.Final/bin/jboss-cli.sh --connect --command=:reload

Done.

Mahendra Andhale
  • 489
  • 8
  • 14
  • 4
    Better solution if we need permanent access to the management interface. This should be accepted as answer if this is the case – creekorful May 04 '18 at 14:32
  • 1
    Works like a charm with WildFly 18.0.1.Final – Anatoly Yakimchuk Feb 13 '20 at 15:43
  • 2
    The corresponging CLI commands are: `/interface=management:undefine-attribute(name=inet-address)` and `/interface=management:write-attribute(name=any-address,value=true)` or alternatively `/interface=management:write-attribute(name=inet-address,value=0.0.0.0)` – rü- Sep 18 '20 at 05:02
10

A better approach is edit JBOSS_HOME/standalone/configuration/standalone.xml editing the piece of code above and changing the address to 0.0.0.0.

<interfaces>
    <interface name="management">
        <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
    </interface>
jhonis.souza
  • 144
  • 7