在linux中启动JBOSS时出现问题

时间:2010-12-30 06:43:26

标签: jboss

当我使用run.sh启动linux JBOSS服务器时,我收到此错误。任何人都可以帮助克服这一点。

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/jboss-5.1.0.GA

  JAVA: /usr/java/bin/java

  JAVA_OPTS: -Dprogram.name=run.sh -server -Xms256m -Xmx2048m -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true

  CLASSPATH: /opt/jboss-5.1.0.GA/bin/run.jar:/usr/java/lib/tools.jar

=========================================================================

log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: /opt/jboss-5.1.0.GA/server/default/log/boot.log (Permission denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
        at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
        at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
        at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
        at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
        at org.jboss.logging.log4j.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:70)
        at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:603)
        at org.jboss.logging.Logger.<init>(Logger.java:119)
        at org.jboss.logging.Logger.getLogger(Logger.java:567)
        at org.jboss.bootstrap.AbstractServerImpl.doInit(AbstractServerImpl.java:204)
        at org.jboss.bootstrap.AbstractServerImpl.init(AbstractServerImpl.java:173)
        at org.jboss.bootstrap.AbstractServerImpl.init(AbstractServerImpl.java:143)
        at org.jboss.Main.boot(Main.java:218)
        at org.jboss.Main$1.run(Main.java:556)
        at java.lang.Thread.run(Thread.java:619)
10:13:41,425 INFO  [ServerImpl] Starting JBoss (Microcontainer)...
10:13:41,425 INFO  [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)
10:13:41,426 INFO  [ServerImpl] Bootstrap URL: null
10:13:41,426 INFO  [ServerImpl] Home Dir: /opt/jboss-5.1.0.GA
10:13:41,426 INFO  [ServerImpl] Home URL: file:/opt/jboss-5.1.0.GA/
10:13:41,426 INFO  [ServerImpl] Library URL: file:/opt/jboss-5.1.0.GA/lib/
10:13:41,427 INFO  [ServerImpl] Patch URL: null
10:13:41,427 INFO  [ServerImpl] Common Base URL: file:/opt/jboss-5.1.0.GA/common/
10:13:41,427 INFO  [ServerImpl] Common Library URL: file:/opt/jboss-5.1.0.GA/common/lib/
10:13:41,427 INFO  [ServerImpl] Server Name: default
10:13:41,427 INFO  [ServerImpl] Server Base Dir: /opt/jboss-5.1.0.GA/server
10:13:41,427 INFO  [ServerImpl] Server Base URL: file:/opt/jboss-5.1.0.GA/server/
10:13:41,427 INFO  [ServerImpl] Server Config URL: file:/opt/jboss-5.1.0.GA/server/default/conf/
10:13:41,428 INFO  [ServerImpl] Server Home Dir: /opt/jboss-5.1.0.GA/server/default
10:13:41,428 INFO  [ServerImpl] Server Home URL: file:/opt/jboss-5.1.0.GA/server/default/
10:13:41,428 INFO  [ServerImpl] Server Data Dir: /opt/jboss-5.1.0.GA/server/default/data
10:13:41,428 INFO  [ServerImpl] Server Library URL: file:/opt/jboss-5.1.0.GA/server/default/lib/
10:13:41,428 INFO  [ServerImpl] Server Log Dir: /opt/jboss-5.1.0.GA/server/default/log
10:13:41,428 INFO  [ServerImpl] Server Native Dir: /opt/jboss-5.1.0.GA/server/default/tmp/native
10:13:41,428 INFO  [ServerImpl] Server Temp Dir: /opt/jboss-5.1.0.GA/server/default/tmp
10:13:41,428 INFO  [ServerImpl] Server Temp Deploy Dir: /opt/jboss-5.1.0.GA/server/default/tmp/deploy
10:13:41,935 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/opt/jboss-5.1.0.GA/server/default/conf/bootstrap.xml
10:13:42,392 INFO  [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]
10:13:42,395 INFO  [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]
10:13:42,616 INFO  [CopyMechanism] VFS temp dir: /opt/jboss-5.1.0.GA/server/default/tmp
10:13:42,616 INFO  [ZipEntryContext] VFS force nested jars copy-mode is enabled.
10:13:43,673 INFO  [ServerInfo] Java version: 1.6.0_21,Sun Microsystems Inc.
10:13:43,673 INFO  [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
10:13:43,673 INFO  [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 17.0-b16,Sun Microsystems Inc.
10:13:43,673 INFO  [ServerInfo] OS-System: Linux 2.6.18-164.el5,amd64
10:13:43,674 INFO  [ServerInfo] VM arguments: -Dprogram.name=run.sh -Xms256m -Xmx2048m -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/opt/jboss-5.1.0.GA/lib/endorsed
10:13:43,703 INFO  [JMXKernel] Legacy JMX core initialized
10:13:45,771 INFO  [ProfileServiceBootstrap] Loading profile: ProfileKey@fe14de0[domain=default, server=default, name=default]
log4j error: setFile(null,true) call failed.
java.io.FileNotFoundException: /opt/jboss-5.1.0.GA/server/default/log/server.log (Permission denied)
        at java.io.FileOutputStream.openAppend(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
        at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
        at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:215)
        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
        at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:220)
        at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)
        at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)
        at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)
        at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:394)
        at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:829)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)
        at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:743)
        at org.jboss.logging.Log4jService$URLWatchTimerTask.reconfigure(Log4jService.java:697)
        at org.jboss.logging.Log4jService$URLWatchTimerTask.run(Log4jService.java:636)
        at org.jboss.logging.Log4jService.setup(Log4jService.java:492)
        at org.jboss.logging.Log4jService.createService(Log4jService.java:528)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:344)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:320)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
        at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
        at $Proxy38.create(Unknown Source)
        at org.jboss.system.microcontainer.CreateDestroyLifecycleAction.installAction(CreateDestroyLifecycleAction.java:42)
        at org.jboss.system.microcontainer.CreateDestroyLifecycleAction.installAction(CreateDestroyLifecycleAction.java:37)
        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
        at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
        at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
        at org.jboss.system.ServiceController.create(ServiceController.java:422)
        at org.jboss.system.ServiceController.create(ServiceController.java:387)
        at org.jboss.system.deployers.ServiceDeployer.create(ServiceDeployer.java:158)
        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:96)
        at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
        at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
        at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
        at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
        at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
        at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
        at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
        at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
        at org.jboss.Main.boot(Main.java:221)
        at org.jboss.Main$1.run(Main.java:556)
        at java.lang.Thread.run(Thread.java:619)
log4j:ERROR Either File or DatePattern options are not set for appender [FILE].
10:13:47,132 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:8083/

2 个答案:

答案 0 :(得分:4)

你有几个选择

  1. 以root身份运行JBoss。我只是让一群IT人员用它来踢他们的猫。
  2. 专门为jboss创建一个用户/组,并为该组提供/opt/jboss-5.1.0.GA读/写权限的所有文件。然后以该用户
  3. 运行jboss
  4. 更改/opt/jboss-5.1.0.GA和子目录/文件世界读/写权限的所有读/写权限。
  5. 如果你想让每个人都有权利搞砸,我的意思是使用,我的JBoss目录使用这个:

    chmod -R a + rw /opt/jboss-5.1.0.GA

答案 1 :(得分:0)

可能这样也会有所帮助

创建jboss组并将用户jboss添加到该组:

# groupadd jboss
# useradd -s /bin/bash -g jboss jboss

创建jboss目录到/ opt / jboss的符号链接并赋予权限:

# ln -s /opt/jboss4.2-AES2.3Cert /opt/jboss
# chown -R jboss:jboss /opt/jboss /opt/jboss4.2-AES2.3Cert  /path/to/other/file or folder