[activemq-dev] Re: ActiveMQ 3.1-M5 released

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

[activemq-dev] Re: ActiveMQ 3.1-M5 released

Dennis Cook
When a milestone or final release is announced, can you include the SVN
  revision number, that marks the release, in the release announcement?

Or is there a branches url that can be used to obtain the release sources?

[hidden email] wrote:

> We've cut another milestone release with more fixes for networks  along
> with full support for Sybase, SQLServer and Postgresql.
>
> We recommend anyone using networks upgrade as we've fixed a few  
> gremlins in the support of networks. A full list of new features and  
> bugs fixed since 3.0 are here...
> http://jira.logicblaze.com/jira/browse/AMQ?
> report=com.atlassian.jira.plugin.system.project:roadmap-panel
>
> The full 3.1 release should be along fairly soon now as you can see  
> from the roadmap above.
>
> Recent fixed issues are here...
> http://jira.logicblaze.com/jira/secure/IssueNavigator.jspa?
> reset=true&mode=hide&pid=10520&statusIds=5&statusIds=6&updatedPrevious=6
> 04800000&sorter/field=updated&sorter/order=DESC
>
> Enjoy!
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>

Reply | Threaded
Open this post in threaded view
|

[activemq-dev] Re: ActiveMQ 3.1-M5 released

Stephane Bailliez
Dennis Cook wrote:
> When a milestone or final release is announced, can you include the SVN
>  revision number, that marks the release, in the release announcement?
>
> Or is there a branches url that can be used to obtain the release sources?

There is a source distro of each release:
http://dist.codehaus.org/activemq/distributions/


But FWIW: That's revision 389
And you can get it via the tag ACTIVEMQ_3_1_M_5

svn co svn://svn.activemq.org/activemq/scm/tags/ACTIVEMQ_3_1_M_5/activemq


You can browse it here:
http://svn.activemq.org/tags/ACTIVEMQ_3_1_M_5/

Cheers,

Stephane

Reply | Threaded
Open this post in threaded view
|

[activemq-dev] Linux and Windows

Frik Strecker
Hi,

When I run the broker on Windows and the JMS clients on Windows, I have no
problems.  But if I run the same broker on Linux Fedora, I have a problem.
I use the same clients... The only change is to run the broker on Linux (the
exact same java code).

Should I open a trouble ticket under the broker?

Kind regards,
Frik Strecker

Voice: +1-603-672-3296
http://www.GatherPlace.NET
Effective On-line Presentations


Reply | Threaded
Open this post in threaded view
|

Re: [activemq-dev] Linux and Windows

jstrachan

On 19 Jul 2005, at 02:09, Frik Strecker wrote:

> Hi,
>
> When I run the broker on Windows and the JMS clients on Windows, I  
> have no
> problems.  But if I run the same broker on Linux Fedora, I have a  
> problem.
> I use the same clients... The only change is to run the broker on  
> Linux (the
> exact same java code).

This sounds like a new one to us.

> Should I open a trouble ticket under the broker?

Sure, please do. If you include the exception / exact problem you get  
it'll help us figure out whats going on.

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

Reply | Threaded
Open this post in threaded view
|

RE: [activemq-dev] Linux and Windows

Frik Strecker
Done.  Thanks and let me know what other data I can gather to help.

Kind regards,
Frik Strecker

Voice: +1-603-672-3296
http://www.GatherPlace.NET
Effective On-line Presentations

 

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: Tuesday, July 19, 2005 4:34 AM
> To: [hidden email]
> Subject: Re: [activemq-dev] Linux and Windows
>
>
> On 19 Jul 2005, at 02:09, Frik Strecker wrote:
>
> > Hi,
> >
> > When I run the broker on Windows and the JMS clients on Windows, I  
> > have no
> > problems.  But if I run the same broker on Linux Fedora, I have a  
> > problem.
> > I use the same clients... The only change is to run the broker on  
> > Linux (the
> > exact same java code).
>
> This sounds like a new one to us.
>
> > Should I open a trouble ticket under the broker?
>
> Sure, please do. If you include the exception / exact problem
> you get  
> it'll help us figure out whats going on.
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [activemq-dev] Linux and Windows

jstrachan
Thanks Frik

 From looking at the stack traces, I don't think this is actually a  
problem with ActiveMQ - its more an effect of a different threading/
scheduler implementation on Linux versus Windows.

i.e. you have a thread which is attempting to send a message on a  
connection that another thread has closed. It doesn't look like any  
kind of bug in ActiveMQ.

Just out of interest, who is closing the connections down that your  
background publisher thread is using to publish? Maybe its worth  
stopping the publisher threads first (and waiting for them to  
complete) before closing the JMS connection they are using?



On 19 Jul 2005, at 12:43, Frik Strecker wrote:

> Done.  Thanks and let me know what other data I can gather to help.
>
> Kind regards,
> Frik Strecker
>
> Voice: +1-603-672-3296
> http://www.GatherPlace.NET
> Effective On-line Presentations
>
>
>
>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]]
>> Sent: Tuesday, July 19, 2005 4:34 AM
>> To: [hidden email]
>> Subject: Re: [activemq-dev] Linux and Windows
>>
>>
>> On 19 Jul 2005, at 02:09, Frik Strecker wrote:
>>
>>
>>> Hi,
>>>
>>> When I run the broker on Windows and the JMS clients on Windows, I
>>> have no
>>> problems.  But if I run the same broker on Linux Fedora, I have a
>>> problem.
>>> I use the same clients... The only change is to run the broker on
>>> Linux (the
>>> exact same java code).
>>>
>>
>> This sounds like a new one to us.
>>
>>
>>> Should I open a trouble ticket under the broker?
>>>
>>
>> Sure, please do. If you include the exception / exact problem
>> you get
>> it'll help us figure out whats going on.
>>
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>>
>>
>>
>
>


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

Reply | Threaded
Open this post in threaded view
|

RE: [activemq-dev] Linux and Windows

Frik Strecker
Hi,

The problem is that I am not closing the connection.  This is the problem:

> INFO: ActiveMQ Message Broker
(ID:os4.gatherplace.com-32773-1121729492019-0:0) is shutting down
> Jul 19, 2005 7:41:34 AM org.activemq.broker.impl.BrokerContainerImpl
deregisterConnection
> INFO: Removing client: gwjmsproducer on transport: TcpTransportChannel:
Socket[addr=/127.0.0.1,port=60733,localport=61616]
> Jul 19, 2005 7:41:35 AM org.activemq.transport.tcp.TcpTransportChannel
doClose

Because ActiveMQ decides to shut down the broker for some unknown reason,
all subsequent sends fail.

From the time stamps this connection is not closed until the first message
is ready to be sent.  So this connection has been open for a few minutes
without a problem.  Then mysteriously just before the first message is to be
sent, ActiveMQ decides it is time to shut down the broker and close the
connnection.

I am not saying that there is not a bug in my code :) but I am not closing
the JMS connections - they are opened and kept open.  The code is also
pretty simple and works fine on Windows.

It is interesting that the logs shows an IP address of 127.0.0.1 for the
connection to be closed.  Could that be a problem?

Kind regards,
Frik Strecker
 

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: Tuesday, July 19, 2005 6:58 AM
> To: [hidden email]
> Subject: Re: [activemq-dev] Linux and Windows
>
> Thanks Frik
>
>  From looking at the stack traces, I don't think this is actually a  
> problem with ActiveMQ - its more an effect of a different threading/
> scheduler implementation on Linux versus Windows.
>
> i.e. you have a thread which is attempting to send a message on a  
> connection that another thread has closed. It doesn't look like any  
> kind of bug in ActiveMQ.
>
> Just out of interest, who is closing the connections down that your  
> background publisher thread is using to publish? Maybe its worth  
> stopping the publisher threads first (and waiting for them to  
> complete) before closing the JMS connection they are using?
>
>
>
> On 19 Jul 2005, at 12:43, Frik Strecker wrote:
>
> > Done.  Thanks and let me know what other data I can gather to help.
> >
> > Kind regards,
> > Frik Strecker
> >
> > Voice: +1-603-672-3296
> > http://www.GatherPlace.NET
> > Effective On-line Presentations
> >
> >
> >
> >
> >> -----Original Message-----
> >> From: [hidden email] [mailto:[hidden email]]
> >> Sent: Tuesday, July 19, 2005 4:34 AM
> >> To: [hidden email]
> >> Subject: Re: [activemq-dev] Linux and Windows
> >>
> >>
> >> On 19 Jul 2005, at 02:09, Frik Strecker wrote:
> >>
> >>
> >>> Hi,
> >>>
> >>> When I run the broker on Windows and the JMS clients on Windows, I
> >>> have no
> >>> problems.  But if I run the same broker on Linux Fedora, I have a
> >>> problem.
> >>> I use the same clients... The only change is to run the broker on
> >>> Linux (the
> >>> exact same java code).
> >>>
> >>
> >> This sounds like a new one to us.
> >>
> >>
> >>> Should I open a trouble ticket under the broker?
> >>>
> >>
> >> Sure, please do. If you include the exception / exact problem
> >> you get
> >> it'll help us figure out whats going on.
> >>
> >> James
> >> -------
> >> http://radio.weblogs.com/0112098/
> >>
> >>
> >>
> >
> >
>
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [activemq-dev] Linux and Windows

jstrachan
Just out of interest, what does the Java code look like thats doing  
the JMS publishing?

BTW the log you posted on the issue...
http://jira.logicblaze.com/jira/browse/AMQ-311

seems to suggest these warnings appear in the log while your broker  
is being shut down, yet the publisher is still publishing. I wonder  
how the broker is being closed? Are you closing connections  
somewhere? How are you running the broker?


On 19 Jul 2005, at 13:12, Frik Strecker wrote:

> Hi,
>
> The problem is that I am not closing the connection.  This is the  
> problem:
>
>
>> INFO: ActiveMQ Message Broker
>>
> (ID:os4.gatherplace.com-32773-1121729492019-0:0) is shutting down
>
>> Jul 19, 2005 7:41:34 AM org.activemq.broker.impl.BrokerContainerImpl
>>
> deregisterConnection
>
>> INFO: Removing client: gwjmsproducer on transport:  
>> TcpTransportChannel:
>>
> Socket[addr=/127.0.0.1,port=60733,localport=61616]
>
>> Jul 19, 2005 7:41:35 AM  
>> org.activemq.transport.tcp.TcpTransportChannel
>>
> doClose
>
> Because ActiveMQ decides to shut down the broker for some unknown  
> reason,
> all subsequent sends fail.
>
> From the time stamps this connection is not closed until the first  
> message
> is ready to be sent.  So this connection has been open for a few  
> minutes
> without a problem.  Then mysteriously just before the first message  
> is to be
> sent, ActiveMQ decides it is time to shut down the broker and close  
> the
> connnection.
>
> I am not saying that there is not a bug in my code :) but I am not  
> closing
> the JMS connections - they are opened and kept open.  The code is also
> pretty simple and works fine on Windows.
>
> It is interesting that the logs shows an IP address of 127.0.0.1  
> for the
> connection to be closed.  Could that be a problem?
>
> Kind regards,
> Frik Strecker
>
>
>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]]
>> Sent: Tuesday, July 19, 2005 6:58 AM
>> To: [hidden email]
>> Subject: Re: [activemq-dev] Linux and Windows
>>
>> Thanks Frik
>>
>>  From looking at the stack traces, I don't think this is actually a
>> problem with ActiveMQ - its more an effect of a different threading/
>> scheduler implementation on Linux versus Windows.
>>
>> i.e. you have a thread which is attempting to send a message on a
>> connection that another thread has closed. It doesn't look like any
>> kind of bug in ActiveMQ.
>>
>> Just out of interest, who is closing the connections down that your
>> background publisher thread is using to publish? Maybe its worth
>> stopping the publisher threads first (and waiting for them to
>> complete) before closing the JMS connection they are using?
>>
>>
>>
>> On 19 Jul 2005, at 12:43, Frik Strecker wrote:
>>
>>
>>> Done.  Thanks and let me know what other data I can gather to help.
>>>
>>> Kind regards,
>>> Frik Strecker
>>>
>>> Voice: +1-603-672-3296
>>> http://www.GatherPlace.NET
>>> Effective On-line Presentations
>>>
>>>
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: [hidden email] [mailto:[hidden email]]
>>>> Sent: Tuesday, July 19, 2005 4:34 AM
>>>> To: [hidden email]
>>>> Subject: Re: [activemq-dev] Linux and Windows
>>>>
>>>>
>>>> On 19 Jul 2005, at 02:09, Frik Strecker wrote:
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> When I run the broker on Windows and the JMS clients on Windows, I
>>>>> have no
>>>>> problems.  But if I run the same broker on Linux Fedora, I have a
>>>>> problem.
>>>>> I use the same clients... The only change is to run the broker on
>>>>> Linux (the
>>>>> exact same java code).
>>>>>
>>>>>
>>>>
>>>> This sounds like a new one to us.
>>>>
>>>>
>>>>
>>>>> Should I open a trouble ticket under the broker?
>>>>>
>>>>>
>>>>
>>>> Sure, please do. If you include the exception / exact problem
>>>> you get
>>>> it'll help us figure out whats going on.
>>>>
>>>> James
>>>> -------
>>>> http://radio.weblogs.com/0112098/
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>>
>>
>>
>
>


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

Reply | Threaded
Open this post in threaded view
|

RE: [activemq-dev] Linux and Windows

Frik Strecker
Hi,

Sorry for not clarifying the logs better from the start.

The JMS connection is persistent and only closed when there is an error
condition.  There is something suspicious that I will need to investigate.

I have found that sometimes a client will lose it's connection with the
broker and not be notified through the ExceptionListener... I looked for an
isConnected() function call, but could not find any.  So I created a hack
workaround that I do not like...

        synchronized public boolean isConnected() {
                if (connection==null) return false;
                try {
                        return connection.getClientID()!=null;
                } catch (JMSException e) {
                        return false;
                }
        }

And if this returns false, the connection will be closed and reopened.  This
works great on Windows, but I can see how this may behave differently on
Linux.  Let me do some testing and let you know.  If this is not the cause,
I will send some sources.

Do you have any plans to add an isConnected()?  I guess I should file an RFE
:)

Kind regards,
Frik Strecker

 

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: Tuesday, July 19, 2005 7:22 AM
> To: [hidden email]
> Subject: Re: [activemq-dev] Linux and Windows
>
> Just out of interest, what does the Java code look like thats doing  
> the JMS publishing?
>
> BTW the log you posted on the issue...
> http://jira.logicblaze.com/jira/browse/AMQ-311
>
> seems to suggest these warnings appear in the log while your broker  
> is being shut down, yet the publisher is still publishing. I wonder  
> how the broker is being closed? Are you closing connections  
> somewhere? How are you running the broker?
>
>
> On 19 Jul 2005, at 13:12, Frik Strecker wrote:
> > Hi,
> >
> > The problem is that I am not closing the connection.  This is the  
> > problem:
> >
> >
> >> INFO: ActiveMQ Message Broker
> >>
> > (ID:os4.gatherplace.com-32773-1121729492019-0:0) is shutting down
> >
> >> Jul 19, 2005 7:41:34 AM
> org.activemq.broker.impl.BrokerContainerImpl
> >>
> > deregisterConnection
> >
> >> INFO: Removing client: gwjmsproducer on transport:  
> >> TcpTransportChannel:
> >>
> > Socket[addr=/127.0.0.1,port=60733,localport=61616]
> >
> >> Jul 19, 2005 7:41:35 AM  
> >> org.activemq.transport.tcp.TcpTransportChannel
> >>
> > doClose
> >
> > Because ActiveMQ decides to shut down the broker for some unknown  
> > reason,
> > all subsequent sends fail.
> >
> > From the time stamps this connection is not closed until the first  
> > message
> > is ready to be sent.  So this connection has been open for a few  
> > minutes
> > without a problem.  Then mysteriously just before the first
> message  
> > is to be
> > sent, ActiveMQ decides it is time to shut down the broker
> and close  
> > the
> > connnection.
> >
> > I am not saying that there is not a bug in my code :) but I am not  
> > closing
> > the JMS connections - they are opened and kept open.  The
> code is also
> > pretty simple and works fine on Windows.
> >
> > It is interesting that the logs shows an IP address of 127.0.0.1  
> > for the
> > connection to be closed.  Could that be a problem?
> >
> > Kind regards,
> > Frik Strecker
> >
> >
> >
> >> -----Original Message-----
> >> From: [hidden email] [mailto:[hidden email]]
> >> Sent: Tuesday, July 19, 2005 6:58 AM
> >> To: [hidden email]
> >> Subject: Re: [activemq-dev] Linux and Windows
> >>
> >> Thanks Frik
> >>
> >>  From looking at the stack traces, I don't think this is actually a
> >> problem with ActiveMQ - its more an effect of a different
> threading/
> >> scheduler implementation on Linux versus Windows.
> >>
> >> i.e. you have a thread which is attempting to send a message on a
> >> connection that another thread has closed. It doesn't look like any
> >> kind of bug in ActiveMQ.
> >>
> >> Just out of interest, who is closing the connections down that your
> >> background publisher thread is using to publish? Maybe its worth
> >> stopping the publisher threads first (and waiting for them to
> >> complete) before closing the JMS connection they are using?
> >>
> >>
> >>
> >> On 19 Jul 2005, at 12:43, Frik Strecker wrote:
> >>
> >>
> >>> Done.  Thanks and let me know what other data I can
> gather to help.
> >>>
> >>> Kind regards,
> >>> Frik Strecker
> >>>
> >>> Voice: +1-603-672-3296
> >>> http://www.GatherPlace.NET
> >>> Effective On-line Presentations
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: [hidden email] [mailto:[hidden email]]
> >>>> Sent: Tuesday, July 19, 2005 4:34 AM
> >>>> To: [hidden email]
> >>>> Subject: Re: [activemq-dev] Linux and Windows
> >>>>
> >>>>
> >>>> On 19 Jul 2005, at 02:09, Frik Strecker wrote:
> >>>>
> >>>>
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> When I run the broker on Windows and the JMS clients on
> Windows, I
> >>>>> have no
> >>>>> problems.  But if I run the same broker on Linux
> Fedora, I have a
> >>>>> problem.
> >>>>> I use the same clients... The only change is to run the
> broker on
> >>>>> Linux (the
> >>>>> exact same java code).
> >>>>>
> >>>>>
> >>>>
> >>>> This sounds like a new one to us.
> >>>>
> >>>>
> >>>>
> >>>>> Should I open a trouble ticket under the broker?
> >>>>>
> >>>>>
> >>>>
> >>>> Sure, please do. If you include the exception / exact problem
> >>>> you get
> >>>> it'll help us figure out whats going on.
> >>>>
> >>>> James
> >>>> -------
> >>>> http://radio.weblogs.com/0112098/
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>
> >>
> >> James
> >> -------
> >> http://radio.weblogs.com/0112098/
> >>
> >>
> >>
> >
> >
>
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [activemq-dev] Linux and Windows

jstrachan
BTW if for whatever reason the socket connection fails, you can get  
ActiveMQ to auto-reconnect for you using the reliable transport. Just  
connect using

     reliable:tcp://host:port

and it'll just work without you having to hack the JMS client.

We could add some kind of flag to indicate whether or not the  
connection is currently connected. Just out of interest; what do you  
do differently knowing something is connected or not?


On 19 Jul 2005, at 13:58, Frik Strecker wrote:

> Hi,
>
> Sorry for not clarifying the logs better from the start.
>
> The JMS connection is persistent and only closed when there is an  
> error
> condition.  There is something suspicious that I will need to  
> investigate.
>
> I have found that sometimes a client will lose it's connection with  
> the
> broker and not be notified through the ExceptionListener... I  
> looked for an
> isConnected() function call, but could not find any.  So I created  
> a hack
> workaround that I do not like...
>
>     synchronized public boolean isConnected() {
>         if (connection==null) return false;
>         try {
>             return connection.getClientID()!=null;
>         } catch (JMSException e) {
>             return false;
>         }
>     }
>
> And if this returns false, the connection will be closed and  
> reopened.  This
> works great on Windows, but I can see how this may behave  
> differently on
> Linux.  Let me do some testing and let you know.  If this is not  
> the cause,
> I will send some sources.
>
> Do you have any plans to add an isConnected()?  I guess I should  
> file an RFE
> :)
>
> Kind regards,
> Frik Strecker
>
>
>
>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]]
>> Sent: Tuesday, July 19, 2005 7:22 AM
>> To: [hidden email]
>> Subject: Re: [activemq-dev] Linux and Windows
>>
>> Just out of interest, what does the Java code look like thats doing
>> the JMS publishing?
>>
>> BTW the log you posted on the issue...
>> http://jira.logicblaze.com/jira/browse/AMQ-311
>>
>> seems to suggest these warnings appear in the log while your broker
>> is being shut down, yet the publisher is still publishing. I wonder
>> how the broker is being closed? Are you closing connections
>> somewhere? How are you running the broker?
>>
>>
>> On 19 Jul 2005, at 13:12, Frik Strecker wrote:
>>
>>> Hi,
>>>
>>> The problem is that I am not closing the connection.  This is the
>>> problem:
>>>
>>>
>>>
>>>> INFO: ActiveMQ Message Broker
>>>>
>>>>
>>> (ID:os4.gatherplace.com-32773-1121729492019-0:0) is shutting down
>>>
>>>
>>>> Jul 19, 2005 7:41:34 AM
>>>>
>> org.activemq.broker.impl.BrokerContainerImpl
>>
>>>>
>>>>
>>> deregisterConnection
>>>
>>>
>>>> INFO: Removing client: gwjmsproducer on transport:
>>>> TcpTransportChannel:
>>>>
>>>>
>>> Socket[addr=/127.0.0.1,port=60733,localport=61616]
>>>
>>>
>>>> Jul 19, 2005 7:41:35 AM
>>>> org.activemq.transport.tcp.TcpTransportChannel
>>>>
>>>>
>>> doClose
>>>
>>> Because ActiveMQ decides to shut down the broker for some unknown
>>> reason,
>>> all subsequent sends fail.
>>>
>>> From the time stamps this connection is not closed until the first
>>> message
>>> is ready to be sent.  So this connection has been open for a few
>>> minutes
>>> without a problem.  Then mysteriously just before the first
>>>
>> message
>>
>>> is to be
>>> sent, ActiveMQ decides it is time to shut down the broker
>>>
>> and close
>>
>>> the
>>> connnection.
>>>
>>> I am not saying that there is not a bug in my code :) but I am not
>>> closing
>>> the JMS connections - they are opened and kept open.  The
>>>
>> code is also
>>
>>> pretty simple and works fine on Windows.
>>>
>>> It is interesting that the logs shows an IP address of 127.0.0.1
>>> for the
>>> connection to be closed.  Could that be a problem?
>>>
>>> Kind regards,
>>> Frik Strecker
>>>
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: [hidden email] [mailto:[hidden email]]
>>>> Sent: Tuesday, July 19, 2005 6:58 AM
>>>> To: [hidden email]
>>>> Subject: Re: [activemq-dev] Linux and Windows
>>>>
>>>> Thanks Frik
>>>>
>>>>  From looking at the stack traces, I don't think this is actually a
>>>> problem with ActiveMQ - its more an effect of a different
>>>>
>> threading/
>>
>>>> scheduler implementation on Linux versus Windows.
>>>>
>>>> i.e. you have a thread which is attempting to send a message on a
>>>> connection that another thread has closed. It doesn't look like any
>>>> kind of bug in ActiveMQ.
>>>>
>>>> Just out of interest, who is closing the connections down that your
>>>> background publisher thread is using to publish? Maybe its worth
>>>> stopping the publisher threads first (and waiting for them to
>>>> complete) before closing the JMS connection they are using?
>>>>
>>>>
>>>>
>>>> On 19 Jul 2005, at 12:43, Frik Strecker wrote:
>>>>
>>>>
>>>>
>>>>> Done.  Thanks and let me know what other data I can
>>>>>
>> gather to help.
>>
>>>>>
>>>>> Kind regards,
>>>>> Frik Strecker
>>>>>
>>>>> Voice: +1-603-672-3296
>>>>> http://www.GatherPlace.NET
>>>>> Effective On-line Presentations
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: [hidden email] [mailto:[hidden email]]
>>>>>> Sent: Tuesday, July 19, 2005 4:34 AM
>>>>>> To: [hidden email]
>>>>>> Subject: Re: [activemq-dev] Linux and Windows
>>>>>>
>>>>>>
>>>>>> On 19 Jul 2005, at 02:09, Frik Strecker wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> When I run the broker on Windows and the JMS clients on
>>>>>>>
>> Windows, I
>>
>>>>>>> have no
>>>>>>> problems.  But if I run the same broker on Linux
>>>>>>>
>> Fedora, I have a
>>
>>>>>>> problem.
>>>>>>> I use the same clients... The only change is to run the
>>>>>>>
>> broker on
>>
>>>>>>> Linux (the
>>>>>>> exact same java code).
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> This sounds like a new one to us.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Should I open a trouble ticket under the broker?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Sure, please do. If you include the exception / exact problem
>>>>>> you get
>>>>>> it'll help us figure out whats going on.
>>>>>>
>>>>>> James
>>>>>> -------
>>>>>> http://radio.weblogs.com/0112098/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> James
>>>> -------
>>>> http://radio.weblogs.com/0112098/
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>>
>>
>>
>
>


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

Reply | Threaded
Open this post in threaded view
|

RE: [activemq-dev] Linux and Windows

Frik Strecker
Awesome info!! You made my day, thanks.  

If not connected, then it tries to reconnect.  Otherwise, it will never
reconnect unless the software is restarted.  The reliable option should take
care of this issue though.  Yeah!

I think a isConnected flag would still be good as it could be used to send a
notification to the sysadmin to investigate the issue.  Better would be an
event listener to avoid polling and also be notified when the problem is
resolved.

Thanks again,
Frik Strecker

 

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: Tuesday, July 19, 2005 8:35 AM
> To: [hidden email]
> Subject: Re: [activemq-dev] Linux and Windows
>
> BTW if for whatever reason the socket connection fails, you can get  
> ActiveMQ to auto-reconnect for you using the reliable
> transport. Just  
> connect using
>
>      reliable:tcp://host:port
>
> and it'll just work without you having to hack the JMS client.
>
> We could add some kind of flag to indicate whether or not the  
> connection is currently connected. Just out of interest; what do you  
> do differently knowing something is connected or not?
>
>
> On 19 Jul 2005, at 13:58, Frik Strecker wrote:
> > Hi,
> >
> > Sorry for not clarifying the logs better from the start.
> >
> > The JMS connection is persistent and only closed when there is an  
> > error
> > condition.  There is something suspicious that I will need to  
> > investigate.
> >
> > I have found that sometimes a client will lose it's
> connection with  
> > the
> > broker and not be notified through the ExceptionListener... I  
> > looked for an
> > isConnected() function call, but could not find any.  So I created  
> > a hack
> > workaround that I do not like...
> >
> >     synchronized public boolean isConnected() {
> >         if (connection==null) return false;
> >         try {
> >             return connection.getClientID()!=null;
> >         } catch (JMSException e) {
> >             return false;
> >         }
> >     }
> >
> > And if this returns false, the connection will be closed and  
> > reopened.  This
> > works great on Windows, but I can see how this may behave  
> > differently on
> > Linux.  Let me do some testing and let you know.  If this is not  
> > the cause,
> > I will send some sources.
> >
> > Do you have any plans to add an isConnected()?  I guess I should  
> > file an RFE
> > :)
> >
> > Kind regards,
> > Frik Strecker
> >
> >
> >
> >
> >> -----Original Message-----
> >> From: [hidden email] [mailto:[hidden email]]
> >> Sent: Tuesday, July 19, 2005 7:22 AM
> >> To: [hidden email]
> >> Subject: Re: [activemq-dev] Linux and Windows
> >>
> >> Just out of interest, what does the Java code look like thats doing
> >> the JMS publishing?
> >>
> >> BTW the log you posted on the issue...
> >> http://jira.logicblaze.com/jira/browse/AMQ-311
> >>
> >> seems to suggest these warnings appear in the log while your broker
> >> is being shut down, yet the publisher is still publishing. I wonder
> >> how the broker is being closed? Are you closing connections
> >> somewhere? How are you running the broker?
> >>
> >>
> >> On 19 Jul 2005, at 13:12, Frik Strecker wrote:
> >>
> >>> Hi,
> >>>
> >>> The problem is that I am not closing the connection.  This is the
> >>> problem:
> >>>
> >>>
> >>>
> >>>> INFO: ActiveMQ Message Broker
> >>>>
> >>>>
> >>> (ID:os4.gatherplace.com-32773-1121729492019-0:0) is shutting down
> >>>
> >>>
> >>>> Jul 19, 2005 7:41:34 AM
> >>>>
> >> org.activemq.broker.impl.BrokerContainerImpl
> >>
> >>>>
> >>>>
> >>> deregisterConnection
> >>>
> >>>
> >>>> INFO: Removing client: gwjmsproducer on transport:
> >>>> TcpTransportChannel:
> >>>>
> >>>>
> >>> Socket[addr=/127.0.0.1,port=60733,localport=61616]
> >>>
> >>>
> >>>> Jul 19, 2005 7:41:35 AM
> >>>> org.activemq.transport.tcp.TcpTransportChannel
> >>>>
> >>>>
> >>> doClose
> >>>
> >>> Because ActiveMQ decides to shut down the broker for some unknown
> >>> reason,
> >>> all subsequent sends fail.
> >>>
> >>> From the time stamps this connection is not closed until the first
> >>> message
> >>> is ready to be sent.  So this connection has been open for a few
> >>> minutes
> >>> without a problem.  Then mysteriously just before the first
> >>>
> >> message
> >>
> >>> is to be
> >>> sent, ActiveMQ decides it is time to shut down the broker
> >>>
> >> and close
> >>
> >>> the
> >>> connnection.
> >>>
> >>> I am not saying that there is not a bug in my code :) but I am not
> >>> closing
> >>> the JMS connections - they are opened and kept open.  The
> >>>
> >> code is also
> >>
> >>> pretty simple and works fine on Windows.
> >>>
> >>> It is interesting that the logs shows an IP address of 127.0.0.1
> >>> for the
> >>> connection to be closed.  Could that be a problem?
> >>>
> >>> Kind regards,
> >>> Frik Strecker
> >>>
> >>>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: [hidden email] [mailto:[hidden email]]
> >>>> Sent: Tuesday, July 19, 2005 6:58 AM
> >>>> To: [hidden email]
> >>>> Subject: Re: [activemq-dev] Linux and Windows
> >>>>
> >>>> Thanks Frik
> >>>>
> >>>>  From looking at the stack traces, I don't think this is
> actually a
> >>>> problem with ActiveMQ - its more an effect of a different
> >>>>
> >> threading/
> >>
> >>>> scheduler implementation on Linux versus Windows.
> >>>>
> >>>> i.e. you have a thread which is attempting to send a message on a
> >>>> connection that another thread has closed. It doesn't
> look like any
> >>>> kind of bug in ActiveMQ.
> >>>>
> >>>> Just out of interest, who is closing the connections
> down that your
> >>>> background publisher thread is using to publish? Maybe its worth
> >>>> stopping the publisher threads first (and waiting for them to
> >>>> complete) before closing the JMS connection they are using?
> >>>>
> >>>>
> >>>>
> >>>> On 19 Jul 2005, at 12:43, Frik Strecker wrote:
> >>>>
> >>>>
> >>>>
> >>>>> Done.  Thanks and let me know what other data I can
> >>>>>
> >> gather to help.
> >>
> >>>>>
> >>>>> Kind regards,
> >>>>> Frik Strecker
> >>>>>
> >>>>> Voice: +1-603-672-3296
> >>>>> http://www.GatherPlace.NET
> >>>>> Effective On-line Presentations
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: [hidden email] [mailto:[hidden email]]
> >>>>>> Sent: Tuesday, July 19, 2005 4:34 AM
> >>>>>> To: [hidden email]
> >>>>>> Subject: Re: [activemq-dev] Linux and Windows
> >>>>>>
> >>>>>>
> >>>>>> On 19 Jul 2005, at 02:09, Frik Strecker wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> When I run the broker on Windows and the JMS clients on
> >>>>>>>
> >> Windows, I
> >>
> >>>>>>> have no
> >>>>>>> problems.  But if I run the same broker on Linux
> >>>>>>>
> >> Fedora, I have a
> >>
> >>>>>>> problem.
> >>>>>>> I use the same clients... The only change is to run the
> >>>>>>>
> >> broker on
> >>
> >>>>>>> Linux (the
> >>>>>>> exact same java code).
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>> This sounds like a new one to us.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> Should I open a trouble ticket under the broker?
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>> Sure, please do. If you include the exception / exact problem
> >>>>>> you get
> >>>>>> it'll help us figure out whats going on.
> >>>>>>
> >>>>>> James
> >>>>>> -------
> >>>>>> http://radio.weblogs.com/0112098/
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> James
> >>>> -------
> >>>> http://radio.weblogs.com/0112098/
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>
> >>
> >> James
> >> -------
> >> http://radio.weblogs.com/0112098/
> >>
> >>
> >>
> >
> >
>
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [activemq-dev] Linux and Windows

jstrachan

On 19 Jul 2005, at 14:49, Frik Strecker wrote:

> Awesome info!! You made my day, thanks.

Great! :)

> If not connected, then it tries to reconnect.

Yes.

see here for details - you can use infinite retry, exponential retry  
timeout, fixed number of retry attempts before failing etc...
http://activemq.org/Configuring+Transports


>   Otherwise, it will never
> reconnect unless the software is restarted.

Agreed

> The reliable option should take
> care of this issue though.  Yeah!

:)

> I think a isConnected flag would still be good as it could be used  
> to send a
> notification to the sysadmin to investigate the issue.  Better  
> would be an
> event listener to avoid polling and also be notified when the  
> problem is
> resolved.

We have our own you can use.

connection.getTransportChannel().addTransportStatusEventListener
(TransportStatusEventListener listener)

which gets notified of transport status events (connected,  
disconnected, reconnected, failed, stopped etc)

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

Reply | Threaded
Open this post in threaded view
|

RE: [activemq-dev] Linux and Windows

Frik Strecker

>
> > I think a isConnected flag would still be good as it could be used  
> > to send a
> > notification to the sysadmin to investigate the issue.  Better  
> > would be an
> > event listener to avoid polling and also be notified when the  
> > problem is
> > resolved.
>
> We have our own you can use.
>
> connection.getTransportChannel().addTransportStatusEventListener
> (TransportStatusEventListener listener)
>
> which gets notified of transport status events (connected,  
> disconnected, reconnected, failed, stopped etc)
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>

Perfect.  That solves all our issues.

FYI - www.gatherplace.net is proudly using ActiveMQ - so feel free to post
GatherPlace on your web site as a user.

Also, if any ActiveMQ developer sees use for GatherPlace to do code reviews
or collaboration, please let me know and I will get your free accounts for
use related to ActiveMQ development.

Kind regards,
Frik

Reply | Threaded
Open this post in threaded view
|

Re: [activemq-dev] Linux and Windows

jstrachan

On 19 Jul 2005, at 15:16, Frik Strecker wrote:

>>> I think a isConnected flag would still be good as it could be used
>>> to send a
>>> notification to the sysadmin to investigate the issue.  Better
>>> would be an
>>> event listener to avoid polling and also be notified when the
>>> problem is
>>> resolved.
>>>
>>
>> We have our own you can use.
>>
>> connection.getTransportChannel().addTransportStatusEventListener
>> (TransportStatusEventListener listener)
>>
>> which gets notified of transport status events (connected,
>> disconnected, reconnected, failed, stopped etc)
>
> Perfect.  That solves all our issues.

Glad to hear it Frik

> FYI - www.gatherplace.net is proudly using ActiveMQ - so feel free  
> to post
> GatherPlace on your web site as a user.

Many thanks - have done. Feel free to edit the page (everyone can),  
see the little edit link on the bottom right hand side of each page.  
Or client on the Wiki link in the top right of the page to go  
directly into the wiki.

I've added you and GatherPlace to the list - by all means edit it if  
you like...
http://docs.codehaus.org/display/ACTIVEMQ/Users



> Also, if any ActiveMQ developer sees use for GatherPlace to do code  
> reviews
> or collaboration, please let me know and I will get your free  
> accounts for
> use related to ActiveMQ development.

Great stuff! It looks like well worth a try, thanks! :)

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

Reply | Threaded
Open this post in threaded view
|

RE: [activemq-dev] Linux and Windows

Don Branson-2
In reply to this post by jstrachan

Perhaps I've misinterpreted how to use this.  If I configure broker A in
this way:

                <connector>
                        <tcpServerTransport uri="tcp://localhost:1090" />
                </connector>

And configure broker B with a channel like this:

                <connector>
                        <tcpServerTransport uri="tcp://localhost:1091" />
                </connector>

                <networkConnector>
                        <networkChannel uri="reliable:tcp://localhost:1090"
/>
                </networkConnector>

B definitely doesn't reconnect when A bounces, using ActiveMQ 3.0 or
ActiveMQ 3.1-M5.  Under 3.1 B's channel to A stops, and it complains that it
'Caught exception dispatching message and no ExceptionListener registered:'.
(It's an EOFException.)  When A restarts, B never reconnects.

What needs to be changed in the above configuration to make this work?

Don

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Tuesday, July 19, 2005 7:35 AM
To: [hidden email]
Subject: Re: [activemq-dev] Linux and Windows

BTW if for whatever reason the socket connection fails, you can get  
ActiveMQ to auto-reconnect for you using the reliable transport. Just  
connect using

     reliable:tcp://host:port

and it'll just work without you having to hack the JMS client.

We could add some kind of flag to indicate whether or not the  
connection is currently connected. Just out of interest; what do you  
do differently knowing something is connected or not?


On 19 Jul 2005, at 13:58, Frik Strecker wrote:

> Hi,
>
> Sorry for not clarifying the logs better from the start.
>
> The JMS connection is persistent and only closed when there is an  
> error
> condition.  There is something suspicious that I will need to  
> investigate.
>
> I have found that sometimes a client will lose it's connection with  
> the
> broker and not be notified through the ExceptionListener... I  
> looked for an
> isConnected() function call, but could not find any.  So I created  
> a hack
> workaround that I do not like...
>
>     synchronized public boolean isConnected() {
>         if (connection==null) return false;
>         try {
>             return connection.getClientID()!=null;
>         } catch (JMSException e) {
>             return false;
>         }
>     }
>
> And if this returns false, the connection will be closed and  
> reopened.  This
> works great on Windows, but I can see how this may behave  
> differently on
> Linux.  Let me do some testing and let you know.  If this is not  
> the cause,
> I will send some sources.
>
> Do you have any plans to add an isConnected()?  I guess I should  
> file an RFE
> :)
>
> Kind regards,
> Frik Strecker
>
>
>
>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]]
>> Sent: Tuesday, July 19, 2005 7:22 AM
>> To: [hidden email]
>> Subject: Re: [activemq-dev] Linux and Windows
>>
>> Just out of interest, what does the Java code look like thats doing
>> the JMS publishing?
>>
>> BTW the log you posted on the issue...
>> http://jira.logicblaze.com/jira/browse/AMQ-311
>>
>> seems to suggest these warnings appear in the log while your broker
>> is being shut down, yet the publisher is still publishing. I wonder
>> how the broker is being closed? Are you closing connections
>> somewhere? How are you running the broker?
>>
>>
>> On 19 Jul 2005, at 13:12, Frik Strecker wrote:
>>
>>> Hi,
>>>
>>> The problem is that I am not closing the connection.  This is the
>>> problem:
>>>
>>>
>>>
>>>> INFO: ActiveMQ Message Broker
>>>>
>>>>
>>> (ID:os4.gatherplace.com-32773-1121729492019-0:0) is shutting down
>>>
>>>
>>>> Jul 19, 2005 7:41:34 AM
>>>>
>> org.activemq.broker.impl.BrokerContainerImpl
>>
>>>>
>>>>
>>> deregisterConnection
>>>
>>>
>>>> INFO: Removing client: gwjmsproducer on transport:
>>>> TcpTransportChannel:
>>>>
>>>>
>>> Socket[addr=/127.0.0.1,port=60733,localport=61616]
>>>
>>>
>>>> Jul 19, 2005 7:41:35 AM
>>>> org.activemq.transport.tcp.TcpTransportChannel
>>>>
>>>>
>>> doClose
>>>
>>> Because ActiveMQ decides to shut down the broker for some unknown
>>> reason,
>>> all subsequent sends fail.
>>>
>>> From the time stamps this connection is not closed until the first
>>> message
>>> is ready to be sent.  So this connection has been open for a few
>>> minutes
>>> without a problem.  Then mysteriously just before the first
>>>
>> message
>>
>>> is to be
>>> sent, ActiveMQ decides it is time to shut down the broker
>>>
>> and close
>>
>>> the
>>> connnection.
>>>
>>> I am not saying that there is not a bug in my code :) but I am not
>>> closing
>>> the JMS connections - they are opened and kept open.  The
>>>
>> code is also
>>
>>> pretty simple and works fine on Windows.
>>>
>>> It is interesting that the logs shows an IP address of 127.0.0.1
>>> for the
>>> connection to be closed.  Could that be a problem?
>>>
>>> Kind regards,
>>> Frik Strecker
>>>
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: [hidden email] [mailto:[hidden email]]
>>>> Sent: Tuesday, July 19, 2005 6:58 AM
>>>> To: [hidden email]
>>>> Subject: Re: [activemq-dev] Linux and Windows
>>>>
>>>> Thanks Frik
>>>>
>>>>  From looking at the stack traces, I don't think this is actually a
>>>> problem with ActiveMQ - its more an effect of a different
>>>>
>> threading/
>>
>>>> scheduler implementation on Linux versus Windows.
>>>>
>>>> i.e. you have a thread which is attempting to send a message on a
>>>> connection that another thread has closed. It doesn't look like any
>>>> kind of bug in ActiveMQ.
>>>>
>>>> Just out of interest, who is closing the connections down that your
>>>> background publisher thread is using to publish? Maybe its worth
>>>> stopping the publisher threads first (and waiting for them to
>>>> complete) before closing the JMS connection they are using?
>>>>
>>>>
>>>>
>>>> On 19 Jul 2005, at 12:43, Frik Strecker wrote:
>>>>
>>>>
>>>>
>>>>> Done.  Thanks and let me know what other data I can
>>>>>
>> gather to help.
>>
>>>>>
>>>>> Kind regards,
>>>>> Frik Strecker
>>>>>
>>>>> Voice: +1-603-672-3296
>>>>> http://www.GatherPlace.NET
>>>>> Effective On-line Presentations
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: [hidden email] [mailto:[hidden email]]
>>>>>> Sent: Tuesday, July 19, 2005 4:34 AM
>>>>>> To: [hidden email]
>>>>>> Subject: Re: [activemq-dev] Linux and Windows
>>>>>>
>>>>>>
>>>>>> On 19 Jul 2005, at 02:09, Frik Strecker wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> When I run the broker on Windows and the JMS clients on
>>>>>>>
>> Windows, I
>>
>>>>>>> have no
>>>>>>> problems.  But if I run the same broker on Linux
>>>>>>>
>> Fedora, I have a
>>
>>>>>>> problem.
>>>>>>> I use the same clients... The only change is to run the
>>>>>>>
>> broker on
>>
>>>>>>> Linux (the
>>>>>>> exact same java code).
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> This sounds like a new one to us.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Should I open a trouble ticket under the broker?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Sure, please do. If you include the exception / exact problem
>>>>>> you get
>>>>>> it'll help us figure out whats going on.
>>>>>>
>>>>>> James
>>>>>> -------
>>>>>> http://radio.weblogs.com/0112098/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> James
>>>> -------
>>>> http://radio.weblogs.com/0112098/
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> James
>> -------
>> http://radio.weblogs.com/0112098/
>>
>>
>>
>
>


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