Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 40639

Summary: jboss-3.2.3 conf.d/jboss needs to set an additional jboss property
Product: Gentoo Linux Reporter: Dan A. Dickey <dan.dickey>
Component: [OLD] ServerAssignee: Matthew Kennedy (RETIRED) <mkennedy>
Status: VERIFIED NEEDINFO    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dan A. Dickey 2004-02-06 13:22:39 UTC
The way that the 3.2.3 ebuild breaks up the jboss directories
will turn out to work well I hope.  Currently though, it doesn't
set one thing that it should - so all logging is lost.
At least the default logging to server.log specified by log4j.xml
gets thrown away.

Check into /etc/conf.d/jboss after emerging 3.2.3.
Look for the line like 'SERVER_HOME="/var/lib/jboss"'
Add this line right after that:
SERVER_SETTINGS="${SERVER_SETTINGS} -Djboss.server.base.dir=${SERVER_HOME}"

and you should be set to go.
If you need a patch for this, let me know and I'll try to provide one.
My current conf.d/jboss file has other modifications as well so this isn't a quick one to do.


Reproducible: Always
Steps to Reproduce:
1.  Start jboss
2.  look for a server.log file in the appropriate configuration log directory.
3.  it is not there.

Actual Results:  
No server.log file - no log output. 

Expected Results:  
Created a server.log file in the appropriate configuration log directory, 
and appended log messages to it.
Comment 1 unlord 2004-02-07 14:55:52 UTC
I am having a similar problem, I upgraded from jboss-3.2.1 and now it doesn't log things properly.  In fact, it also doesn't start up properly.  I think its some how related to the logging issue, because /etc/init.d/jboss seems to hang right before it starts the logger service.

Here is the output I get:

================================================================================
                                                                                                                                                                                                     
  JBoss Bootstrap Environment
                                                                                                                                                                                                     
  JBOSS_HOME: /usr/share/jboss
                                                                                                                                                                                                     
  JAVA: /opt/blackdown-jdk-1.4.1/bin/java
                                                                                                                                                                                                     
  JAVA_OPTS:  -Djboss.server.temp.dir=/var/tmp/jboss -Djboss.server.data.dir=/var/cache/jboss -Djboss.server.base.url=file:///var/lib/jboss -Djboss.server.exitonshutdown=false -Dprogram.name=run.sh                                                                                                                                                                                                     
  CLASSPATH: /usr/share/jboss/bin/run.jar:/opt/blackdown-jdk-1.4.1/lib/tools.jar
                                                                                                                                                                                                     
================================================================================
                                                                                                                                                                                                     
log4j:ERROR Failed to create directory structure: /usr/share/jboss/server/default/log
log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: /usr/share/jboss/server/default/log/boot.log (No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:176)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123)
        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
        at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)
        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
        at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:500)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:406)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
        at org.jboss.logging.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:63)
        at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:320)
        at org.jboss.logging.Logger.<init>(Logger.java:78)
        at org.jboss.logging.Logger.getLogger(Logger.java:267)
        at javax.management.NotificationBroadcasterSupport.<init>(NotificationBroadcasterSupport.java:29)
        at org.jboss.system.server.ServerImpl.doInit(ServerImpl.java:141)
        at org.jboss.system.server.ServerImpl.init(ServerImpl.java:126)
        at org.jboss.Main.boot(Main.java:145)
        at org.jboss.Main$1.run(Main.java:395)
        at java.lang.Thread.run(Thread.java:536)
17:49:06,429 INFO  [Server] Starting JBoss (MX MicroKernel)...
17:49:06,430 INFO  [Server] Release ID: JBoss [WonderLand] 3.2.3 (build: CVSTag=JBoss_3_2_3 date=200402071313)
17:49:06,430 INFO  [Server] Home Dir: /usr/share/jboss
17:49:06,430 INFO  [Server] Home URL: file:/usr/share/jboss/
17:49:06,431 INFO  [Server] Library URL: file:/usr/share/jboss/lib/
17:49:06,431 INFO  [Server] Patch URL: null
17:49:06,432 INFO  [Server] Server Name: default
17:49:06,432 INFO  [Server] Server Home Dir: /usr/share/jboss/server/default
17:49:06,432 INFO  [Server] Server Home URL: file:/var/lib/jboss/default/
17:49:06,432 INFO  [Server] Server Data Dir: /var/cache/jboss
17:49:06,435 INFO  [Server] Server Temp Dir: /var/tmp/jboss
17:49:06,435 INFO  [Server] Server Config URL: file:/var/lib/jboss/default/conf/
17:49:06,435 INFO  [Server] Server Library URL: file:/var/lib/jboss/default/lib/
17:49:06,435 INFO  [Server] Root Deployment Filename: jboss-service.xml
17:49:06,438 INFO  [Server] Starting General Purpose Architecture (GPA)...
17:49:07,383 INFO  [ServerInfo] Java version: 1.4.1,Blackdown Java-Linux Team
17:49:07,383 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM Blackdown-1.4.1-01,Blackdown Java-Linux Team
17:49:07,383 INFO  [ServerInfo] OS-System: Linux 2.4.22,i386
17:49:07,417 INFO  [ServiceController] Controller MBean online
17:49:07,501 INFO  [MainDeployer] Started jboss.system:service=MainDeployer
17:49:07,579 INFO  [MainDeployer] Adding deployer: org.jboss.deployment.JARDeployer@115273a
17:49:07,580 INFO  [JARDeployer] Started jboss.system:service=JARDeployer
17:49:07,614 INFO  [MainDeployer] Adding deployer: org.jboss.deployment.SARDeployer@1bcc0bc
17:49:07,622 INFO  [SARDeployer] Started jboss.system:service=ServiceDeployer
17:49:07,622 INFO  [Server] Core system initialized
17:49:07,634 INFO  [MainDeployer] Starting deployment of package: file:/var/lib/jboss/default/conf/jboss-service.xml

It then hangs here and does nothing more.

On a second system where I did *not* upgrade, the output looked like this:

================================================================================
                                                                                                                                                                                                     
  JBoss Bootstrap Environment
                                                                                                                                                                                                     
  JBOSS_HOME: /usr/share/jboss
                                                                                                                                                                                                     
  JAVA: /opt/blackdown-jdk-1.4.1/bin/java
                                                                                                                                                                                                     
  JAVA_OPTS:  -Djboss.server.temp.dir=/var/tmp/jboss -Djboss.server.data.dir=/var/cache/jboss -Djboss.server.base.url=file:///var/lib/jboss -Djboss.server.exitonshutdown=false -Dprogram.name=run.sh                                                                                                                                                                                                     
  CLASSPATH: /usr/share/jboss/bin/run.jar:/opt/blackdown-jdk-1.4.1/lib/tools.jar
                                                                                                                                                                                                     
================================================================================
                                                                                                                                                                                                     
log4j:ERROR Failed to create directory structure: /usr/share/jboss/server/default/log
log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: /usr/share/jboss/server/default/log/boot.log (No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:176)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123)
        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
        at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)
        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
        at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:500)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:406)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
        at org.jboss.logging.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:63)
        at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:320)
        at org.jboss.logging.Logger.<init>(Logger.java:78)
        at org.jboss.logging.Logger.getLogger(Logger.java:267)
        at javax.management.NotificationBroadcasterSupport.<init>(NotificationBroadcasterSupport.java:29)
        at org.jboss.system.server.ServerImpl.doInit(ServerImpl.java:141)
        at org.jboss.system.server.ServerImpl.init(ServerImpl.java:126)
        at org.jboss.Main.boot(Main.java:145)
        at org.jboss.Main$1.run(Main.java:395)
        at java.lang.Thread.run(Thread.java:536)
17:54:21,243 INFO  [Server] Starting JBoss (MX MicroKernel)...
17:54:21,244 INFO  [Server] Release ID: JBoss [WonderLand] 3.2.3 (build: CVSTag=JBoss_3_2_3 date=200401211102)
17:54:21,246 INFO  [Server] Home Dir: /usr/share/jboss
17:54:21,246 INFO  [Server] Home URL: file:/usr/share/jboss/
17:54:21,247 INFO  [Server] Library URL: file:/usr/share/jboss/lib/
17:54:21,248 INFO  [Server] Patch URL: null
17:54:21,248 INFO  [Server] Server Name: default
17:54:21,248 INFO  [Server] Server Home Dir: /usr/share/jboss/server/default
17:54:21,248 INFO  [Server] Server Home URL: file:/var/lib/jboss/default/
17:54:21,248 INFO  [Server] Server Data Dir: /var/cache/jboss
17:54:21,251 INFO  [Server] Server Temp Dir: /var/tmp/jboss
17:54:21,251 INFO  [Server] Server Config URL: file:/var/lib/jboss/default/conf/
17:54:21,251 INFO  [Server] Server Library URL: file:/var/lib/jboss/default/lib/
17:54:21,251 INFO  [Server] Root Deployment Filename: jboss-service.xml
17:54:21,282 INFO  [Server] Starting General Purpose Architecture (GPA)...
17:54:21,587 INFO  [ServerInfo] Java version: 1.4.1,Blackdown Java-Linux Team
17:54:21,587 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM Blackdown-1.4.1-01,Blackdown Java-Linux Team
17:54:21,588 INFO  [ServerInfo] OS-System: Linux 2.4.24,i386
17:54:21,652 INFO  [ServiceController] Controller MBean online
17:54:21,798 INFO  [MainDeployer] Started jboss.system:service=MainDeployer
17:54:21,903 INFO  [MainDeployer] Adding deployer: org.jboss.deployment.JARDeployer@115273a
17:54:21,903 INFO  [JARDeployer] Started jboss.system:service=JARDeployer
17:54:21,943 INFO  [MainDeployer] Adding deployer: org.jboss.deployment.SARDeployer@1bcc0bc
17:54:21,951 INFO  [SARDeployer] Started jboss.system:service=ServiceDeployer
17:54:21,952 INFO  [Server] Core system initialized
17:54:21,993 INFO  [MainDeployer] Starting deployment of package: file:/var/lib/jboss/default/conf/jboss-service.xml
17:54:25,786 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
17:54:26,250 INFO  [AbstractDeploymentScanner$ScannerThread] Running
17:54:26,259 INFO  [LocalJBossServerDomain] Started jboss.management.local:j2eeType=J2EEDomain,name=Manager
17:54:26,259 INFO  [Log4jService] Started jboss.system:type=Log4jService,service=Logging
17:54:26,271 INFO  [WebService] Started WebServer with address: 0.0.0.0:8083
17:54:26,277 INFO  [WebService] Using RMI server codebase: http://pagani:8083/
17:54:26,277 INFO  [WebService] Started jboss:service=WebService
17:54:26,312 INFO  [NamingService] Starting jnp server
17:54:26,417 INFO  [NamingService] Started jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076
17:54:26,438 INFO  [NamingService] Listening on port 1099
17:54:26,448 INFO  [NamingService] Started jboss:service=Naming
17:54:26,449 INFO  [JNDIView] Started jboss:service=JNDIView
17:54:26,451 INFO  [SecurityConfig] Started jboss.security:service=SecurityConfig
17:54:26,498 INFO  [XMLLoginConfig] Started jboss.security:service=XMLLoginConfig
17:54:26,544 INFO  [JaasSecurityManagerService] Started jboss.security:service=JaasSecurityManager
17:54:26,580 INFO  [TransactionManagerService] Started jboss:service=TransactionManager
17:54:26,642 INFO  [JRMPInvoker] Started jboss:service=invoker,type=jrmp
17:54:26,713 INFO  [JRMPProxyFactory] Started jboss:service=proxyFactory,target=ClientUserTransactionFactory
...

I am at a loss as to how to further debug this problem, any ideas are welcome.
Comment 2 unlord 2004-02-08 23:16:48 UTC
I've solved the problem.  I unmerege'd and then emerge'd jboss and it fixed all the configuration issues.
Comment 3 Matthew Kennedy (RETIRED) gentoo-dev 2004-02-09 11:07:16 UTC
Dan, Have you tried unmerging and re-emerging jboss?
Comment 4 Dan A. Dickey 2004-02-09 11:20:31 UTC
No, I have not.
I'm busy working on a project that uses jboss,
so I don't know when I'll get to give that a try.
Hopefully, sometime this week.
I'll let you know the results when I do get time.
Comment 5 Dan A. Dickey 2004-02-11 15:33:42 UTC
Well, I feel sheepish.  :)

Yes, I have now unmerged and emerged jboss again.

However, this is not a bug, sorry that I brought it up.  Rather,
I wish I had looked a bit closer first and thought about
what was happening.

My problems stems from that I'm using "our own" log4j.xml
file, and not the one in the default configuration.  In fact,
we have our own configuration.  It is setup to work with RedHat,
but my desktop is Gentoo and so I was trying to run it there.
The log4j.xml file change was one that I carelessly forgot about
and hence I reported this problem.
So, nevermind...  I'm very sorry to have bothered everyone.
Comment 6 Matthew Kennedy (RETIRED) gentoo-dev 2004-02-13 08:16:01 UTC
No problem :)
Comment 7 unlord 2004-02-19 05:57:31 UTC
Ok, so I just upgraded another box to jboss 3.2.3 from 3.2.1-r1 and I am getting the same problem.  Looking at the output, it hangs right after this line:

08:44:04,965 INFO  [MainDeployer] Starting deployment of package: file:/var/lib/jboss/default/conf/jboss-service.xml

I'm not sure what it is, but if someone else has a lot of time on their hands, could they please verify that this happens to them when they go from 3.2.1-r1 to 3.2.3.
Comment 8 Matthew Kennedy (RETIRED) gentoo-dev 2004-02-25 09:33:34 UTC
Re: Common #7 

Try uninstalling JBoss, then remove any config protected stuff lefter behind, then reinstall JBoss.  It might not be possible to simply emerge -u  jboss from version 3.2.1-r1 to 3.2.3 as there were huge changes to how JBoss is installed from portage and for what directories are config-protected.


Comment 9 unlord 2004-02-25 21:12:32 UTC
Re: comment #8

What config protected stuff are you talking about?  As far as I could tell, the only files I needed to delete were:

  /etc/conf.d/jboss
  /etc/init.d/jboss

And the following directories

  /var/lib/jboss/

If there is anything else, please let me know.  I'm still having this problem.
Comment 10 unlord 2004-02-26 22:47:39 UTC
I have figured out my problem.  My /etc/hosts file was not setup properly and the machine hostname was not resolving.  A detailed description of what was wrong can be found in the bug report I filed.

http://sourceforge.net/tracker/index.php?func=detail&aid=905605&group_id=22866&atid=376685