You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by James Strachan <ja...@gmail.com> on 2007/01/12 17:57:27 UTC

Re: Address already in use: connect

On 1/12/07, Tony Qian <da...@aol.com> wrote:
>
>  All,
>
>  New to ActiveMQ. First I apologize for long email. I'm evaluating an open
> source JMS server for a project. I looked several JMS servers and found that
> ActiveMQ is perfect for our project. I started to play around with ActiveMQ
> 4.1.0 version. I got a couples of questions. I looked through the forum and
> mailing list. I still didn't get answer.
>
>  1) what is exact purpose of journal?

Performance

> It seems to me journal and database
> serve same purpose, persistence. is journal faster than database?

Yes


>  2) I used example packaged inside download (producer and consumer) and made
> it durable. I also configured it to use both journal and database(Mysql). if
> I started producer and consumer at same time, everything works perfectly. If
> I first produced 4000 messages (consumer was not started yet), I saw some
> messages went to journal and some to database. That is perfectly fine.
> Surprisingly, the latest messages (from message 1200 to 4000) went to
> database! After I started consumer, consumer was consuming messages starting
> from message 1. Shortly after less than a couple of hundred messages, I got
> attached exception. Along with the exception, my PC CPU usage was 100%

I don't really understand that exception - its normally thrown when a
server is trying to open a port which is already open. For some reason
your MySQL install is rejecting a new connection being created - I'm
not sure why. Maybe you need to increase the maximum allowed
connections or something?
-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Address already in use: connect

Posted by Tony Qian <da...@aol.com>.
James,

Thanks for prompt response. What the exception troubles me is that 
ActiveMQ was consuming messages from journal, not from database. Anyway, 
here is my db confiuration.

  <persistenceAdapter>
         <journaledJDBC journalLogFiles="5" 
dataDirectory="../activemq-data" dataSource="#mysql-ds"/>
     </persistenceAdapter>

   <!-- MySql DataSource Sample Setup -->
   <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" 
destroy-method="close">
     <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
     <property name="url" 
value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
     <property name="username" value="username"/>
     <property name="password" value="password"/>
     <property name="initialSize" value="30"/>
     <property name="maxActive" value="60"/>
     <property name="maxIdle" value="300"/>
     <property name="maxWait" value="500"/>
     <property name="poolPreparedStatements" value="true"/>
   </bean>

Tony

James Strachan wrote on 1/12/2007, 11:57 AM:

 > On 1/12/07, Tony Qian <da...@aol.com> wrote:
 > >
 > >  All,
 > >
 > >  New to ActiveMQ. First I apologize for long email. I'm evaluating
 > an open
 > > source JMS server for a project. I looked several JMS servers and
 > found that
 > > ActiveMQ is perfect for our project. I started to play around with
 > ActiveMQ
 > > 4.1.0 version. I got a couples of questions. I looked through the
 > forum and
 > > mailing list. I still didn't get answer.
 > >
 > >  1) what is exact purpose of journal?
 >
 > Performance
 >
 > > It seems to me journal and database
 > > serve same purpose, persistence. is journal faster than database?
 >
 > Yes
 >
 >
 > >  2) I used example packaged inside download (producer and consumer)
 > and made
 > > it durable. I also configured it to use both journal and
 > database(Mysql). if
 > > I started producer and consumer at same time, everything works
 > perfectly. If
 > > I first produced 4000 messages (consumer was not started yet), I saw
 > some
 > > messages went to journal and some to database. That is perfectly fine.
 > > Surprisingly, the latest messages (from message 1200 to 4000) went to
 > > database! After I started consumer, consumer was consuming messages
 > starting
 > > from message 1. Shortly after less than a couple of hundred
 > messages, I got
 > > attached exception. Along with the exception, my PC CPU usage was 100%
 >
 > I don't really understand that exception - its normally thrown when a
 > server is trying to open a port which is already open. For some reason
 > your MySQL install is rejecting a new connection being created - I'm
 > not sure why. Maybe you need to increase the maximum allowed
 > connections or something?
 > --
 >
 > James
 > -------
 > http://radio.weblogs.com/0112098/
 >