You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Rajesh Malla <ma...@gmail.com> on 2018/02/21 05:03:26 UTC

Network Connector not re-establishing

Hello

we are creating network connector b/w 
A->B
A->C

B->C
B->A

C->B
C->A

using networkttl=10.

Sample Network connector creation :
NetworkConnector networkConnector = new DiscoveryNetworkConnector(uri);
networkConnector.setNetworkTTL(this.networkTTL);
networkConnector.setBrokerURL(server.getUrl());

now for certain hours it is working properly, after some hours  connectors
b/w A,B is working properly but C is become isolated. means messages which
are in C are not getting consumed by other brokers [A,B)

Each of these are using one queue [testqueue]. have checked subscriptions on
that queue using jprofiler,
on A -> testqueue -> subscriptions -> B,C
     B -> testqueue -> subscriptions -> A
    C -> testqueue  -> subscriptions 0

when we are recreating n/w C->A  again then subscriptions is increasing C->A
and also messages are again consumed.

below is our broker configuration :
<destinationPolicy>
            <policyMap>
                <policyEntries> 
                    <policyEntry queue="testqueue"
producerFlowControl="true" useCache="false" memoryLimit="64 mb" />
                     
                    <policyEntry queue=">" producerFlowControl="true"
useCache="false" memoryLimit="64 mb">
                        <deadLetterStrategy>
                            <individualDeadLetterStrategy />
                        </deadLetterStrategy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>	

Please suggest any solution or let us know any other information you need.
disconnected n/w connector is not re-establishing.	    



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Network Connector not re-establishing

Posted by Tim Bain <tb...@alumni.duke.edu>.
Do your more recent posts (which don't appear to indicate that this
behavior is still occurring) mean that you've resolved your problem here?
If so, can you please explain what the problem was and what you did to fix
it?

Tim

On Wed, Feb 21, 2018 at 6:46 AM, Tim Bain <tb...@alumni.duke.edu> wrote:

>
>
> On Feb 20, 2018 11:26 PM, "Rajesh Malla" <ma...@gmail.com> wrote:
>
> Thank you Tim,
>
> activemq version 5.12.3
>
> it is our own code. dynamically using UI we are creating n/w connector. at
> that time below code execute.
> code snippet :
> NetworkConnector networkConnector = new DiscoveryNetworkConnector(uri);
> networkConnector.setNetworkTTL(this.networkTTL);
> networkConnector.setBrokerURL(server.getUrl());
>
> also jprofiler is using 'subscriptions' word even on queue. So queue's
> subscriptions showing as zero. but in logs no where finding any information
> on closing subscriptions.
>
> one information we are finding as warning :
> Network connection between vm://jcs-broker#7832 and HTTP Reader
> https://A:22002 shutdown due to a remote error:
> javax.jms.InvalidClientIDException: Broker: jcs-broker - Client:
> replication_3002_A_localhost_outbound already connected from
> blockingQueue_432061146
>
>
> This sounds like it's in C's logs, after the original connection
> disconnects, when A attempts to reconnect; is there anything in A's logs
> that indicates why the original connection was disconnected?
>
> Also all of this assumes that everything works correctly at first and
> then, later, the connections go bad. Is that accurate? Or does this failure
> occur as soon as you try to connect the brokers?
>
> exact error of losing connection not finding, even closing subscription
> also
> not finding. however using jprofiler when we are looking difference between
> A,C then we are finding A has 2 subscriptions with B & C
> where as C has only 0 subscriptions.
>
>
>
>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805
> .html
>
>
>

Re: Network Connector not re-establishing

Posted by Tim Bain <tb...@alumni.duke.edu>.
On Feb 20, 2018 11:26 PM, "Rajesh Malla" <ma...@gmail.com> wrote:

Thank you Tim,

activemq version 5.12.3

it is our own code. dynamically using UI we are creating n/w connector. at
that time below code execute.
code snippet :
NetworkConnector networkConnector = new DiscoveryNetworkConnector(uri);
networkConnector.setNetworkTTL(this.networkTTL);
networkConnector.setBrokerURL(server.getUrl());

also jprofiler is using 'subscriptions' word even on queue. So queue's
subscriptions showing as zero. but in logs no where finding any information
on closing subscriptions.

one information we are finding as warning :
Network connection between vm://jcs-broker#7832 and HTTP Reader
https://A:22002 shutdown due to a remote error:
javax.jms.InvalidClientIDException: Broker: jcs-broker - Client:
replication_3002_A_localhost_outbound already connected from
blockingQueue_432061146


This sounds like it's in C's logs, after the original connection
disconnects, when A attempts to reconnect; is there anything in A's logs
that indicates why the original connection was disconnected?

Also all of this assumes that everything works correctly at first and then,
later, the connections go bad. Is that accurate? Or does this failure occur
as soon as you try to connect the brokers?

exact error of losing connection not finding, even closing subscription also
not finding. however using jprofiler when we are looking difference between
A,C then we are finding A has 2 subscriptions with B & C
where as C has only 0 subscriptions.







--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Network Connector not re-establishing

Posted by Rajesh Malla <ma...@gmail.com>.
Thank you Tim,

activemq version 5.12.3

it is our own code. dynamically using UI we are creating n/w connector. at
that time below code execute.
code snippet :
NetworkConnector networkConnector = new DiscoveryNetworkConnector(uri); 
networkConnector.setNetworkTTL(this.networkTTL); 
networkConnector.setBrokerURL(server.getUrl()); 

also jprofiler is using 'subscriptions' word even on queue. So queue's
subscriptions showing as zero. but in logs no where finding any information
on closing subscriptions.

one information we are finding as warning :
Network connection between vm://jcs-broker#7832 and HTTP Reader
https://A:22002 shutdown due to a remote error:
javax.jms.InvalidClientIDException: Broker: jcs-broker - Client:
replication_3002_A_localhost_outbound already connected from
blockingQueue_432061146

exact error of losing connection not finding, even closing subscription also
not finding. however using jprofiler when we are looking difference between
A,C then we are finding A has 2 subscriptions with B & C
where as C has only 0 subscriptions.







--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Network Connector not re-establishing

Posted by Tim Bain <tb...@alumni.duke.edu>.
Is the networkConnector actually getting disconnected? Or are you simply
losing subscriptions (I'd call that "consumers" since this is a queue) over
a network link that remains up the whole time?

If the former, can you please post log information detailing the
disconnection and failed reconnection? If the latter, are there any
relevant log lines that correspond to the removal of the consumer?

Is the code you posted your own code, or is that just the broker's own code
that you're highlighting here? I assume the latter, but if that's your own
code, please explain what you're doing that results in you writing that
code rather than just using a <networkConnector> element in your broker
configuration.

Also, what version of ActiveMQ is this?

Tim

On Tue, Feb 20, 2018 at 10:03 PM, Rajesh Malla <ma...@gmail.com> wrote:

> Hello
>
> we are creating network connector b/w
> A->B
> A->C
>
> B->C
> B->A
>
> C->B
> C->A
>
> using networkttl=10.
>
> Sample Network connector creation :
> NetworkConnector networkConnector = new DiscoveryNetworkConnector(uri);
> networkConnector.setNetworkTTL(this.networkTTL);
> networkConnector.setBrokerURL(server.getUrl());
>
> now for certain hours it is working properly, after some hours  connectors
> b/w A,B is working properly but C is become isolated. means messages which
> are in C are not getting consumed by other brokers [A,B)
>
> Each of these are using one queue [testqueue]. have checked subscriptions
> on
> that queue using jprofiler,
> on A -> testqueue -> subscriptions -> B,C
>      B -> testqueue -> subscriptions -> A
>     C -> testqueue  -> subscriptions 0
>
> when we are recreating n/w C->A  again then subscriptions is increasing
> C->A
> and also messages are again consumed.
>
> below is our broker configuration :
> <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <policyEntry queue="testqueue"
> producerFlowControl="true" useCache="false" memoryLimit="64 mb" />
>
>                     <policyEntry queue=">" producerFlowControl="true"
> useCache="false" memoryLimit="64 mb">
>                         <deadLetterStrategy>
>                             <individualDeadLetterStrategy />
>                         </deadLetterStrategy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
>
> Please suggest any solution or let us know any other information you need.
> disconnected n/w connector is not re-establishing.
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>