You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Chirag Pujara <ch...@gmail.com> on 2014/01/20 23:35:52 UTC
Shutdown Activemq exception
I am using ActiveMq 5.10-SNAPSHOT and Zookeeper-3.4.5.
I have auto installer to install activemq and setup 3 instance on node.
config file:
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="
http://www.springframework.org/schema/beans" xmlns:amq="
http://activemq.apache.org/schema/core" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this
configuration file -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.conf}/credentials.properties</value>
</property>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="activemq_8200" dataDirectory="${activemq.data}">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry producerFlowControl="false" topic=">">
<!-- The constantPendingMessageLimitStrategy is used to
prevent
slow topic consumers to block producers and affect
other consumers
by limiting the number of messages that are
retained
For more information, see:
http://activemq.apache.org/slow-consumer-handling.html
-->
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="1000"/>
</pendingMessageLimitStrategy>
</policyEntry>
<policyEntry producerFlowControl="false" queue=">">
<deadLetterStrategy>
<!--
Use the prifix 'DLQ.' for the
destination name, and make
the DLQ a queue rather than a
topic
-->
<individualDeadLetterStrategy
queuePrefix="DLQ." useQueueForQueueMessages="true"/>
</deadLetterStrategy>
<!-- Use VM cursor for better latency
For more information, see:
http://activemq.apache.org/message-cursors.html
<pendingQueuePolicy>
<vmQueueCursor/>
</pendingQueuePolicy>
-->
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<!--
The managementContext is used to configure how ActiveMQ is
exposed in
JMX. By default, ActiveMQ uses the MBean server that is started
by
the JVM. For more information, see:
http://activemq.apache.org/jmx.html
-->
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<persistenceAdapter>
<replicatedLevelDB bind="tcp://0.0.0.0:0"
directory="${activemq.data}/leveldb" replicas="3" zkAddress="
gwxdev05.northamerica.cerner.net:2181,gwxdev05.northamerica.cerner.net:2182,
gwxdev05.northamerica.cerner.net:2183" zkPassword="password"
zkPath="/opt/gwx/activemqdata"/>
</persistenceAdapter>
<systemUsage>
<systemUsage sendFailIfNoSpace="true">
<memoryUsage>
<memoryUsage limit="256 mb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="1 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="128 mb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and
frame size to 100MB -->
<transportConnector name="openwire" uri="tcp://0.0.0.0:
${openwirePort}?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>
<transportConnector name="amqp" uri="amqp://0.0.0.0:
${amqpPort}?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>
</transportConnectors>
<!-- destroy the spring context on shutdown to stop jetty -->
<shutdownHooks>
<bean xmlns="http://www.springframework.org/schema/beans"
class="org.apache.activemq.hooks.SpringContextHook"/>
</shutdownHooks>
</broker>
<import resource="jetty.xml"/>
my init file has paramater that specifies port number.
On my old dev boxes this setup works fine. I uses linux 5.5.
On our new Box which is linux 6.4 if I run same job to installl activemq.
they start fine but when I tried to stop them I get following exception.
Stopping activemq_8100 service: dirname_prg:
/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/bin
-Dcom.sun.management.jmxremote.port=8100
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote
--jmxurl service:jmx:rmi:///jndi/rmi://127.0.0.1:8100/jmxrmi
INFO: Using default configuration
(you can configure options in one of these file: /etc/default/activemq
/home/activemq/.activemqrc)
INFO: Invoke the following command to create a configuration file
/opt/gwx/apache-activemq-5.10-SNAPSHOT/bin/activemq setup [
/etc/default/activemq | /home/activemq/.activemqrc ]
INFO: Using java
'/opt/gwx/apache-activemq-5.10-SNAPSHOT/jdk1.7.0_25/bin/java'
debug -- stop
INFO: Waiting at least 30 seconds for regular process termination of pid
'2410' :
Java Runtime: Oracle Corporation 1.7.0_25
/opt/gwx/apache-activemq-5.10-SNAPSHOT/jdk1.7.0_25/jre
Heap sizes: current=1004928k free=999683k max=1004928k
JVM args: -Xms1G -Xmx1G
-Djava.util.logging.config.file=logging.properties -Dhawtio.realm=activemq
-Dhawtio.role=admins
-Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal
-Djava.security.auth.login.config=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/conf/login.config
-Dactivemq.classpath=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/conf;
-Dactivemq.home=/opt/gwx/apache-activemq-5.10-SNAPSHOT
-Dactivemq.base=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100
-Dactivemq.conf=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/conf
-Dactivemq.data=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/data
Extensions classpath:
[/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib,/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib/camel,/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib/optional,/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib/web,/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib/extra,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib/camel,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib/optional,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib/web,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib/extra]
ACTIVEMQ_HOME: /opt/gwx/apache-activemq-5.10-SNAPSHOT
ACTIVEMQ_BASE: /opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100
ACTIVEMQ_CONF: /opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/conf
ACTIVEMQ_DATA: /opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/data
Connecting to pid: 2410
INFO: failed to resolve jmxUrl for pid:2410, using default JMX url
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]
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]
at
org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:116)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:387)
at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
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:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
at org.apache.activemq.console.Main.main(Main.java:115)
ERROR: java.lang.Exception: 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]
java.lang.Exception: 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]
at
org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:117)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:387)
at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
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:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: 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]
at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:358)
at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)
at
javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:227)
at
org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnector(AbstractJmxCommand.java:279)
at
org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnection(AbstractJmxCommand.java:302)
at
org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:81)
... 11 more
Caused by: javax.naming.ServiceUnavailableException [Root exception is
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is:
java.net.ConnectException: Connection refused]
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118)
at
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at
javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1925)
at
javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1892)
at
javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:275)
... 16 more
Caused by: java.rmi.ConnectException: Connection refused to host:
localhost; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:340)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at
com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:114)
... 21 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 26 more
and then it kills the process. I made sure that they both installation uses
same java version.
I am not sure whats wrong. My first installation was working by magic or
current box is missing some config.
Here is my shell script config:
ACTIVEMQ_BASE=`cd "$ACTIVEMQ_BASE" && pwd`
## Add system properties for this instance here (if needed), e.g
#export ACTIVEMQ_OPTS_MEMORY="-Xms256M -Xmx1G"
#export ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS_MEMORY
-Dorg.apache.activemq.UseDedicatedTaskRunner=true
-Djava.util.logging.config.file=logging.properties"
export
ACTIVEMQ_SUNJMX_CONTROL="-Dactivemq.jmx.url=service:jmx:rmi:///jndi/rmi://
127.0.0.1:8200/jmxrmi"
#
ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=8200 "
#ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password"
#ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.authenticate=false"
ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote.ssl=false"
#ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
-Dcom.sun.management.jmxremote"
export ACTIVEMQ_SUNJMX_START=$ACTIVEMQ_SUNJMX_START
export ACTIVEMQ_HOME=/opt/gwx/apache-activemq-5.10-SNAPSHOT
export ACTIVEMQ_BASE=$ACTIVEMQ_BASE
export JAVA_HOME=/opt/gwx/apache-activemq-5.10-SNAPSHOT/jdk1.7.0_25
${ACTIVEMQ_HOME}/bin/activemq "$@"
I also made sure it is not firewall issue. (I was able to use telnet to
connect to 8100 port)
any idea?
thanks,
chirag
Re: Shutdown Activemq exception
Posted by Chirag Pujara <ch...@gmail.com>.
I posted wrong config for shell script. I have one for 8100 port.
thanks,
chirag
On Mon, Jan 20, 2014 at 4:35 PM, Chirag Pujara <ch...@gmail.com>wrote:
> I am using ActiveMq 5.10-SNAPSHOT and Zookeeper-3.4.5.
>
> I have auto installer to install activemq and setup 3 instance on node.
>
> config file:
>
> <?xml version="1.0" encoding="UTF-8"?><beans xmlns="
> http://www.springframework.org/schema/beans" xmlns:amq="
> http://activemq.apache.org/schema/core" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd">
>
> <!-- Allows us to use system properties as variables in this
> configuration file -->
> <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> <property name="locations">
> <value>file:${activemq.conf}/credentials.properties</value>
> </property>
> </bean>
>
>
> <broker xmlns="http://activemq.apache.org/schema/core"
> brokerName="activemq_8200" dataDirectory="${activemq.data}">
>
>
> <destinationPolicy>
> <policyMap>
> <policyEntries>
> <policyEntry producerFlowControl="false" topic=">">
> <!-- The constantPendingMessageLimitStrategy is used
> to prevent
> slow topic consumers to block producers and
> affect other consumers
> by limiting the number of messages that are
> retained
> For more information, see:
>
>
> http://activemq.apache.org/slow-consumer-handling.html
>
> -->
> <pendingMessageLimitStrategy>
> <constantPendingMessageLimitStrategy limit="1000"/>
> </pendingMessageLimitStrategy>
> </policyEntry>
> <policyEntry producerFlowControl="false" queue=">">
> <deadLetterStrategy>
> <!--
> Use the prifix 'DLQ.' for the
> destination name, and make
> the DLQ a queue rather than a
> topic
> -->
> <individualDeadLetterStrategy
> queuePrefix="DLQ." useQueueForQueueMessages="true"/>
> </deadLetterStrategy>
> <!-- Use VM cursor for better latency
> For more information, see:
>
> http://activemq.apache.org/message-cursors.html
>
> <pendingQueuePolicy>
> <vmQueueCursor/>
> </pendingQueuePolicy>
> -->
> </policyEntry>
> </policyEntries>
> </policyMap>
> </destinationPolicy>
>
>
> <!--
> The managementContext is used to configure how ActiveMQ is
> exposed in
> JMX. By default, ActiveMQ uses the MBean server that is
> started by
> the JVM. For more information, see:
>
> http://activemq.apache.org/jmx.html
> -->
> <managementContext>
> <managementContext createConnector="false"/>
> </managementContext>
>
>
> <persistenceAdapter>
> <replicatedLevelDB bind="tcp://0.0.0.0:0"
> directory="${activemq.data}/leveldb" replicas="3" zkAddress="
> gwxdev05.northamerica.cerner.net:2181,
> gwxdev05.northamerica.cerner.net:2182,
> gwxdev05.northamerica.cerner.net:2183" zkPassword="password"
> zkPath="/opt/gwx/activemqdata"/>
> </persistenceAdapter>
>
>
>
> <systemUsage>
> <systemUsage sendFailIfNoSpace="true">
> <memoryUsage>
> <memoryUsage limit="256 mb"/>
> </memoryUsage>
> <storeUsage>
> <storeUsage limit="1 gb"/>
> </storeUsage>
> <tempUsage>
> <tempUsage limit="128 mb"/>
> </tempUsage>
> </systemUsage>
> </systemUsage>
>
>
> <transportConnectors>
> <!-- DOS protection, limit concurrent connections to 1000 and
> frame size to 100MB -->
> <transportConnector name="openwire" uri="tcp://0.0.0.0:
> ${openwirePort}?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>
> <transportConnector name="amqp" uri="amqp://0.0.0.0:
> ${amqpPort}?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>
> </transportConnectors>
>
> <!-- destroy the spring context on shutdown to stop jetty -->
> <shutdownHooks>
> <bean xmlns="http://www.springframework.org/schema/beans"
> class="org.apache.activemq.hooks.SpringContextHook"/>
> </shutdownHooks>
>
> </broker>
>
>
> <import resource="jetty.xml"/>
>
> my init file has paramater that specifies port number.
>
> On my old dev boxes this setup works fine. I uses linux 5.5.
>
> On our new Box which is linux 6.4 if I run same job to installl activemq.
> they start fine but when I tried to stop them I get following exception.
>
> Stopping activemq_8100 service: dirname_prg:
> /opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/bin
> -Dcom.sun.management.jmxremote.port=8100
> -Dcom.sun.management.jmxremote.authenticate=false
> -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote
> --jmxurl service:jmx:rmi:///jndi/rmi://127.0.0.1:8100/jmxrmi
> INFO: Using default configuration
> (you can configure options in one of these file: /etc/default/activemq
> /home/activemq/.activemqrc)
>
> INFO: Invoke the following command to create a configuration file
> /opt/gwx/apache-activemq-5.10-SNAPSHOT/bin/activemq setup [
> /etc/default/activemq | /home/activemq/.activemqrc ]
>
> INFO: Using java
> '/opt/gwx/apache-activemq-5.10-SNAPSHOT/jdk1.7.0_25/bin/java'
> debug -- stop
> INFO: Waiting at least 30 seconds for regular process termination of pid
> '2410' :
> Java Runtime: Oracle Corporation 1.7.0_25
> /opt/gwx/apache-activemq-5.10-SNAPSHOT/jdk1.7.0_25/jre
> Heap sizes: current=1004928k free=999683k max=1004928k
> JVM args: -Xms1G -Xmx1G
> -Djava.util.logging.config.file=logging.properties -Dhawtio.realm=activemq
> -Dhawtio.role=admins
> -Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal
> -Djava.security.auth.login.config=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/conf/login.config
> -Dactivemq.classpath=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/conf;
> -Dactivemq.home=/opt/gwx/apache-activemq-5.10-SNAPSHOT
> -Dactivemq.base=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100
> -Dactivemq.conf=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/conf
> -Dactivemq.data=/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/data
> Extensions classpath:
>
> [/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib,/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib/camel,/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib/optional,/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib/web,/opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/lib/extra,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib/camel,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib/optional,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib/web,/opt/gwx/apache-activemq-5.10-SNAPSHOT/lib/extra]
> ACTIVEMQ_HOME: /opt/gwx/apache-activemq-5.10-SNAPSHOT
> ACTIVEMQ_BASE: /opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100
> ACTIVEMQ_CONF: /opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/conf
> ACTIVEMQ_DATA: /opt/gwx/apache-activemq-5.10-SNAPSHOT/activemq_8100/data
> Connecting to pid: 2410
> INFO: failed to resolve jmxUrl for pid:2410, using default JMX url
> 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]
> 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]
> at
> org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:116)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:387)
> at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> 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:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
> at org.apache.activemq.console.Main.main(Main.java:115)
> ERROR: java.lang.Exception: 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]
> java.lang.Exception: 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]
> at
> org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:117)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.AbstractJmxCommand.execute(AbstractJmxCommand.java:387)
> at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> 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:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
> at org.apache.activemq.console.Main.main(Main.java:115)
> Caused by: 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]
> at
> javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:358)
> at
> javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)
> at
> javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:227)
> at
> org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnector(AbstractJmxCommand.java:279)
> at
> org.apache.activemq.console.command.AbstractJmxCommand.createJmxConnection(AbstractJmxCommand.java:302)
> at
> org.apache.activemq.console.command.ShutdownCommand.runTask(ShutdownCommand.java:81)
> ... 11 more
> Caused by: javax.naming.ServiceUnavailableException [Root exception is
> java.rmi.ConnectException: Connection refused to host: localhost; nested
> exception is:
> java.net.ConnectException: Connection refused]
> at
> com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118)
> at
> com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203)
> at javax.naming.InitialContext.lookup(InitialContext.java:411)
> at
> javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1925)
> at
> javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1892)
> at
> javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:275)
> ... 16 more
> Caused by: java.rmi.ConnectException: Connection refused to host:
> localhost; nested exception is:
> java.net.ConnectException: Connection refused
> at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
> at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
> at
> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
> at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:340)
> at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
> at
> com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:114)
> ... 21 more
> Caused by: java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:579)
> at java.net.Socket.connect(Socket.java:528)
> at java.net.Socket.<init>(Socket.java:425)
> at java.net.Socket.<init>(Socket.java:208)
> at
> sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
> at
> sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
> at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
> ... 26 more
>
>
> and then it kills the process. I made sure that they both installation
> uses same java version.
>
> I am not sure whats wrong. My first installation was working by magic or
> current box is missing some config.
>
> Here is my shell script config:
>
> ACTIVEMQ_BASE=`cd "$ACTIVEMQ_BASE" && pwd`
>
> ## Add system properties for this instance here (if needed), e.g
> #export ACTIVEMQ_OPTS_MEMORY="-Xms256M -Xmx1G"
> #export ACTIVEMQ_OPTS="$ACTIVEMQ_OPTS_MEMORY
> -Dorg.apache.activemq.UseDedicatedTaskRunner=true
> -Djava.util.logging.config.file=logging.properties"
>
> export
> ACTIVEMQ_SUNJMX_CONTROL="-Dactivemq.jmx.url=service:jmx:rmi:///jndi/rmi://
> 127.0.0.1:8200/jmxrmi"
> #
> ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=8200 "
> #ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
> -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password"
> #ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
> -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
> -Dcom.sun.management.jmxremote.authenticate=false"
> ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
> -Dcom.sun.management.jmxremote.ssl=false"
> #ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START
> -Dcom.sun.management.jmxremote"
>
> export ACTIVEMQ_SUNJMX_START=$ACTIVEMQ_SUNJMX_START
> export ACTIVEMQ_HOME=/opt/gwx/apache-activemq-5.10-SNAPSHOT
> export ACTIVEMQ_BASE=$ACTIVEMQ_BASE
>
> export JAVA_HOME=/opt/gwx/apache-activemq-5.10-SNAPSHOT/jdk1.7.0_25
>
> ${ACTIVEMQ_HOME}/bin/activemq "$@"
>
>
> I also made sure it is not firewall issue. (I was able to use telnet to
> connect to 8100 port)
>
> any idea?
>
> thanks,
> chirag
>