[
https://issues.jboss.org/browse/AS7-4015?page=com.atlassian.jira.plugin.s...
]
Flemming Harms commented on AS7-4015:
-------------------------------------
1. This is more or less supported in the current scripts. although it might not be the
most easy way to do it. The bin/standalone.conf has the option to setup additional java
properties for the jboss server. With the "jboss.bind.address" and
"jboss.bind.address.management" property you will be setting the binding address
for the server
In this example I grab the host IP address and pass into JAVA_OPTS in the
standalone.conf. This is of course just one way of doing it.
HOST_IP="`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut
-d: -f2 | awk '{ print $1}'`"
JAVA_OPTS="$JAVA_OPTS -Djboss.bind.address=$HOST_IP
-Djboss.bind.address.management=$HOST_IP"
2. This look like a small bug. although it does not have any impact on the server startup,
because it fall back to use "su - $JBOSS_USER -c "LAUNCH_JBOSS_IN_BACKGROUND=1
JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT -c $JBOSS_CONFIG" 2>&1 >
$JBOSS_CONSOLE_LOG &" which also works fine on CentOS 6 too
Other distros like Debian or Ubuntu does not have a shared function script to include, and
they will fall back to use the same command as above.
init.d script, +$JBOSS_OPTIONS,
jboss-as/bin/init.d/jboss-as-standalone.sh tests for *executable*
/etc/rc.d/init.d/functions
-----------------------------------------------------------------------------------------------------------------------------
Key: AS7-4015
URL:
https://issues.jboss.org/browse/AS7-4015
Project: Application Server 7
Issue Type: Bug
Components: Documentation, Scripts
Affects Versions: 7.1.0.Final
Environment: CentOS 6.2 (netinstall, all default)
Reporter: Leo Breuss
Assignee: Flemming Harms
Labels: script, startup
Fix For: 7.1.2.Final (EAP)
1. The supplied jboss init script shall accept options for jboss. Proposal:
$JBOSS_OPTIONS. This is usefull to hand over the binding. (My JBoss is in a VM on DHCP and
I don't want to/can't bind to 0.0.0.0).
2. Bug: On CentOS 6 (and maybe other Distros too), the /etc/rc.d/init.d/functions has no
executable flag set. The jboss init.d script itself sources it with ".
/etc/rc.d/init.d/functions"
{code}
ll /etc/rc.d/init.d/functions
-rw-r--r--. 1 root root 18171 Oct 7 16:01 /etc/rc.d/init.d/functions
{code}
Proposed patch:
{code:title=patch for $JBOSS_HOME/bin/init.d/jboss-as-standalone.sh|borderStyle=solid}
# diff /opt/jboss-as/bin/init.d/jboss-as-standalone.sh /etc/init.d/jboss
60c60
< if [ -x /etc/rc.d/init.d/functions ]; then
---
> if [ -r /etc/rc.d/init.d/functions ]; then
89,90c89,90
< if [ -x /etc/rc.d/init.d/functions ]; then
< daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1
JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT -c $JBOSS_CONFIG 2>&1 >
$JBOSS_CONSOLE_LOG &
---
> if [ -r /etc/rc.d/init.d/functions ]; then
> daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1
JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT $JBOSS_OPTIONS -c $JBOSS_CONFIG 2>&1
> $JBOSS_CONSOLE_LOG &
92c92
< su - $JBOSS_USER -c "LAUNCH_JBOSS_IN_BACKGROUND=1
JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT -c $JBOSS_CONFIG" 2>&1 >
$JBOSS_CONSOLE_LOG &
---
> su - $JBOSS_USER -c "LAUNCH_JBOSS_IN_BACKGROUND=1
JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT $JBOSS_OPTIONS -c $JBOSS_CONFIG"
2>&1 > $JBOSS_CONSOLE_LOG &
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira