WildFly

    Bitnami WildFly Stack bundles WildFly Application Server. If you are using Bitnami JBoss please check this documentation.

    Quick reference card

      Cloud Servers Virtual Machines Native Installers
    Configuration file(s) /opt/bitnami/wildfly/standalone/configuration/standalone.xml /opt/bitnami/wildfly/standalone/configuration/standalone.xml install_dir/wildfly/standalone/configuration/standalone.xml
    Log file(s) /opt/bitnami/wildfly/standalone/log/jboss.out /opt/bitnami/wildfly/standalone/log/jboss.out install_dir/wildfly/standalone/log/jboss.out
    Default port 8083 8083 8083
    Management console port 9990 9990 80 (Windows)
    8080 (Linux and Mac OS X)
    System user account wildfly wildfly wildfly
    Service control sudo /opt/bitnami/ctlscript.sh start|stop|restart wildfly sudo /opt/bitnami/ctlscript.sh start|stop|restart wildfly install_dir/ctlscript.sh start|stop|restart wildfly

    How to start/stop the WildFly server?

    Cloud Server

    Each Bitnami stack includes a control script that lets you easily stop, start and restart servers.

    The script is located at /opt/bitnami/ctlscript.sh. Call it without any arguments to restart all services:

    $ sudo /opt/bitnami/ctlscript.sh start
    

    Or use it to restart a specific service only by passing the service name as argument:

    $ sudo /opt/bitnami/ctlscript.sh restart wildfly
    

    Virtual Machine

    Each Bitnami stack includes a control script that lets you easily stop, start and restart servers.

    The script is located at /opt/bitnami/ctlscript.sh. Call it without any arguments to restart all services:

    $ sudo /opt/bitnami/ctlscript.sh start
    

    Or use it to restart a specific service only by passing the service name as argument:

    $ sudo /opt/bitnami/ctlscript.sh restart wildfly
    

    Native Installer

    You can use either the graphical manager tool or the command-line tool to start and stop the servers.

    Graphical Tool

    Bitnami stacks include a graphical tool to manage the servers easily (native installers only). Using this tool, you can start, stop and restart the servers and check the log files.

    On Windows:

    • Double-click the "manager-windows.exe" file in your installation directory.  
    • You can also start the Manager tool using the Start Menu path Start -> Program Files -> Bitnami Stack -> Manager.

    On Linux and Mac OS X:

    • Double-click the "manager-osx" or "manager-linux-*" tool in your installation directory. 
    Command-line Tool

    Each Bitnami stack includes a control script that lets you easily stop, start and restart servers.

    The control script is only available for Linux and Mac OS X native installers. The script is located in your installation directory and named ctlscript.sh. Call it without any arguments to restart all services.

    On Linux:
    Call the control script with the ‘start’ argument to start all servers. For example:

    $ cd /home/USER/wildflystack-VERSION
    $ ./ctlscript.sh start
    

    Or use it to restart a specific service only by passing the service name as argument:

    $ cd /home/USER/wildflystack-VERSION
    $ ./ctlscript.sh restart wildfly
    

    On Mac OS X:
    Call the control script with the ‘start’ argument to start all servers. For example:

    $ cd /Applications/wildflystack-VERSION
    $ ./ctlscript.sh start
    

    Or use it to restart a specific service only by passing the service name as argument - for example 'mysql':

    $ cd /Applications/wildflystack-VERSION
    $ ./ctlscript.sh restart mysql
    

    Tabs end

    How to access at WildFly server console?

    For security reasons, the WildFly server console will be accessible only when using 127.0.0.1 as the hostname. If you are using a native installer you can access from your own machine but if you are using a virtual machine or cloud image, please check the connection steps below.

    IMPORTANT: Before following the steps below, ensure that your Wildfly server is running.

    Cloud Server

    To access the application using your Web browser, create an SSH tunnel, as described below.

    On Windows:

    • Make sure you can log in to the server using PuTTY. Refer to your cloud provider's page in this wiki for more information on this.
    • Open a new SSH session to the server. In the PuTTY settings for the new session, click "Connection → SSH → Tunnels" section and create a secure tunnel for the application by forwarding source port "9990" to destination port "localhost:9990".
    • Click the "Add" button to add the secure tunnel configuration to the session.

      capture_002_04092015_133116.png

    • Go back to the "Session" section and save your changes by clicking the "Save" button.
    • Click the "Open" button to open a new SSH session to the server.

    On Linux and Mac OS X:

    • Make sure you can log in to the server using SSH. Refer to your cloud provider's page in this wiki for more information on this.
    • Depending on whether you have an SSH key for server access or not, open a new SSH session to the server using one of the two commands below:
      • If you have a private SSH key, use this command:
        $ ssh -N -L 9990:127.0.0.1:9990 -i bitnami-hosting.pem bitnami@xyz.bitnamiapp.com
        

        Remember to replace 'bitnami-hosting.pem' in the previous commands with the path to your private key file, and 'xyz.bitnamiapp.com' with the public IP address or hostname of your server. Note that if successful, this command will create an SSH tunnel but will not display any output on the server console.

      • If you don't have a private SSH key but your server uses an SSH username/password pair, use this command:
        $ ssh -N -L 9990:127.0.0.1:9990 bitnami@xyz.cloudapp.com
        

        Remember to replace 'bitnami' with the SSH username from your credentials pair and 'xyz.cloudapp.net' with the public IP address or hostname of your server. Enter your SSH password when prompted. Note that if successful, this command will create an SSH tunnel but will not display any output on the server console.

    While the tunnel is active, you should be able to access the Wildfly console through the secure SSH tunnel you created, by browsing to http://127.0.0.1:9990/console. Refer to the detail page for the cloud server to obtain access credentials.

    Virtual Machine

    To access the application using your Web browser, create an SSH tunnel, as described below.

    On Windows:

    • Make sure you can log in to the server using PuTTY. Refer to this page for more information.
    • Open a new SSH session to the server. In the PuTTY settings for the new session, click "Connection → SSH → Tunnels" section and create a secure tunnel for the application by forwarding source port "9990" to destination port "localhost:9990".
    • Click the "Add" button to add the secure tunnel configuration to the session.

      capture_002_04092015_133116.png

    • Go back to the "Session" section and save your changes by clicking the "Save" button.
    • Click the "Open" button to open a new SSH session to the server.

    On Linux and Mac OS X:

    • Make sure you can log in to the virtual machine using SSH. Refer to this page for more information.
    • Use the command below:
      $ ssh -N -L 9990:127.0.0.1:9990 bitnami@192.168.56.101
      
      Remember to replace '192.168.56.101' with the network IP address or hostname of your virtual machine. Enter the password when prompted. Note that if successful, this command will create an SSH tunnel but will not display any output on the server console.

    While the tunnel is active, you should be able to access the Wildfly console through the secure SSH tunnel you created, by browsing to http://127.0.0.1:9990/console.

    Alternatively, enable the management console by editing /opt/bitnami/wildfly/conf/wildfly.conf file and adding the following line in the <Location> directive:

    <Location />
        ProxyPreserveHost On
        ProxyPass http://localhost:8080/
    </Location>
    

    Also, edit the /opt/bitnami/wildfly/standalone/configuration/standalone.xml file, to allow access to the management interface from other hosts, as shown below:

    ...
    <interface name="management">
        <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
    </interface>
    ...
    

    Then, open the management console port (9990) in the firewall and restart your servers for the changes to take effect.

    $ sudo ufw allow 9990
    $ cd /opt/bitnami
    $ sudo ./ctlscript.sh restart
    

    You should now be able to access the Wildfly console by browsing to http://[server-IP-address]/console.

    The default root user is 'manager' and the default password is 'bitnami'.

    Native Installer

    Access the Wildfly console by browsing to  http://127.0.0.1:8080/console  (Linux and Mac OS X native installer) or http://127.0.0.1/console (Windows native installer).

    The default root user is 'manager' and the password is the one set during installation.

    In case you wish to access the Wildfly Management Console from another machine, modify the Wildfly standalone configuration file at  installdir/wildfly/standalone/configuration/standalone.xml as shown below.

    ...
    <interface name="management">
        <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
    </interface>
    ...
    

    Also, edit the installdir/wildfly/conf/wildfly.conf file and adding the following line in the <Location> directive:

    <Location />
        ProxyPreserveHost On
        ProxyPass http://localhost:8080/
    </Location>
    

    Restart your servers for the changes to take effect.

    $ cd installdir
    $ sudo ./ctlscript.sh restart
    

    You should now be able to access the Wildfly console by browsing to http://[server-IP-address]/console.

    How is Apache server connected with WildFly?

    Bitnami Stacks include the Apache Web server. There are different ways to connect these two servers. One of this is connecting through an HTTP proxy.

    The HTTP Connector element represents a Connector component that communicates with a web connector via the HTTP protocol. This is used to invisibly integrate Wildfly into an Apache installation and have Apache handle the static content of the web application and/or to utilize Apache's SSL processing.

    Cloud Server

    To make them work together, enable the mod_proxy.so and mod_proxy_http.so modules in /opt/bitnami/apache2/conf/httpd.conf. Then, add the following lines to the /opt/bitnami/wildfly/conf/wildfly.conf file:

    <Location /your_application_url>
      ProxyPass http://localhost:8090/your_application_url
    </Location>
    
    NOTE: For Bitnami Cloud Hosting users, Wildfly HTTP listens on port 8083 by default and a connector is configured to make the application accessible at http://xyz.bitnamiapp.com/wildfly/.

    Virtual Machine

    To make them work together, enable the mod_proxy.so and mod_proxy_http.so modules in /opt/bitnami/apache2/conf/httpd.conf. Then, add the following lines to the /opt/bitnami/wildfly/conf/wildfly.conf file:

    <Location /your_application_url>
      ProxyPass http://localhost:8090/your_application_url
    </Location>
    

    Native Installer

    To make them work together, enable the mod_proxy.so and mod_proxy_http.so modules in installdir/apache2/conf/httpd.conf. Then, add the following lines to the installdir/wildfly/conf/wildfly.conf file:

    <Location /your_application_url>
      ProxyPass http://localhost:8090/your_application_url
    </Location>
    

    How to enable SSL in Wildfly server?

    To learn how to configure Apache and Wildfly for SSL, go to the next section.

    If your application includes lines similar to this in its web.xml file, you are forcing secure connections to Wildfly.

    <user-data-constraint>
         <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
    

    To achieve this, you must first enable SSL connections in Wildfly. Follow the steps below for your platform.

    Cloud Server

    1. Make sure that you have a SSL certificate for Wildfly stored in a keystore. Read more about this at https://docs.jboss.org/author/display/WFLY8/Security+Realms

    2. Edit your Wildfly server configuration file at /opt/bitnami/wildfly/standalone/configuration/standalone.xml and add a new security realm as shown below:

    <security-realm name="ssl-realm">
     <server-identities>
      <ssl>
       <keystore path="server.keystore" relative-to="jboss.server.config.dir" keystore-password="keystore_password" alias="server" key-password="key_password" />
      </ssl>
     </server-identities>
    </security-realm>
    

    3. Modify the default listener in your Wildfly configuration file above:

    <!--<http-listener name="default" socket-binding="http" />-->
    <https-listener name="default" socket-binding="https" security-realm="ssl-realm"/>

    4. Restart the Wildfly server:

    sudo /opt/bitnami/ctlscript.sh restart wildfly
    

    Virtual Machine

    1. Make sure that you have a SSL certificate for Wildfly stored in a keystore. Read more about this at https://docs.jboss.org/author/display/WFLY8/Security+Realms

    2. Edit your Wildfly server configuration file at /opt/bitnami/wildfly/standalone/configuration/standalone.xml and add a new security realm as shown below:

    <security-realm name="ssl-realm">
     <server-identities>
      <ssl>
       <keystore path="server.keystore" relative-to="jboss.server.config.dir" keystore-password="keystore_password" alias="server" key-password="key_password" />
      </ssl>
     </server-identities>
    </security-realm>
    

    3. Modify the default listener in your Wildfly configuration file above:

    <!--<http-listener name="default" socket-binding="http" />-->
    <https-listener name="default" socket-binding="https" security-realm="ssl-realm"/>

    4. Restart the Wildfly server:

    sudo /opt/bitnami/ctlscript.sh restart wildfly
    

    Native Installer

    1. Make sure that you have a SSL certificate for Wildfly stored in a keystore. Read more about this at https://docs.jboss.org/author/display/WFLY8/Security+Realms

    2. Edit your Wildfly server configuration file at installdir/wildfly/standalone/configuration/standalone.xml and add a new security realm as shown below:

    <security-realm name="ssl-realm">
     <server-identities>
      <ssl>
       <keystore path="server.keystore" relative-to="jboss.server.config.dir" keystore-password="keystore_password" alias="server" key-password="key_password" />
      </ssl>
     </server-identities>
    </security-realm>
    

    3. Modify the default listener in your Wildfly configuration file above:

    <!--<http-listener name="default" socket-binding="http" />-->
    <https-listener name="default" socket-binding="https" security-realm="ssl-realm"/>

    4. Restart the Wildfly server:

    sudo /opt/bitnami/ctlscript.sh restart wildfly
    

    How to configure Apache with Wildfly using SSL?

    If you just want to configure HTTPS in your server, you can follow the steps in the Apache How to enable SSL access section.

    Using the Bitnami Wildfly Stack, it is possible to have Apache working as a proxy server for Wildfly. If you have followed the steps to enable SSL directly in Wildfly, you must also configure Apache to use the Wildfly SSL port. To do this, follow the steps below:

    Cloud Server

    1. Modify the Apache configuration file for Wildfly at /opt/bitnami/wildfly/conf/wildfly.conf as shown below.

    SSLProxyEngine On                                                                                                                                                                                                                                                    
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off
                                                                                                                                                                                                                                                              
    <Location />
        ProxyPass https://localhost:8443/
        ProxyPassReverse https://localhost:8443/
    </Location>
    

    The example above disables the ProxyVerify and ProxyCheck options because a dummy keystore is in use. If you have certificates provided by a Certificate Authority (CA), those options may be ignored.

    2. Restart the server to load the new configuration

    sudo /opt/bitnami/ctlscript.sh restart apache
    

    Virtual Machine

    1. Modify the Apache configuration file for Wildfly at /opt/bitnami/wildfly/conf/wildfly.conf as shown below.

    SSLProxyEngine On                                                                                                                                                                                                                                                    
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off
                                                                                                                                                                                                                                                              
    <Location />
        ProxyPass https://localhost:8443/
        ProxyPassReverse https://localhost:8443/
    </Location>
    

    The example above disables the ProxyVerify and ProxyCheck options because a dummy keystore is in use. If you have certificates provided by a Certificate Authority (CA), those options may be ignored.

    2. Restart the server to load the new configuration

    sudo /opt/bitnami/ctlscript.sh restart apache
    

    Native Installer

    1. Modify the Apache configuration file for Wildfly at installdir/wildfly/conf/wildfly.conf as shown below.

    SSLProxyEngine On                                                                                                                                                                                                                                                    
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off
                                                                                                                                                                                                                                                              
    <Location />
        ProxyPass https://localhost:8443/
        ProxyPassReverse https://localhost:8443/
    </Location>
    

    The example above disables the ProxyVerify and ProxyCheck options because a dummy keystore is in use. If you have certificates provided by a Certificate Authority (CA), those options may be ignored.

    2. Restart the server to load the new configuration

    installdir/ctlscript.sh restart apache
    

    How to create a SSL certificate for Wildfly?

    The steps required to create a self-signed certificate for Wildfly are shown below.

    Cloud Server

    $ cd /opt/bitnami/wildfly/standalone/configuration
    $ sudo keytool -genkey -alias server -keyalg RSA -validity 3650 -keysize 2048 -keystore server.keystore
    $ sudo chown wildfly:wildfly ./server.keystore
    

    Virtual Machine

    $ cd /opt/bitnami/wildfly/standalone/configuration
    $ sudo keytool -genkey -alias server -keyalg RSA -validity 3650 -keysize 2048 -keystore server.keystore
    $ sudo chown wildfly:wildfly ./server.keystore
    

    Native Installer

    $ cd installdir/wildfly/standalone/configuration
    $ sudo keytool -genkey -alias server -keyalg RSA -validity 3650 -keysize 2048 -keystore server.keystore
    $ sudo chown wildfly:wildfly ./server.keystore (only if the stack was installed as root)
    

    How to change the Java memory settings for WildFly?

    If you find an error similar to this, the problem is that you need to increase the Java memory settings for WildFly.

    java.lang.OutOfMemoryError: PermGen space
    

    You can find below the steps to increase Java settings on your side:

      win_platform.png On Windows:  Edit the /installdir/wildfly/scripts/setenv.bat file and increase the Java settings. For example:

    SET JAVA_OPTS="%JAVA_OPTS% -XX:MaxPermSize=1024m -Xmx1024m" 
    

    Then it is necessary to uninstall and install the service again. Open a command prompt as administrator and run the following commands:

    > cd installdir
    > serviceinstall.bat UNINSTALL  (this command will close your current window)
    > serviceinstall.bat INSTALL
    

    How to debug errors?

    Cloud Server

    The main Wildfly log file is created at /opt/bitnami/wildfly/standalone/log/wildfly.out.

    Virtual Machine

    The main Wildfly log file is created at /opt/bitnami/wildfly/standalone/log/wildfly.out.

    Native Installer

    The main Wildfly log file is created at installdir/wildfly/standalone/log/wildfly.out.

    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    39573 view(s), 39 edit(s) and 32073 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments