bin\activemq.bat stop
で止まらない
Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
ERROR: java.lang.RuntimeException: Failed to execute stop task.
Reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException
[Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused: connect]
java.lang.RuntimeException: Failed to execute stop task.
Reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException
[Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused: connect]
at org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:116)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:62)
at org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:387)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:62)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
at org.apache.activemq.console.Main.main(Main.java:115)
(以下略)
- 1099ポートで制御用のRMIがいるはずなのがいないということかな。
解決方法
conf\activemq.xml
のmanagementContext
を設定すればいいらしい。
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
↓
<managementContext>
<managementContext createConnector="true"/>
</managementContext>
> bin\activemq.bat stop
Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
Stopping broker: hogehoge