From nobody@FreeBSD.org  Mon Jun 24 11:44:00 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id D1B4743C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Jun 2013 11:44:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id C42E51181
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Jun 2013 11:44:00 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r5OBi0Fl081091
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Jun 2013 11:44:00 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r5OBi0du081084;
	Mon, 24 Jun 2013 11:44:00 GMT
	(envelope-from nobody)
Message-Id: <201306241144.r5OBi0du081084@oldred.freebsd.org>
Date: Mon, 24 Jun 2013 11:44:00 GMT
From: Hasan Alp iNAN <hasanalpinan@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: JBoss 7.2 Can't start with rc script
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         179927
>Category:       ports
>Synopsis:       java/jboss72 Can't start with rc script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-java
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 24 11:50:00 UTC 2013
>Closed-Date:    Sun Sep 08 20:58:45 UTC 2013
>Last-Modified:  Sun Sep  8 21:00:00 UTC 2013
>Originator:     Hasan Alp iNAN
>Release:        FreeBSD 9.1-RELEASE 64bit
>Organization:
>Environment:
FreeBSD app0.xxx.xxx.xxx 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #2: Fri Jun 21 09:17:18 EEST 2013     root@vs0.seyhan.bel.tr:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Hi 

I installed JBoss application server inside a jail. I edited standalone.xml file for Jail IP. When I tried to start JBoss 7.2; startup script can't start JBoss. 

When I tried 

daemon -u www /usr/local/jboss-as-7.2.0.Final/bin/standalone.sh

or

./standalone.sh (user root)

commands JBoss start successfully.

I also checked to file permissions

chown -R www:www /usr/local/jboss-as-7.2.0.Final

but nothing change. 

In /etc/rc.conf file 

jboss72_enable="YES"
>How-To-Repeat:
service jboss72 start
/usr/local/etc/rc.d/jboss72 start
>Fix:


>Release-Note:
>Audit-Trail:

From: Alexander Yerenkow <yerenkow@gmail.com>
To: Hasan Alp iNAN <hasanalpinan@gmail.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: java/179927: JBoss 7.2 Can't start with rc script
Date: Mon, 24 Jun 2013 14:53:25 +0300

 --20cf307ac3e95f7ed304dfe50f61
 Content-Type: text/plain; charset=ISO-8859-1
 
 it's being investigated (some shell changes), you can edit rc script and
 change
 
   daemon -u ${%%APP_SHORTNAME%%_user} ${JBOSS_HOME}/bin/standalone.sh
 ${%%APP_SHORTNAME%%_logging} >> ${%%APP_SHORTNAME%%_logdir}/boot.log 2>>
 ${%%APP_SHORTNAME%%_logdir}/boot.log
 
 
 to
 
 daemon -u ${%%APP_SHORTNAME%%_user} ${JBOSS_HOME}/bin/standalone.sh >>
 ${%%APP_SHORTNAME%%_logdir}/stdout.log 2>>
 ${%%APP_SHORTNAME%%_logdir}/stderr.log >>
 ${%%APP_SHORTNAME%%_logdir}/boot.log 2>>
 ${%%APP_SHORTNAME%%_logdir}/boot.log
 
 -- 
 Regards,
 Alexander Yerenkow
 
 --20cf307ac3e95f7ed304dfe50f61--

From: Mark Linimon <linimon@lonesome.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: java/179927: JBoss 7.2 Can't start with rc script
Date: Wed, 26 Jun 2013 03:17:45 -0500

 ----- Forwarded message from horst leitenmueller <horst.leitenmueller@liwest.at> -----
 
 Date: Wed, 26 Jun 2013 09:46:55 +0200
 From: horst leitenmueller <horst.leitenmueller@liwest.at>
 To: Alexander Yerenkow <yerenkow@gmail.com>
 Cc: hasanalpinan@gmail.com, "freebsd-java@freebsd.org" <freebsd-java@FreeBSD.org>
 Subject: Re: java/179927: JBoss 7.2 Can't start with rc script
 X-Mailer: Apple Mail (2.1503)
 
 hi Alexander,
 
 this is not enough
 
 the script has more problems: 
 
 1) if i call the generate startup code i get the error message 
 /usr/local/etc/rc.d/jboss72 start
 
 calls 
 daemon -u www /usr/local/jboss-as-7.2.0.Final/bin/standalone.sh  >> /var/log/jboss72/stdout.log 2>> /var/log/jboss72/stderr.log >> /var/log/jboss72/boot.log 2>> /var/log/jboss72/boot.log
 Ambiguous output redirect.
 
 if i remove the >> /var/log/jboss72/boot.log 2>> /var/log/jboss72/boot.log
 its working...
 
 
 2) the jboss startup attributes are also missing jboss_args  they are
 declared but not sent to standalone.sh
 
 -b 0.0.0.0 -bmanagement 0.0.0.0 -c standalone-full.xml as example
       
 daemon -u ${jboss72_user} ${JBOSS_HOME}/bin/standalone.sh ${jboss72_args} >> ${jboss72_logdir}/stdout.log 2>> ${jboss72_logdir}/stderr.log
 
 results in 
 daemon -u www /usr/local/jboss-as-7.2.0.Final/bin/standalone.sh  -b 0.0.0.0 -bmanagement 0.0.0.0 -c standalone-full.xml  >> /var/log/jboss72/stdout.log 2>> /var/log/jboss72/stderr.log 
 
 is same like direct call from terminal
 /usr/local/jboss-as-7.2.0.Final/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0 -c standalone.xml
 and it will start; 
 
 jboss72_enable="YES"
 jboss72_jvm_opts=" -server -Xms128m -Xmx512m -XX:MaxPermSize=256m"
 >>> not working !!   jboss72_args=" -b 0.0.0.0 -bmanagement 0.0.0.0 -c standalone-full.xml "  # standalone.xml standalone-full.xml
 
 
 it will not work, because params are not given to standalone.sh
 
 3) please add at the end & from the script not to block the terminal ; also for stopping
 
 4) cool would be to be definable which i want to start standalone.sh / domain.sh 
 
 5) cool would be also to get info after installation that its needed to execute 
       /usr/local/jboss-as-7.2.0.Final/bin/add-user.sh for administration access
 
 
 br horst
 
 ----- End forwarded message -----
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Sun Sep 8 20:58:45 UTC 2013 
State-Changed-Why:  
Hopefully fixed with referenced commit.  Please report if it doesn't. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=179927 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/179927: commit references a PR
Date: Sun,  8 Sep 2013 20:56:44 +0000 (UTC)

 Author: crees
 Date: Sun Sep  8 20:56:37 2013
 New Revision: 326770
 URL: http://svnweb.freebsd.org/changeset/ports/326770
 
 Log:
   The format for bind.address has changed, so document and alert users.
   
   At the same time, fix some errors for logging in the rc script.
   
   PR:		ports/179927
   Submitted by:	Alexander Yerenkow <yerenkow@gmail.com> (maintainer)
 
 Added:
   head/java/jboss72/pkg-message   (contents, props changed)
 Modified:
   head/java/jboss72/Makefile
   head/java/jboss72/files/jboss72.in
 
 Modified: head/java/jboss72/Makefile
 ==============================================================================
 --- head/java/jboss72/Makefile	Sun Sep  8 20:01:03 2013	(r326769)
 +++ head/java/jboss72/Makefile	Sun Sep  8 20:56:37 2013	(r326770)
 @@ -55,6 +55,9 @@ do-build:
  do-install:
  	${MKDIR} ${PREFIX}/${DISTNAME} && cd ${JBOSSOUTPUT} && ${FIND} . | ${CPIO} -pdmu -R ${USER}:${GROUP} ${PREFIX}/${DISTNAME}
  
 +post-install:
 +	@${CAT} ${PKGMESSAGE}
 +
  .include <bsd.port.pre.mk>
  
  .if ${OSVERSION} < 800000
 
 Modified: head/java/jboss72/files/jboss72.in
 ==============================================================================
 --- head/java/jboss72/files/jboss72.in	Sun Sep  8 20:01:03 2013	(r326769)
 +++ head/java/jboss72/files/jboss72.in	Sun Sep  8 20:56:37 2013	(r326770)
 @@ -11,9 +11,9 @@
  
  # Add the following lines to /etc/rc.conf to enable %%APP_SHORTNAME%%:
  # %%APP_SHORTNAME%%_enable (bool):      Set to "YES" to enable %%APP_SHORTNAME%%
 -# %%APP_SHORTNAME%%_jvm_opts (str):     Extra JVM flags.
  # %%APP_SHORTNAME%%_args (str):         Optional arguments to JBoss
 -# %%APP_SHORTNAME%%_logging (str)       JBoss log output. A pipe command may be used.
 +# %%APP_SHORTNAME%%_log_stdout (str)       JBoss log output stdout, filename.
 +# %%APP_SHORTNAME%%_log_stderr (str)       JBoss log output stderr, filename.
  #
  
  . /etc/rc.subr
 @@ -24,7 +24,9 @@ rcvar=%%APP_SHORTNAME%%_enable
  load_rc_config $name
  
  %%APP_SHORTNAME%%_enable="${%%APP_SHORTNAME%%_enable:-"NO"}"
 -%%APP_SHORTNAME%%_logging="${%%APP_SHORTNAME%%_logging:-">> ${%%APP_SHORTNAME%%_logdir}/stdout.log 2>> ${%%APP_SHORTNAME%%_logdir}/stderr.log"}"
 +%%APP_SHORTNAME%%_log_stdout="${%%APP_SHORTNAME%%_log_stdout:-"${%%APP_SHORTNAME%%_logdir}/stdout.log"}"
 +%%APP_SHORTNAME%%_log_stderr="${%%APP_SHORTNAME%%_log_stderr:-"${%%APP_SHORTNAME%%_logdir}/stderr.log"}"
 +%%APP_SHORTNAME%%_args="${%%APP_SHORTNAME%%_args:-""}"
  %%APP_SHORTNAME%%_sleep="${%%APP_SHORTNAME%%_sleep:-"5"}"
  %%APP_SHORTNAME%%_kill9="${%%APP_SHORTNAME%%_kill9:-""}"
  %%APP_SHORTNAME%%_additional_killall="${%%APP_SHORTNAME%%_additional_killall:-""}"
 @@ -45,7 +47,7 @@ JBOSS_HOME="%%APP_HOME%%"
  	fi
  
  	echo "Starting %%APP_SHORTNAME%%."
 -	daemon -u ${%%APP_SHORTNAME%%_user} ${JBOSS_HOME}/bin/standalone.sh ${%%APP_SHORTNAME%%_logging} >> ${%%APP_SHORTNAME%%_logdir}/boot.log 2>> ${%%APP_SHORTNAME%%_logdir}/boot.log
 +	daemon -u ${%%APP_SHORTNAME%%_user} ${JBOSS_HOME}/bin/standalone.sh ${%%APP_SHORTNAME%%_args} >> ${%%APP_SHORTNAME%%_log_stdout} 2>> ${%%APP_SHORTNAME%%_log_stderr} >> ${%%APP_SHORTNAME%%_logdir}/boot.log 2>> ${%%APP_SHORTNAME%%_logdir}/boot.log
  
  	sleep ${%%APP_SHORTNAME%%_sleep}	# let daemon(8) and sh(1) finish before executing pgrep(1)
  	pgrep -U ${%%APP_SHORTNAME%%_user} -f ${JBOSS_HOME}/modules > ${pidfile}
 
 Added: head/java/jboss72/pkg-message
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/java/jboss72/pkg-message	Sun Sep  8 20:56:37 2013	(r326770)
 @@ -0,0 +1,8 @@
 +To make JBoss bind to all interfaces add this to /etc/rc.conf:
 +
 +jboss72_args="-Djboss.bind.address=0.0.0.0"
 +
 +Old format (-b 0.0.0.0 are not working in 7.2).
 +
 +You can also specify any other tunables which could be parsed by start scripts.
 +To change JVM args, edit appropriate standalone.conf.
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
