启动时Artemis actimeMQ错误(Windows)

时间:2018-03-23 16:06:10

标签: windows activemq activemq-artemis

在Windows中安装artemis并在C:\ var \ lib \ mybroker

中创建代理

登录http://localhost:8161/console

后,我在服务器上收到错误消息
2018-03-23 16:59:08,469 ERROR [org.apache.activemq.artemis.core.server] AMQ224085: Failed to load property PropsFile=C:\var\lib\mybroker\bin\file:\C:\var\lib\mybroker\etc\artemis-roles.properties, reason: file:\C:\var\lib\mybroker\etc\artemis-roles.properties (The filename, directory name, or volume label syntax is incorrect): java.io.FileNotFoundException: file:\C:\var\lib\mybroker\etc\artemis-roles.properties (The filename, directory name, or volume label syntax is incorrect)
        at java.io.FileInputStream.open0(Native Method) [rt.jar:1.8.0_151]
        at java.io.FileInputStream.open(FileInputStream.java:195) [rt.jar:1.8.0_151]
        at java.io.FileInputStream.<init>(FileInputStream.java:138) [rt.jar:1.8.0_151]
        at org.apache.activemq.artemis.spi.core.security.jaas.ReloadableProperties.load(ReloadableProperties.java:99) [artemis-server-2.5.0.jar:2.5.0]
        at org.apache.activemq.artemis.spi.core.security.jaas.ReloadableProperties.obtained(ReloadableProperties.java:53) [artemis-server-2.5.0.jar:2.5.0]
        at org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoader.load(PropertiesLoader.java:52) [artemis-server-2.5.0.jar:2.5.0]
        at org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoginModule.initialize(PropertiesLoginModule.java:67) [artemis-server-2.5.0.jar:2.5.0]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_151]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_151]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_151]
        at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_151]
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:736) [rt.jar:1.8.0_151]
        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195) [rt.jar:1.8.0_151]
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682) [rt.jar:1.8.0_151]
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680) [rt.jar:1.8.0_151]
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_151]
        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) [rt.jar:1.8.0_151]
        at javax.security.auth.login.LoginContext.login(LoginContext.java:587) [rt.jar:1.8.0_151]
        at io.hawt.system.Authenticator.doAuthenticate(Authenticator.java:131) [hawtio-system-1.5.5.jar:1.5.5]

文件存在,我很确定这是因为文件:\ C:\ var \ lib \ mybroker \ etc \ artemis-roles.properties

Shodl是文件:/ C:/var/lib/mybroker/etc/artemis-roles.properties

但是我没有看到如何在服务器上的配置文件中配置它......

1 个答案:

答案 0 :(得分:1)

我怀疑你在artemis.profile.cmd上替换了错误的部分 -Djava.security.auth.login.config=%ARTEMIS_INSTANCE%\login.config 通过改为 -Djava.security.auth.login.config=%ARTEMIS_INSTANCE_ETC_URI%\login.config

确实你需要指向 etc 目录(我遇到同样的问题)但不是指向URI。 试试这个: -Djava.security.auth.login.config=%ARTEMIS_INSTANCE%\etc\login.config