To start JBoss, run $JBOSS_HOME/bin/run.sh on Unix/Linux and %JBOSS_HOME%run.bat on Windows
The script figures out JBOSS_HOME by itself - though it does not hurt to have it pre-specified.
By default, this script runs the default configuration set
Alternative configuration set can be specified: ./run.sh -c <configuration_set_name>
By default, this script binds JBoss AS to 127.0.0.1 (for security reasons) making it inaccessible from the outside world
To bind JBoss to a specific address, execute: ./run.sh -b 10.1.2.3 or ./run.sh --host=10.1.2.3
To bind JBoss to all addresses, execute: ./run.sh -b 0.0.0.0 or ./run.sh --host=0.0.0.0
To start JBoss as a system service
On Unix/Linux, use a script like jboss_init_redhat.sh
Copy (or symbolically link) this script to /etc/init.d/jboss
Edit the script as needed (to specify user, IP, and file paths)
Add #chkconfig: 3 80 20 and #description: JBoss to this script
Run chkconfig --add jboss
On Windows use JavaService (http://forge.objectweb.org/projects/javaservice/), which comes with an installation script for JBoss
Inclined to build a profession as JBOSS Developer? Then here is the blog post on "JBOSS Training "
Usage: run.bat [options]
options:
h, --help Show this help message
V, --version Show version information
- Stop processing options
D<name>[=<value>] Set a system property
d, --bootdir=<dir> Set the boot patch directory; Must be absolute or url
p, --patchdir=<dir> Set the patch directory; Must be absolute or url
n, --netboot=<url> Boot from net with the given url as base
c, --configuration=<name> Set the server configuration name
B, --bootlib=<filename> Add an extra library to the front bootclasspath
L, --library=<filename> Add an extra library to the loaders classpath
C, --classpath=<url> Add an extra url to the loaders classpath
P, --properties=<url> Load system properties from the given url
b, --host=<host or ip> Bind address for all JBoss services
g, --partition=<name> HA Partition name (default=DefaultDomain)
m, --mcast_port=<ip> UDP multicast port; only used by JGroups
u, --udp=<ip> UDP multicast address
l, --log=<log4j|jdk> Specify the logger plugin type
On Unix/Linux, run.sh (and shutdown.sh) source JVM/runtime options from run.conf file whereas on Windows run.bat specifies those options internally.
Verifying JBoss AS Startup
JBoss has successfully started when in its console window you can see a line like this:
13:26:33,625 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 2m:20s:844ms
If you see any exception traces, then there was a problem starting one or more of the JBoss services. Examine the error messages before continuing. A common problem is a port conflict: another server (possibly another instance of JBoss AS itself) is running on one or more of the required JBoss AS ports.
Point your browser to http://localhost:8080/status to verify the server startup.
Use the shutdown script (remote shutdown): $JBOSS_HOME/bin/shutdown.sh -S (shutdown.bat on Windows)
A JMX client to shutdown (exit or halt) a remote JBoss server.
Usage: shutdown [options] <operation>
options:
h, --help Show this help message (default)
D<name>[=<value>] Set a system property
- Stop processing options
s, --server=<url> Specify the JNDI URL of the remote server
n, --serverName=<url> Specify the JMX name of the ServerImpl
a, --adapter=<name> Specify JNDI name of the MBeanServerConnection to use
u, --user=<name> Specify the username for authentication
p, --password=<name> Specify the password for authentication
operations:
S, --shutdown Shutdown the server
e, --exit=<code> Force the VM to exit with a status code
H, --halt=<code> Force the VM to halt with a status code
To shut down a remote JBoss AS instance, use: ./shutdown.sh -s jnp://remoteHostOrIP:1099 -S Remote instance’s IP address and port are specified by its Naming service configured in ${jboss.server.config.url}/jboss-service.xml
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.
Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox