当前位置: 首页 > 知识库问答 >
问题:

在具有有限权限的用户下启动WildFly 8.2

娄飞鸾
2023-03-14

我试图在一个没有权限在WildFly主目录和子目录中写入的用户下启动WildFly 8.2。为此,我已经将独立的目录复制到用户主目录。下面是我用来在cygwin中启动WildFly的命令:

$ /cygdrive/c/Program\ Files/wildfly-8.2.0.Final/bin/standalone.sh -Djboss.server.base.dir='C:\Users\above_mentioned_user\standalone' -c standalone.xml

这是这个命令的输出:

cygpath: can't convert empty path
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: C:\Program Files\wildfly-8.2.0.Final

  JAVA: /cygdrive/c/Program Files/Java/jdk1.7.0_51/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

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

java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
        at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:119)
        at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:338)
        at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:291)
        at org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:300)
        at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:542)
        at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:97)
        at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:300)
        at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:262)
        at java.util.logging.LogManager$2.run(LogManager.java:312)
        at java.util.logging.LogManager$2.run(LogManager.java:310)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:310)
        at java.util.logging.LogManager.getLogManager(LogManager.java:292)
        at java.util.logging.Logger.<init>(Logger.java:264)
        at java.util.logging.Logger.<init>(Logger.java:260)
        at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1430)
        at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1428)
        at java.util.logging.LogManager$1.run(LogManager.java:196)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.util.logging.LogManager.<clinit>(LogManager.java:173)
        at org.jboss.modules.Main.main(Main.java:443)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:117)
        ... 20 more
Caused by: java.io.FileNotFoundException: C:\Program Files\wildfly-8.2.0.Final\standalone\log\server.log (The system cannot find the path specified)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
        at org.jboss.logmanager.handlers.FileHandler.setFile(FileHandler.java:154)
        at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setFile(PeriodicRotatingFileHandler.java:105)
        at org.jboss.logmanager.handlers.FileHandler.setFileName(FileHandler.java:192)
        at org.jboss.logmanager.handlers.FileHandler.<init>(FileHandler.java:122)
        at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.<init>(PeriodicRotatingFileHandler.java:73)
        ... 25 more
14:17:42,875 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 32) JBAS010280: Activating Infinispan subsystem.
14:17:42,884 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 40) JBAS011800: Activating Naming Subsystem
14:17:42,859 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
14:17:42,882 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 38) JBAS012615: Activated the following JSF Implementations: [main]
14:17:42,895 INFO  [org.jboss.remoting] (MSC service thread 1-8) JBoss Remoting version 4.0.6.Final
14:17:42,906 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 45) JBAS013171: Activating Security Subsystem
14:17:42,919 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
14:17:42,935 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.9.Final)
14:17:42,938 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 31) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
14:17:42,941 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
14:17:42,953 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010417: Started Driver service with driver-name = h2
14:17:42,960 INFO  [org.jboss.as.security] (MSC service thread 1-3) JBAS013170: Current PicketBox version=4.0.21.Final
14:17:42,967 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service
14:17:42,970 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-5) JBAS015400: Bound mail session [java:jboss/mail/Default]
14:17:43,040 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) JBAS017502: Undertow 1.1.0.Final starting
14:17:43,040 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017502: Undertow 1.1.0.Final starting
14:17:43,489 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017527: Creating file handler for path C:\Program Files\wildfly-8.2.0.Final/welcome-content
14:17:43,497 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017525: Started server default-server.
14:17:43,520 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017531: Host default-host starting
14:17:43,672 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) JBAS017519: Undertow HTTP listener default listening on /127.0.0.1:8080
14:17:43,719 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) JBAS015012: Started FileSystemDeploymentService for directory C:\Users\tazi0514\projects\nfv\r2\wildfly\deployments
14:17:43,808 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
14:17:43,994 INFO  [org.jboss.ws.common.management] (MSC service thread 1-7) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.2.Final
14:17:44,114 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
14:17:44,115 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
14:17:44,116 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 3294ms - Started 184 of 234 services (82 services are lazy, passive or on-demand)

正如您在上面的日志中看到的,首先WildFly尝试写入C:\Program Files\Wildfly-8.2.0。最终\独立\日志\server.log,即使命令行中指出了另一个目录作为服务器基本目录。由于缺乏权限而无法在那里写入WildFly继续正常启动服务器。

有没有办法让WildFly不要尝试在默认服务器基目录中写入日志?

共有3个答案

贺景铄
2023-03-14

我已经安装了WildFly 8.2。1在Ubuntu 18.04桌面上。我可以使用standalone从终端以root用户身份启动WildFly。sh没有问题,但当我从Intellij IDEA内部启动它时,它显示了上述错误。

为了解决这个问题,我在Ubuntu中创建了一个“野蝇”组,并使用chgrp将其设置为WildFly安装文件夹的组。然后我为该文件夹的组分配了rwx权限。最后,我将我的登录用户(Intellij IDEA在其下运行)添加到野蝇组。现在它在IDEA中运行,而不抱怨权限被拒绝。

钮实
2023-03-14

WildFly似乎忽略了jboss的值。服务器基础dir属性。但它仍然考虑了JBOSS\u BASE\u DIR环境变量的值。因此,我刚刚在BASH中创建了以下别名,以便有一个启动WildFly的捷径:

alias wildfly_start='JBOSS_BASE_DIR="$(realpath ~/wildfly)" /bin/bash -c "/cygdrive/c/Program\ Files/wildfly-8.2.0.Final/bin/standalone.sh -c standalone.xml"'

在我的例子中,cygwin中的用户主目录与Windows用户主目录一致。

苏宜人
2023-03-14

尝试从复制的独立目录中删除logging.properties。这是一个定义绝对日志文件路径的生成文件,我想在您的情况下,它仍然引用原始位置。

 类似资料:
  • 我试图弄清楚如何使用Ansible(version2.0.2.0和python 2.7.3)创建一个名为“deployer”的用户,并能够使用该id登录服务器,然后进行“apt-get install”之类的操作。我的剧本是这样的: 运行这个playbook后,我可以以“deployer”(例如ssh deployer@myserver)的身份ssh进入机器,但是如果我运行sudo命令,它总是要求

  • 我在Google BigQuery中创建了一个数据集,并下载了json auth文件。我试图从Jupyter笔记本中的python访问此数据集中的表,但我得到了错误: “禁止:403补丁https://bigquery.googleapis.com/bigquery/v2/projects/testdbt-bigquery-20200403/datasets/landing_zone_flight

  • 我想在laravel中创建一个RBAC系统,其中一个用户可以属于多个角色,每个角色可以有多个权限。中间件应在继续请求之前检查用户是否具有特定权限(在其任何角色内)。 我能够实施一个案例,其中 用户属于一个具有多个权限的角色 我需要实现具有多个权限的多个角色的用户。有什么指点吗?

  • 我试图连接一个简单的泛美卫生组织客户端到artemis wildfly经纪人。当我试图连接我的客户端时,我得到了以下信息: 警告[org.apache.activemq.artemis.core.protocol.mqtt](Thread-2(activemq-netty-threads-164875171))错误处理控制包,断开clientamq119032:user:null没有地址$sys.

  • 我找了很多,但都不适合我。 我有一个全新的LAMP服务器安装,通过任务命令安装。我的系统运行的是 7.4 和 MySql 8 出于某种原因,root用户(在我的例子中默认称为phpmyadmin)对DB没有权限。 我可以登录,所以我确信密码是正确的,但我无法创建数据库。 编辑 如建议,这是 新编辑 我试图在没有密码的情况下访问,按照这里报告的指南:... 我没有结果:( 停止MySQL服务器:su

  • 问题内容: 我通过以下方式创建了具有最低权限的用户: 效果很好。如果要在我的项目中检查权限,请使用 arda arda 检出:http : _//arda-maps.org:2480_ 。 所以我的问题是这些权利仍然允许诸如 更改顶点名称之类的 事情(因此我将LOVES更改为LOVESd)。但是,这扼杀了整个数据库的结构和功能! 那么,如何才能进一步限制权利呢?这真的很糟糕,因为我想让任何人都可以