Re: Active MQ - Master/Slave Config Not working

2017-07-26 Thread akpuvvada
heapdump-1501050187914.zip

  

Hi Tim,
Please find attached the Head Dump.

I am not sure how to read this, so, no idea what it is saying.

Let us know if you find anything.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550p4728904.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Netrwork of Brokers -Java Code - To connect dynamically to Available Brokers

2017-07-25 Thread akpuvvada
I have configured two servers with static discovery as NoB.

I am trying to configure a Java client to connect to connect to these
servers dynamically.

How do I configured the Connection factory to have this working.

Please advise.

I tried fail-over URL and it is not working as expected.

Instead of falling back and trying each URL in a nested try...catch, is
there a simple way like fail-over URL?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Netrwork-of-Brokers-Java-Code-To-connect-dynamically-to-Available-Brokers-tp4728870.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Master/Slave Config Not working

2017-07-25 Thread akpuvvada
Hi Tim,
Please find below the observations.



1. Kill host1 so host2 becomes the master and there is no slave. Connect a
consumer with a URI of tcp://host1:61616. Does it connect? What's in the
consumer's logs?

ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("tcp://potaplq1la:61616");
Jul 25, 2017 11:45:34 AM
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer run
SEVERE: null
javax.jms.JMSException: Could not connect to broker URL:
tcp://potaplq1la:61616. Reason: java.net.ConnectException: Connection
refused: connect
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:36)
at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:374)
at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:304)
at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:244)
at
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer.run(ActiveMQJMSClients_Producer.java:53)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at
java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at
org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:525)
at
org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:488)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)
at
org.apache.activemq.transport.AbstractInactivityMonitor.start(AbstractInactivityMonitor.java:169)
at
org.apache.activemq.transport.InactivityMonitor.start(InactivityMonitor.java:52)
at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)
at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)
at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:64)
at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:354)
... 4 more

Exception in thread "Thread-1" java.lang.NullPointerException
at
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer.run(ActiveMQJMSClients_Producer.java:91)
at java.lang.Thread.run(Thread.java:745)

---
2. Kill host1 so host2 becomes the master and there is no slave. Connect a
consumer with your normal failover URI. Does it connect? What's in the
consumer's logs?

ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("failover:(tcp://potaplq1la:61616,tcp:/potaplq1lb:61616)");

Just hung/waiting for more than 5 mnts and then I killed the code manually.
No entries in logs.

---
3. Kill host1 so host2 becomes the master and there is no slave. Start
host1 so it becomes the slave. Kill host2 so host1 becomes the master and
there is no slave. Connect a consumer with your normal failover URI. Does
it connect? What's in the consumer's logs?

ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("failover:(tcp://potaplq1la:61616,tcp:/potaplq1lb:61616)");


It is connecting without any issues.
---
4. Remove the timeout attribute from your failover URI and try your
"regular" test again. You never mentioned that you were providing
additional options (randomize and timeout) to the failover URI, neither
here nor in the JIRA bug you submitted. 

I only used them yesterday. I tested the above scenarios without the
options.




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550p4728862.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Master/Slave Config Not working

2017-07-24 Thread akpuvvada
Hi Tim,
I was not originally using the options like timeout, etc.
I only used them yesterday.

I will test and let you know.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550p4728861.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Master/Slave Config Not working

2017-07-24 Thread akpuvvada
Hi Tim,
If I use the regular TCP URL, I am able to connect to the Active server
anytime it is acting as Master.
The issue is happening only if I use the failover URL.

If I use the logic like try {connect to master} catch {connect to slave}, it
is working fine.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550p4728832.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Master/Slave Config Not working

2017-07-24 Thread akpuvvada

https://issues.apache.org/jira/browse/AMQ-6777




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550p4728796.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Master/Slave Config Not working

2017-07-24 Thread akpuvvada
Please find log below :

Jul 24, 2017 4:45:24 PM
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer run
INFO: Connected - Producer - 3
Jul 24, 2017 4:45:25 PM
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer run
INFO: Connected to :
failover:(tcp://potaplq1lb:61616,tcp:/potaplq1la:61616)?randomize=false=6
Jul 24, 2017 4:45:27 PM
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer run
INFO: Connected to :
failover:(tcp://potaplq1lb:61616,tcp:/potaplq1la:61616)?randomize=false=6
Jul 24, 2017 4:45:28 PM
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer run
INFO: Connected to :
failover:(tcp://potaplq1lb:61616,tcp:/potaplq1la:61616)?randomize=false=6
Jul 24, 2017 4:45:29 PM
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer run
INFO: Connected to :
failover:(tcp://potaplq1lb:61616,tcp:/potaplq1la:61616)?randomize=false=6
Jul 24, 2017 4:46:33 PM
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer run
SEVERE: null
javax.jms.JMSException: Failover timeout of 6 ms reached.
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:72)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1413)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1428)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1323)
at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1967)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:288)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:223)
at
org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
at
activemqjmsclients.FTTest.ActiveMQJMSClients_Producer.run(ActiveMQJMSClients_Producer.java:75)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Failover timeout of 6 ms reached.
at
org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:639)
at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
at
org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81)
at
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1388)
... 8 more



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550p4728795.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Master/Slave Config Not working

2017-07-24 Thread akpuvvada
Hi Tim,
Yes, I am able to see the logs as it should.

And also, the admin UI, I am able to see the queues and details only in the
primary server admin UI. Other one says "Error! Exception occurred while
processing this request, check the log for more information!".

Even when both are up (master and slave), if I give URL as
failover:(tcp://slave:port,tcp://master.port)
The connection is not working.

I am stopping the primary using the command "./activemq stop" and checking
the status "./activemq status" and also checking if admin is accessible. I
also verified using "ps-ef | grep activemq". I can confirm that primary is
stopped.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550p4728794.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Performance with CLIENT Ack

2017-07-18 Thread akpuvvada
TestActiveMQ.zip
  

Attached the TIBCO BW Project I am using.

It is not a Java code, TIBCO BW is a GUI (Zero Coding) Integration tool that
stored the configuration in XML and converts the XMLs to Java code at
Run-time and execute. So I have no idea how this actually works and when the
acknowledge() gets executed.
However, I can confirm from the logs that Acknowledgement is sent by the
code.

Active MQ is not accepting or not processing the acknowledgement.
I read that Client acknowledgement is actually "Acknowledge All Previous".
Would Active MQ wait to process Acks if it is too busy with other things.
Producer is producing at a very fast rate and temp space has filled-up fast
when this is observed. Could that be an issue?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-with-CLIENT-Ack-tp4728551p4728623.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Master/Slave Config Not working

2017-07-18 Thread akpuvvada
Hi Tim,
I can see logs indicating that lock is identified, please see below.

2017-07-14 03:18:14,428 | INFO  | Database
/tibco_installables/ActiveMQ/DataStore/kahadb/lock is locked by another
server. This broker is now in slave mode waiting a lock to be acquired |
org.apache.activemq.store.SharedFileLocker | main


So, this is not a file system issues.

My issue is:
 - When I first bring up the servers, M1 first and M2 seconds. M1 is taking
up as Primary and M2 as Secondary.
 - I am using M1:port,M2:port failover URL.
 - It is working fine
However, the issue is coming up when the Primary is stopped, the same above
failover URL is not working.
If I change the URL to M2:port,M1:port, it is working.




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550p4728622.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

2017-07-17 Thread akpuvvada
This is what is updated in the JIRA (FYI) - this not going to be fixed, may
be:

the priority support is not a good candidate for runtime modification
because not only do the in-memory messages need to retained in priority
memory, the store needs to retrieve and store messages in priority order.
For this, the store needs a restart which is not practical.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-working-tp4728264p4728590.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

2017-07-17 Thread akpuvvada
Thanks Tim.
Created https://issues.apache.org/jira/browse/AMQ-6772



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-working-tp4728264p4728584.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Performance with CLIENT Ack

2017-07-15 Thread akpuvvada
When I tried multithreaded (processing parallel) the subscriber is not
logging any receipt. That made me affectively conclude it is not processing
any messages. However, when I tried single thread (serial processing) I can
see the subscriber is updating the log; so I know it is receiving the
messages and sending back acknowledgement . However, in the Active MQ UI, I
can see that all messages are in pending state and dequeued is 0.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-with-CLIENT-Ack-tp4728551p4728578.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

2017-07-14 Thread akpuvvada
I have not configured any inactivity monitoring. How can I check if any
exists by default?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Transport-failed-attempting-to-automatically-reconnect-due-to-java-io-EOFException-tp2351687p4728568.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Master/Slave Config Not working

2017-07-14 Thread akpuvvada
Hi Tim,

The paths configured for Kaha DB and data in broker attributes are same for
both instances - pointing to the same folder on the shared drive.
Anything else needs to be changed/added?

Thanks 
Anil



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550p4728567.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - Performance with CLIENT Ack

2017-07-14 Thread akpuvvada
We are testing it from Tibco Business Works. We configured the JMS Connection
using JNDI.

With auto acknowledged we did not see any issues. Everything worked fine.

We are testing queues. Topics are also in scope for the testing, have not
started yet.

I did not configure prefetch, using the default which as per documentation
is 1000.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-with-CLIENT-Ack-tp4728551p4728566.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

2017-07-14 Thread akpuvvada
Sorry, Tim. I miss understood your previous question. 
If I restart with the policy configured, the property is getting applied and
it is working as expected. It is only not happening if I try to have it
updated at runtime.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-working-tp4728264p4728565.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Active MQ - Performance with CLIENT Ack

2017-07-14 Thread akpuvvada
I am trying to test Active MQ for Performance
I have installed it in Unix in 'Shared File System' Fault Tolerant pair.
Max Heap Size is 3 GB
4GB Persistence Store Size
2Gb Temporary Store Size

I am trying to publish messages with 'Non_Persistent' Delivery mode with
Payload of size 1 MB without any delay in a loop - 10K messages.
I am trying to consume the messages with Clinet ACK and acknowledging after
logging the receipt of message.

Prouder has published 3k+ messages and slowed down as Temp Store size is
only 2GB.

However, Subscriber is consuming the messages at a very slow rate and not
acknowledging or Active MQ is not processing the acknowledgements.

Please advise what I am doing wrong or what should be changed to improve the
performance?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-with-CLIENT-Ack-tp4728551.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Active MQ - Master/Slave Config Not working

2017-07-14 Thread akpuvvada
I observed an issue with the Fault Tolerance configuration:
When the primary/master is down, clients are not able to reconnect to the
secondary on retry; it is throwing a warning and trying to reconnect. Also,
it is considering the first URL as Master and first trying to connect to and
fall back is not working even if we stop the Master and restart the client.
The fail-over URL has to be changed to make the connection work such that
the Machine 2 (current master) tcp URL is the first one.

I configured the Fault Tolerance as per
http://activemq.apache.org/shared-file-system-master-slave.html
Shared File System - 

  


Please help me identify where I am ding wrong.
I am using URL : failover:(tcp://host1:61616,tcp:/host2:61616)

Appreciate any help.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-Master-Slave-Config-Not-working-tp4728550.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

2017-07-14 Thread akpuvvada
No, Tim.
I can see an update in the log that the configuration is updated, however
the policy is not getting applied. When seen in JConsole, the detestation
property is not showing as set.

Thanks
Anil



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-working-tp4728264p4728549.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Transport failed, attempting to automatically reconnect due to: java.io.EOFException

2017-07-14 Thread akpuvvada
We are also facing the same issue.
I have two Active MQ Brokers on different machine configured as configured
as Master/Slave using shared store.
We are suing the current release version.
Transport (tcp://localhost:61616) failed , attempting to automatically
reconnect: java.io.EOFException 



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Transport-failed-attempting-to-automatically-reconnect-due-to-java-io-EOFException-tp2351687p4728544.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

2017-07-13 Thread akpuvvada
Hi Tim,

You are correct that the property is not getting updated.
Even in JConsole, I am not able to update this particular property.
I guess this is not settable at Run-time.
Any idea?





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-working-tp4728264p4728516.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

2017-07-06 Thread akpuvvada
I have configured the 'runtimeConfigurationPlugin' and started the Active MQ.

Then added the below in policyEntries:


After saving the config file, I am able to see that the console log got
updated saying that config changes are detected and loaded.

When tested, however, Message Priority is not being enforced as expected on
the queue.

Please advise where and what I am doing wrong?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-working-tp4728264.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Active MQ - REST API - Set Delivery Mode

2017-07-05 Thread akpuvvada
How to Post a Message with delivery mode set to 'Persistent' using REST API?

I need to configure a Guaranteed delivery using REST Clients - both Pub and
Sub.

Also, is it possible to read a message without confirming the message until
the processing is completed on client side to make sure the message is
redelivered using REST API Client.

Appreciate any help.

Also, let me know if there is a link to complete REST Documentation for
Active MQ Messaging. I already checked http://activemq.apache.org/rest.html.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Active-MQ-REST-API-Set-Delivery-Mode-tp4728211.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.