Re: ActiveMQ NMS and Failure Recovery

2016-10-10 Thread magmasystems
Thanks, Jim. I neglected to add that we are using the failover URI in
production. The main problem seems to be around surviving debugging. For
instance, I someone is debugging a service, and goes away for a cup of
coffee for a few minutes, they will invariably find that the broker has send
an NMSException. 

The pseudo-code for what we are trying to do is below. Let's assume that the
developer is working on his own laptop, with a locally-installed single
instance of ActiveMQ. 

// When initially creating a connection, we set the NMS
ExceptionListener handler
this.TheConnection.ExceptionListener += this.OnConnectionException;

// This will get called when we get a break in the connection
public virtual void OnConnectionException(Exception exception)
{
  if (exception is NMSException)
  this.TryExceptionRepair(exception as NMSException);
}

private void TryExceptionRepair(NMSException nmsException)
{
   // This is where we want to try to re-establish connections,
sessions, etc
}


Let's say that we have a single Connection, a single Session that is
associated with the connection, and a number of MessageConsumers and
MessageProducers that were created by that Session.

Is there a well-known pattern for re-establishing the environment when the
connection is broker?

Also, any advice regarding the URI is welcome.

Thanks,

Marc



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-and-Failure-Recovery-tp4717704p4717707.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Crash in ActiveMQConsumer::~ActiveMQConsumer()

2016-10-10 Thread Wayne Johnson
I have a dump resulting from a heap corruption when calling 
ActiveMQConsumer::~ActiveMQConsumer().  I wanted to ask you folks for any 
advice before I dig too far.  Scanned through Jira but didn't find anything 
current and pertinent.  I'm fairly new to ActiveMQ and the people who wrote the 
original code are long gone.

Details:
activemq-cpp 3.9.3 client on Windows build with VS2015.  activemq server 5.13.4 
in Java.

Crash occurs when we're disconnecting from a connection that appears to have 
died (we haven't heard from the server in a while).  

Stack: 
activemq-cpp.dll!decaf::lang::Pointer::onDeleteFunc(activemq::commands::BrokerError
 * value) Line 318    C++
 
activemq-cpp.dll!decaf::lang::Pointer::onDeleteFunc(activemq::commands::BrokerError
 * value) Line 318    C++
 [External Code]    
>    activemq-cpp.dll!activemq::core::ActiveMQConsumer::~ActiveMQConsumer() 
>Line 81    C++

I realize the issue may well be in our code.  Are there any logs, traces we can 
set up (short of wireshark) that might help?  Other debugging tools?   Thanks 
for any suggestions or help you can give me.
--- 
Wayne Johnson, | There are two kinds of people: Those 
                           | who say to God, "Thy will be done," 
                           | and those to whom God says, "All right, 
                           | then, have it your way." --C.S. Lewis


Re: java.io.EOFException when ActiveMQ starts

2016-10-10 Thread Tim Bain
And alternatively, is the broker(s) to which that URI connects up and
healthy?  Is there any relevant info in its/their logs?

On Oct 10, 2016 7:25 AM, "Tim Bain"  wrote:

> What's the value of ${JMS_X_SITE_CSV_URL} at runtime for your process?  Is
> it a valid URI?  Could something be wrong with that variable?
>
> On Oct 10, 2016 2:49 AM, "divinedragon"  wrote:
>
>> Ok. So, removing the  does get rid of the WARN entry.
>> But, then I don't want to remove it. What is the configuration issue with
>> the ???
>>
>> On Mon, Oct 10, 2016 at 12:16 PM, Tim Bain [via ActiveMQ] <
>> ml-node+s2283324n4717710...@n4.nabble.com> wrote:
>>
>> > Does the behavior change if you comment out your 
>> > element?  I can't think of a reason why a problem there would cause the
>> > broker to shut down, but since that's the first place the shutdown
>> > manifests in the logs, let's see if there really is a link between the
>> two
>> > or if it's a red herring.
>> >
>> > Tim
>> >
>> > On Sun, Oct 9, 2016 at 10:48 PM, divinedragon <[hidden email]
>> > > wrote:
>> >
>> > > My activemq.xml is configured like below.
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > > View this message in context: http://activemq.2283324.n4.
>> > > nabble.com/java-io-EOFException-when-ActiveMQ-
>> > > starts-tp4717598p4717709.html
>> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> > >
>> >
>> >
>> > --
>> > If you reply to this email, your message will be added to the discussion
>> > below:
>> > http://activemq.2283324.n4.nabble.com/java-io-EOFException-
>> when-ActiveMQ-
>> > starts-tp4717598p4717710.html
>> > To unsubscribe from java.io.EOFException when ActiveMQ starts, click
>> here
>> > > jtp?macro=unsubscribe_by_code=4717598=anVzdGRwa0Bn
>> bWFpbC5jb218NDcxNzU5OHwtMjEzOTUzNTk3Ng==>
>> > .
>> > NAML
>> > > jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.
>> naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.
>> NabbleNamespace-nabble.view.web.template.NodeNamespace&
>> breadcrumbs=notify_subscribers%21nabble%3Aemail.
>> naml-instant_emails%21nabble%3Aemail.naml-send_instant_
>> email%21nabble%3Aemail.naml>
>> >
>>
>>
>>
>>
>> --
>> View this message in context: http://activemq.2283324.n4.nab
>> ble.com/java-io-EOFException-when-ActiveMQ-starts-tp4717598p4717733.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


Re: java.io.EOFException when ActiveMQ starts

2016-10-10 Thread Tim Bain
What's the value of ${JMS_X_SITE_CSV_URL} at runtime for your process?  Is
it a valid URI?  Could something be wrong with that variable?

On Oct 10, 2016 2:49 AM, "divinedragon"  wrote:

> Ok. So, removing the  does get rid of the WARN entry.
> But, then I don't want to remove it. What is the configuration issue with
> the ???
>
> On Mon, Oct 10, 2016 at 12:16 PM, Tim Bain [via ActiveMQ] <
> ml-node+s2283324n4717710...@n4.nabble.com> wrote:
>
> > Does the behavior change if you comment out your 
> > element?  I can't think of a reason why a problem there would cause the
> > broker to shut down, but since that's the first place the shutdown
> > manifests in the logs, let's see if there really is a link between the
> two
> > or if it's a red herring.
> >
> > Tim
> >
> > On Sun, Oct 9, 2016 at 10:48 PM, divinedragon <[hidden email]
> > > wrote:
> >
> > > My activemq.xml is configured like below.
> > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context: http://activemq.2283324.n4.
> > > nabble.com/java-io-EOFException-when-ActiveMQ-
> > > starts-tp4717598p4717709.html
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> >
> >
> > --
> > If you reply to this email, your message will be added to the discussion
> > below:
> > http://activemq.2283324.n4.nabble.com/java-io-
> EOFException-when-ActiveMQ-
> > starts-tp4717598p4717710.html
> > To unsubscribe from java.io.EOFException when ActiveMQ starts, click here
> >  unsubscribe_by_code=4717598=anVzdGRwa0BnbWFpbC5jb218NDcxNz
> U5OHwtMjEzOTUzNTk3Ng==>
> > .
> > NAML
> >  NamlServlet.jtp?macro=macro_viewer=instant_html%
> 21nabble%3Aemail.naml=nabble.naml.namespaces.
> BasicNamespace-nabble.view.web.template.NabbleNamespace-
> nabble.view.web.template.NodeNamespace=
> notify_subscribers%21nabble%3Aemail.naml-instant_emails%
> 21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
> >
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/java-io-EOFException-when-ActiveMQ-
> starts-tp4717598p4717733.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: java.io.EOFException when ActiveMQ starts

2016-10-10 Thread divinedragon
Ok. So, removing the  does get rid of the WARN entry.
But, then I don't want to remove it. What is the configuration issue with
the ???

On Mon, Oct 10, 2016 at 12:16 PM, Tim Bain [via ActiveMQ] <
ml-node+s2283324n4717710...@n4.nabble.com> wrote:

> Does the behavior change if you comment out your 
> element?  I can't think of a reason why a problem there would cause the
> broker to shut down, but since that's the first place the shutdown
> manifests in the logs, let's see if there really is a link between the two
> or if it's a red herring.
>
> Tim
>
> On Sun, Oct 9, 2016 at 10:48 PM, divinedragon <[hidden email]
> > wrote:
>
> > My activemq.xml is configured like below.
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://activemq.2283324.n4.
> > nabble.com/java-io-EOFException-when-ActiveMQ-
> > starts-tp4717598p4717709.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://activemq.2283324.n4.nabble.com/java-io-EOFException-when-ActiveMQ-
> starts-tp4717598p4717710.html
> To unsubscribe from java.io.EOFException when ActiveMQ starts, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/java-io-EOFException-when-ActiveMQ-starts-tp4717598p4717733.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: java.io.EOFException when ActiveMQ starts

2016-10-10 Thread Tim Bain
Does the behavior change if you comment out your 
element?  I can't think of a reason why a problem there would cause the
broker to shut down, but since that's the first place the shutdown
manifests in the logs, let's see if there really is a link between the two
or if it's a red herring.

Tim

On Sun, Oct 9, 2016 at 10:48 PM, divinedragon  wrote:

> My activemq.xml is configured like below.
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/java-io-EOFException-when-ActiveMQ-
> starts-tp4717598p4717709.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>