在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:varlibmybrokerbinfile:C:varlibmybrokeretcartemis-roles.properties, reason: file:C:varlibmybrokeretcartemis-roles.properties (The filename, directory name, or volume label syntax is incorrect): java.io.FileNotFoundException: file:C:varlibmybrokeretcartemis-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]
该文件存在,我很确定这是因为 file:\C:\var\lib\mybroker\etc\artemis-roles.properties
Shodl be file:/C:/var/lib/mybroker/etc/artemis-roles.properties
但是我没有看到如何在服务器上的配置文件中配置它......
我怀疑你在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%etclogin.config