Re: The transport is not running

2007-05-31 Thread Raffaele

Hi,

I'm new, and me and my company are evaluating ActiveMQ doing some massive
test.

I'm replying to this thread because I had the same exception during the
execution of a consumer process:

my environment is composed by the following actors and sets:
- First of all, I'm using two example class, ConsumerTool and ProducerTool.
- I run the producer (persistent=true (MySql) - no journal - no transacted)
to produce 1 messages on a QUEUE.
- When it finishes I run ConsumerTool to consume ALL messages present on the
DB and I take time to do some statistical analysis about how it takes to
empty the queue.
- I had the exception (the same as osian) after 2404 messages consumed.

What could it be?

Thanks in advance, best regards

Raffaele

P.S.: What is happen if using journal and I kill activeMq, are messages lost
forever? http://www.nabble.com/file/p10893926/ProducerTool.java
ProducerTool.java  http://www.nabble.com/file/p10893926/ConsumerTool.java
ConsumerTool.java 



Marlon Santos wrote:
 
 Hi,
 
 can you post your consumer's code that throws the exception? 
 
 Regards,
 Marlon
 
 
 osian wrote:
 
 Hi,
 
 In one out of 5 of my consumers, the log file seems to be full of the
 following exception:
 
 javax.jms.JMSException: The transport is not running.
  at
 org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:58)
  at
 org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1153)
  at org.apache.activemq.ActiveMQSession.init(ActiveMQSession.java:226)
  at
 org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:277)
  at
 org.apache.activemq.ActiveMQConnection.createQueueSession(ActiveMQConnection.java:1121)
  at net.proact.scm.jms.JMSHandler.getPostSession(JMSHandler.java:141)
  at net.proact.scm.jms.JMSHandler.postMessage(JMSHandler.java:305)
  at
 net.proact.scm.consumer.ProactConsumer.processMessage(ProactConsumer.java:273)
  at
 net.proact.scm.consumer.ProactConsumer.onMessage(ProactConsumer.java:168)
  at
 net.proact.scm.consumer.ProactConsumer.consumeMessages(ProactConsumer.java:146)
  at
 net.proact.scm.consumer.ProactConsumer.consumeMessagesAndClose(ProactConsumer.java:127)
  at net.proact.scm.consumer.ProactConsumer.run(ProactConsumer.java:78)
  at java.lang.Thread.run(Thread.java:534)
 Caused by: java.io.IOException: The transport is not running.
  at
 org.apache.activemq.transport.TransportSupport.checkStarted(TransportSupport.java:103)
  at
 org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:117)
  at
 org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
  at
 org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:80)
  at
 org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:93)
  at
 org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:43)
  at
 org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
  at
 org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1151)
  ... 11 more
 javax.jms.JMSException: The transport is not running.
  at
 org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:58)
  at
 org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1153)
  at
 org.apache.activemq.ActiveMQSession.asyncSendPacket(ActiveMQSession.java:1648)
  at
 org.apache.activemq.ActiveMQMessageConsumer.ackLater(ActiveMQMessageConsumer.java:725)
  at
 org.apache.activemq.ActiveMQMessageConsumer.afterMessageIsConsumed(ActiveMQMessageConsumer.java:684)
  at
 org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:487)
  at
 net.proact.scm.consumer.ProactConsumer.consumeMessages(ProactConsumer.java:144)
  at
 net.proact.scm.consumer.ProactConsumer.consumeMessagesAndClose(ProactConsumer.java:127)
  at net.proact.scm.consumer.ProactConsumer.run(ProactConsumer.java:78)
  at java.lang.Thread.run(Thread.java:534)
 Caused by: java.io.IOException: The transport is not running.
  at
 org.apache.activemq.transport.TransportSupport.checkStarted(TransportSupport.java:103)
  at
 org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:117)
  at
 org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor.java:141)
  at
 org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:80)
  at
 org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:93)
  at
 org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:43)
  at
 org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
  at
 org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1151)
  ... 8 more
 
 This is using ActiveMQ4.1 and java1.4.2_06,
 
 Thanks,
 

Re: Shared File System Master Slave Tips?

2007-05-31 Thread Mario Siegenthaler

We've tried it on NFS on linux and it didn't work (some locking issue
with java and nfs). However it worked with windows shares, but we're
not using it because we run linux boxes.

Mario

On 5/31/07, Michael Slattery [EMAIL PROTECTED] wrote:

Hello List!

I'm interested in putting together the Shared File System Master
Slave scenario in a managed hosting setup.   What are you using to
achieve the shared file system master slave on your installs?

I would appreciate it very much if folks on this list would share
descriptions of successful environments. SAN/NAS, Filesystems,
etc would be very helpful.

If you are doing this in a managed hosting environment, even
better!It's not easy to determine who is doing SAN with shared
access or decent NAS from the vendor websites out there (rackspace
and the like).

Last case, if you tried Shared File System Master Slave but found
that you had to go with JDBC that would also be helpful.

Thank you.
Mike



Re: Kind of consumer faliover

2007-05-31 Thread ego

thanks for your response
And ok, may be too difficult !??!!


Tom Samplonius-2 wrote:
 
 
 - ego [EMAIL PROTECTED] wrote:
 You're probably true. So here is my 'real' problem.
 
 I need a producer that publish let's say an event E1. I have 3
 different
 consumers, each doing a specific task with the event E1. For each
 consumer,
 I need to find a backup solution if the consumer fails, i.e. to
 automatically switch to a backup consumer so that no event is lost.
 The
 backup consumer must act as if it were the master consumer; something
 like a
 durable subscriber, but a subscriber that can automatically restart
 on
 another machine with the same identity.
 
 No sure it's clear..
 
 
   Well, it sounds a bit difficult.  I would say if the messages are small,
 just send three copies, one to each queue, and use the exclusive consumer
 feature.  You can probably sent all three messages in a transaction to
 make sure all or none are sent.
 
   I don't know if JMS has presence support, so a consumer can ask, or be
 notified if another consumer disconnects.  You might see this in the XMPP
 protocol for ActiveMQ, but I have not not look at it before.  I know the
 big advantage of XMPP, is presence (and discovery).  The big downside to
 XMPP, is lack of confirmed delivery (no transactions, but XEP-Transaction
 looks promising).  So if a client crashes while processing a message, you
 are not sure if it finished that message or not.
 
 Tom
 
   
 
 

-- 
View this message in context: 
http://www.nabble.com/Kind-of-%22consumer-faliover%22-tf3828623s2354.html#a10898881
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



orphan .NET connections

2007-05-31 Thread Gaurav Hariani
The following code creates a connection to an OpenWire transport 
connector, waits for 1 second and then closes the session/connection.
Looking at JConsole ... ActiveMQ reports the connection as open. Too 
many open connections and ActiveMQ stops processing messages.


However if the connection is not closed by the application and the 
application is killed using Ctrl-C ... then ActiveMQ closes the connections.


Is there something obvious that I'm doing wrong or is this a bug in the 
TcpTransport code?




using System;
using System.Threading;
using NMS;

namespace ActiveMQ {
   class TestMain {

   static void Main(string[] args) {

   Uri uri = new Uri(tcp://activemqserver:61616);

   ConnectionFactory factory = new ConnectionFactory(uri);
   IConnection connection = null;
   ISession session = null;

   try {
   connection = factory.CreateConnection();
   Console.WriteLine(Connection Created);

   connection.ClientId = [test1]  + connection.ClientId;

   session = connection.CreateSession();
   Console.WriteLine(Session Created);

   Thread.Sleep(1000);

   } finally {
   session.Close();
   connection.Close();
   Console.WriteLine(Connection Closed);
   }
   }
   }
}



Re: Why I got Unrecognized xbean namespace mapping: http://activemq.org/

2007-05-31 Thread wallace

Instead of deleting xmlns=http://activemq.org/config/1.0; , you should move
it to the broker element, i.e.

beans

  broker useJmx=true xmlns=http://activemq.org/config/1.0;

Hopefully that would get fixed in future release.

-Wallace

-- 
View this message in context: 
http://www.nabble.com/Why-I-got-Unrecognized-xbean-namespace-mapping%3A-http%3A--activemq.org-conf-tf2048833s2354.html#a10904517
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Does JAAS work for Stomp access?

2007-05-31 Thread Tom Samplonius

  I'm trying to implement some security on queues for Stomp clients.  I have 
this config:

  plugins
jaasAuthenticationPlugin configuration=activemq-domain /

authorizationPlugin
map
  authorizationMap
authorizationEntries
  authorizationEntry queue= read=admins write=admins 
admin=admins /
  authorizationEntry queue=vps read=admins write=admins 
admin=admins /
  authorizationEntry queue=USERS. read=users write=users 
admin=users /
/authorizationEntries
  /authorizationMap
/map
/authorizationPlugin

  /plugins



and user.properties 

system=manager
user=password
guest=password


and group.properties:

group.properties


And I added 
-Djava.security.auth.login.config=${ACTIVEMQ_BASE}/conf/login.conf to the 
startup options.


  But I can still can login with Stomp, with any username and password, and get 
messages.


Tom