You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Adrian Trenaman (JIRA)" <ji...@apache.org> on 2010/10/14 14:57:40 UTC

[jira] Created: (AMQ-2976) activemq stop can fail if the broker is not using the default JMX port 1099

activemq stop can fail if the broker is not using the default JMX port 1099
---------------------------------------------------------------------------

                 Key: AMQ-2976
                 URL: https://issues.apache.org/activemq/browse/AMQ-2976
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.4.0
            Reporter: Adrian Trenaman


If I run ActiveMQ on my local Linux box using the Sun JDK, I note that when I stop the broker with 'activemq stop' then it stops OK - it uses the stored PID from the pidfile to connect to the broker (presumably using JMX!) and do a graceful shutdown.

{code}
Connecting to pid: 13175
Stopping broker: amq01
{code}

However, I have a colleague using ActiveMQ with the IBM JDK, When he does 'activemq stop', it doesn't attempt to use the PID. Instead, it uses the default JMX RMI connector string. 

{code}
Connecting to JMX URL:
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
{code} 

Problem is that this broker is listening for JMX on a different port number! So, the attempt to stop the broker fails with a java.rmi.ConnectionException. 

Just wondering if anyone has seen anything like this? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2976) activemq stop can fail if the broker is not using the default JMX port 1099

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62588#action_62588 ] 

Adrian Trenaman commented on AMQ-2976:
--------------------------------------

Thanks Dejan! 

Am already using the activemq create stuff, and had noticed some wobbles concerning ACTIVEMQ_BASE and ACTIVEMQ_HOME. 

I think that for now the approach using the jmxuri is the way to go.

Thanks again,
Ade

> activemq stop can fail if the broker is not using the default JMX port 1099
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-2976
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2976
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0
>            Reporter: Adrian Trenaman
>
> If I run ActiveMQ on my local Linux box using the Sun JDK, I note that when I stop the broker with 'activemq stop' then it stops OK - it uses the stored PID from the pidfile to connect to the broker (presumably using JMX!) and do a graceful shutdown.
> {code}
> Connecting to pid: 13175
> Stopping broker: amq01
> {code}
> However, I have a colleague using ActiveMQ with the IBM JDK, When he does 'activemq stop', it doesn't attempt to use the PID. Instead, it uses the default JMX RMI connector string. 
> {code}
> Connecting to JMX URL:
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> {code} 
> Problem is that this broker is listening for JMX on a different port number! So, the attempt to stop the broker fails with a java.rmi.ConnectionException. 
> Just wondering if anyone has seen anything like this? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2976) activemq stop can fail if the broker is not using the default JMX port 1099

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62585#action_62585 ] 

Dejan Bosanac commented on AMQ-2976:
------------------------------------

You can use --jmxurl to specify non-standard port when stopping the broker, like 

bin/activemq stop --jmxurl service:jmx:rmi:///jndi/rmi://localhost:1199/jmxrmi

The other option is to create separate scripts and customize environment variables there

Take a look also at

bin/activemq create 

option that creates a separate broker instance automatically. If you choose this option note the bug fixed today (https://issues.apache.org/activemq/browse/AMQ-2975) regarding the location of the pid file.

> activemq stop can fail if the broker is not using the default JMX port 1099
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-2976
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2976
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0
>            Reporter: Adrian Trenaman
>
> If I run ActiveMQ on my local Linux box using the Sun JDK, I note that when I stop the broker with 'activemq stop' then it stops OK - it uses the stored PID from the pidfile to connect to the broker (presumably using JMX!) and do a graceful shutdown.
> {code}
> Connecting to pid: 13175
> Stopping broker: amq01
> {code}
> However, I have a colleague using ActiveMQ with the IBM JDK, When he does 'activemq stop', it doesn't attempt to use the PID. Instead, it uses the default JMX RMI connector string. 
> {code}
> Connecting to JMX URL:
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> {code} 
> Problem is that this broker is listening for JMX on a different port number! So, the attempt to stop the broker fails with a java.rmi.ConnectionException. 
> Just wondering if anyone has seen anything like this? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-2976) activemq stop can fail if the broker is not using the default JMX port 1099

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Trenaman resolved AMQ-2976.
----------------------------------

    Resolution: Working as Designed

> activemq stop can fail if the broker is not using the default JMX port 1099
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-2976
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2976
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0
>            Reporter: Adrian Trenaman
>
> If I run ActiveMQ on my local Linux box using the Sun JDK, I note that when I stop the broker with 'activemq stop' then it stops OK - it uses the stored PID from the pidfile to connect to the broker (presumably using JMX!) and do a graceful shutdown.
> {code}
> Connecting to pid: 13175
> Stopping broker: amq01
> {code}
> However, I have a colleague using ActiveMQ with the IBM JDK, When he does 'activemq stop', it doesn't attempt to use the PID. Instead, it uses the default JMX RMI connector string. 
> {code}
> Connecting to JMX URL:
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> {code} 
> Problem is that this broker is listening for JMX on a different port number! So, the attempt to stop the broker fails with a java.rmi.ConnectionException. 
> Just wondering if anyone has seen anything like this? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2976) activemq stop can fail if the broker is not using the default JMX port 1099

Posted by "Adrian Trenaman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62583#action_62583 ] 

Adrian Trenaman commented on AMQ-2976:
--------------------------------------

Problem is, I have multiple instances of ActiveMQ, running over the same activemq script! If I change the value of ACTIVEMQ_SUNJMX_CONTROL in the activemq script it'll work for one broker, but not for another. 

There's got to be a better way!

> activemq stop can fail if the broker is not using the default JMX port 1099
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-2976
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2976
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0
>            Reporter: Adrian Trenaman
>
> If I run ActiveMQ on my local Linux box using the Sun JDK, I note that when I stop the broker with 'activemq stop' then it stops OK - it uses the stored PID from the pidfile to connect to the broker (presumably using JMX!) and do a graceful shutdown.
> {code}
> Connecting to pid: 13175
> Stopping broker: amq01
> {code}
> However, I have a colleague using ActiveMQ with the IBM JDK, When he does 'activemq stop', it doesn't attempt to use the PID. Instead, it uses the default JMX RMI connector string. 
> {code}
> Connecting to JMX URL:
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> {code} 
> Problem is that this broker is listening for JMX on a different port number! So, the attempt to stop the broker fails with a java.rmi.ConnectionException. 
> Just wondering if anyone has seen anything like this? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2976) activemq stop can fail if the broker is not using the default JMX port 1099

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62582#action_62582 ] 

Dejan Bosanac commented on AMQ-2976:
------------------------------------

Hi Adrian,

this is expected behavior, as IBM JDK doesn't support connecting directly to the process. If you need to adapt your jmx url, change ACTIVEMQ_SUNJMX_CONTROL var in bin/activemq script

> activemq stop can fail if the broker is not using the default JMX port 1099
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-2976
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2976
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0
>            Reporter: Adrian Trenaman
>
> If I run ActiveMQ on my local Linux box using the Sun JDK, I note that when I stop the broker with 'activemq stop' then it stops OK - it uses the stored PID from the pidfile to connect to the broker (presumably using JMX!) and do a graceful shutdown.
> {code}
> Connecting to pid: 13175
> Stopping broker: amq01
> {code}
> However, I have a colleague using ActiveMQ with the IBM JDK, When he does 'activemq stop', it doesn't attempt to use the PID. Instead, it uses the default JMX RMI connector string. 
> {code}
> Connecting to JMX URL:
> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
> {code} 
> Problem is that this broker is listening for JMX on a different port number! So, the attempt to stop the broker fails with a java.rmi.ConnectionException. 
> Just wondering if anyone has seen anything like this? 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.