AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-1057425

T_01's questions

Martin Hope
T_01
Asked: 2023-10-23 16:30:56 +0800 CST

如何将 artemis 安装为 Windows 服务?

  • 5

标题有点误导,因为我知道如何将 artemis 安装为 Windows 服务,根据文档,只需运行

artemis-service.exe install

这对我不起作用。我尝试使用 artemis 版本 2.31 和 2.29 安装并运行该服务。对于这两个版本,运行该服务都会生成以下登录信息artemis-service.wrapper.log

2023-10-23 10:19:50,116 DEBUG - Starting WinSW in the service mode
2023-10-23 10:19:50,147 INFO  - Starting %JAVA_HOME%\bin\java.exe  -XX:+UseParallelGC -Xms512M -Xmx1024M -classpath "C:\Program Files (x86)\apache-artemis-2.31.0\lib\artemis-boot.jar" "-Dartemis.home=C:\Program Files (x86)\apache-artemis-2.31.0" -Dartemis.instance=C:\ArtemisBroker -Ddata.dir=C:\ArtemisBroker\data -Dartemis.instance.etc=C:\ArtemisBroker\etc -Djava.security.auth.login.config=C:\ArtemisBroker\etc\login.config -Dhawtio.disableProxy=true -Dhawtio.realm=activemq -Dhawtio.offline="true" -Dhawtio.role=amq -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Djolokia.policyLocation=file:/C:/ArtemisBroker/etc/jolokia-access.xml org.apache.activemq.artemis.boot.Artemis run 
2023-10-23 10:19:50,178 DEBUG - Completed. Exit code is 0

并弹出以下警告:

在此输入图像描述

提供某种提示的唯一来源是 Windows 事件日志,其中包含以下条目:

在此输入图像描述

Service cannot be started. System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at winsw.Util.ProcessHelper.StartProcessAndCallbackForExit(Process processToStart, String executable, String arguments, Dictionary`2 envVars, String workingDirectory, Nullable`1 priority, ProcessCompletionCallback callback, Boolean redirectStdin, LogHandler logHandler, Boolean hideWindow)
   at winsw.WrapperService.StartProcess(Process processToStart, String arguments, String executable, LogHandler logHandler, Boolean redirectStdin)
   at winsw.WrapperService.OnStart(String[] args)
   at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

我检查了执行命令中的所有路径,但一切似乎都很好。

我唯一注意到的是条目

<startargument>-Djolokia.policyLocation=%ARTEMIS_INSTANCE_ETC_URI%/jolokia-access.xml</startargument>

和

<env name="ARTEMIS_INSTANCE_ETC_URI" value="file:/C:/ArtemisBroker/etc/"/>

,然后artemis-service.xml解决

-Djolokia.policyLocation=file:/C:/ArtemisBroker/etc//jolokia-access.xml org.apache.activemq.artemis.boot.Artemis

这似乎有点错误,但改变它(删除一个“/”)不会改变任何东西。

如何解决这个问题?

windows-service
  • 1 个回答
  • 35 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve