qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Godfrey <rob.j.godf...@gmail.com>
Subject Re: JMS AMQP 1.0 SocketException for rapid session/producer open and close
Date Mon, 24 Feb 2014 12:59:27 GMT
I'm not overly familiar with the capabilities of the ServiceBus
implementation... I recollect there were (at some time) some restrictions
about the number of sessions supported by a connection, or the number of
links on a session.  There's obviously nothing too useful in the logs
there... I'm just wondering if "rapid" closing and opening of sessions is
leading the client to open one session before the last session has been
fully closed on the server side, and that perhaps this is not something
that ServiceBus is happy with...

-- Rob


On 24 February 2014 13:46, Jan Bares <jan.bares@wood.cz> wrote:

> Hi,
>
> Here are logs from the Server
>
> Here I added Thread.sleep() after session.close(). Code works fine, one
> TCP session is created and the rest repeats with 5  seconds sleep.
> ===========================
> gateway0: Create connection1054.
> A new TCP session opened at the gateway. Namespace:
> prgxit002.prague.wood.cz, Uri Path: connection1054, Session Type:
> 192.168.2.145:53415, Session Id: ITBARES(5276):1
> gsession1056: Receive FRM(001F|2|0|00
>  begin(next-outgoing-id:0,incoming-window:2048,outgoing-window:2048,handle-max:4294967295)).
> gsession1057: Receive FRM(0021|2|0|00
>  begin(remote-channel:0,next-outgoing-id:1,incoming-window:2048,outgoing-window:2048)).
> gsession1056: Bind gsession1057.
> gsession1057: Receive FRM(0023|2|0|00
>  flow(next-in-id:0,in-window:2048,next-out-id:1,out-window:2048,handle:0,link-credit:50,delivery-count:0,available:0,echo:False)).
> gsession1056: Receive FRM(000F|2|0|00  detach(handle:0)).
> gsession1057: Receive FRM(0011|2|0|00  detach(handle:0,closed:True)).
> gsession1056: Receive FRM(000E|2|0|00  end()).
> gsession1057: Receive FRM(000F|2|0|00  end()).
> ......waiting 5 seconds because client calls sleep()
> gsession1058: Receive FRM(001F|2|0|00
>  begin(next-outgoing-id:0,incoming-window:2048,outgoing-window:2048,handle-max:4294967295)).
> gsession1059: Receive FRM(0021|2|0|00
>  begin(remote-channel:0,next-outgoing-id:1,incoming-window:2048,outgoing-window:2048)).
> gsession1058: Bind gsession1059.
> ...
>
> Here is the same code without the sleep, the TCP session gets closed when
> client calls createSession too quickly after close session (see the stack
> trace in initial post).
> ===============================
> gateway0: Create connection1069.
> A new TCP session opened at the gateway. Namespace:
> prgxit002.prague.wood.cz, Uri Path: connection1069, Session Type:
> 192.168.2.145:53508, Session Id: ITBARES(6560):1
> gsession1071: Receive FRM(001F|2|0|00
>  begin(next-outgoing-id:0,incoming-window:2048,outgoing-window:2048,handle-max:4294967295)).
> gsession1072: Receive FRM(0021|2|0|00
>  begin(remote-channel:0,next-outgoing-id:1,incoming-window:2048,outgoing-window:2048)).
> gsession1071: Bind gsession1072.
> gsession1072: Receive FRM(0023|2|0|00
>  flow(next-in-id:0,in-window:2048,next-out-id:1,out-window:2048,handle:0,link-credit:50,delivery-count:0,available:0,echo:False)).
> gsession1071: Receive FRM(000F|2|0|00  detach(handle:0)).
> gsession1072: Receive FRM(0011|2|0|00  detach(handle:0,closed:True)).
> gsession1071: Receive FRM(000E|2|0|00  end()).
> gsession1072: Receive FRM(000F|2|0|00  end()).
> Gateway TCP session was closed. Namespace: prgxit002.prague.wood.cz, Uri
> Path: connection1069, Session Type: 192.168.2.145:53508, Session Id:
> ITBARES(6560):1
>
> Kind regards, Jan
>
> > -----Original Message-----
> > From: Rob Godfrey [mailto:rob.j.godfrey@gmail.com]
> > Sent: Friday, February 21, 2014 3:14 PM
> > To: users@qpid.apache.org
> > Subject: Re: JMS AMQP 1.0 SocketException for rapid session/producer open
> > and close
> >
> > Should have guessed it was ServiceBus from your previous issue... I'm not
> > ruling out some sort of client issue... but as above the error you're
> > getting would point to the server side disconnecting for some reason...
> > whether that reason is a server side error or a client error is a little
> > hard to know without some more information from logs.
> >
> > Cheers,
> > Rob
> >
> >
> > On 21 February 2014 14:33, Jan Bares <jan.bares@wood.cz> wrote:
> >
> > > Its Microsoft Service Bus with SSL  :-)
> > >
> > > If it works against Java QPID broker, it might be problem on the server
> > > side. Thank you for testing. I will check the logs but I am afraid I
> will
> > > not find anything useful.
> > >
> > > Kind regards, Jan
> > >
> > > > -----Original Message-----
> > > > From: Rob Godfrey [mailto:rob.j.godfrey@gmail.com]
> > > > Sent: Friday, February 21, 2014 11:19 AM
> > > > To: users@qpid.apache.org
> > > > Subject: Re: JMS AMQP 1.0 SocketException for rapid session/producer
> > open
> > > > and close
> > > >
> > > > On 21 February 2014 10:58, Rob Godfrey <rob.j.godfrey@gmail.com>
> > wrote:
> > > >
> > > > > Hi Jan,
> > > > >
> > > > > can you confirm which broker you are testing against here?
> > > > >
> > > > > I ran the code above on trunk against the Java Broker and didn't
> > > > > immediately see an issue (though I wasn't using SSL and you appear
> to
> > > be,
> > > > > so I shall try that presently)
> > > > >
> > > > >
> > > >
> > > > Having tried with SSL, this also works fine with the Java broker
> > > > (effectively using the 0.27-SNAPSHOT nightly build)... The error you
> are
> > > > getting would indicate that the broker has closed the connection for
> > some
> > > > reason, were there any error messages in the log of your broker when
> > you
> > > > run this test?
> > > >
> > > > -- Rob
> > > >
> > > >
> > > > > Thanks,
> > > > > Rob
> > > > >
> > > > >
> > > > > On 21 February 2014 10:35, Jan Bares <jan.bares@wood.cz> wrote:
> > > > >
> > > > >> Hi,
> > > > >>
> > > > >> The code bellow throws SocketException with QPID 0.26 AMQP 1.0.
It
> > > > works
> > > > >> fine with AMQP 0-10 client. When I add sleeps of 100ms before
and
> > > after
> > > > the
> > > > >> close() calls, it works. Seems like the close() method returns
too
> > > early
> > > > >> when background threads are still not finished. The code is
> minimal to
> > > > >> reproduce the problem.
> > > > >>
> > > > >> Thanks for your time, Jan
> > > > >>
> > > > >> ...
> > > > >>   connection = connectionFactory.createConnection();
> > > > >>
> > > > >>   // send some messages to empty queue
> > > > >>   for (int i = 0; i < 5; i++)
> > > > >>       openAndClose(connection, context);
> > > > >> }
> > > > >>
> > > > >> static void openAndClose(Connection connection, Context context)
> > > > throws
> > > > >> JMSException,
> > > > >>         NamingException, InterruptedException {
> > > > >>     Session session = null;
> > > > >>     MessageProducer messageProducer = null;
> > > > >>
> > > > >>     try {
> > > > >>         session = connection.createSession(false/*transacted*/,
> > > > >> Session.AUTO_ACKNOWLEDGE);
> > > > >>         Topic topic = (Topic)
> context.lookup("ORDER_HISTORY_TOPIC");
> > > > >>         messageProducer = session.createProducer(topic);
> > > > >>     } finally {
> > > > >>         if (messageProducer != null)
> > > > >>             messageProducer.close();
> > > > >>         if (session != null)
> > > > >>             session.close();
> > > > >>     }
> > > > >> }
> > > > >>
> > > > >> javax.jms.JMSException
> > > > >>         at
> > > > >>
> > > >
> > org.apache.qpid.amqp_1_0.jms.impl.SessionImpl.<init>(SessionImpl.java:93)
> > > > >>         at
> > > > >>
> > > >
> > org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(Connect
> > > > ionImpl.java:169)
> > > > >>         at
> > > > >>
> > > >
> > org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(Connect
> > > > ionImpl.java:149)
> > > > >>         at
> > > > >>
> > > >
> > org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.createSession(Connect
> > > > ionImpl.java:36)
> > > > >>         at cz.baresovi.qpid.Qpid.openAndClose(Qpid.java:369)
> > > > >>         at cz.baresovi.qpid.Qpid.testPublisherBug(Qpid.java:101)
> > > > >>         at cz.baresovi.qpid.Qpid.runTests(Qpid.java:61)
> > > > >>         at cz.baresovi.qpid.Qpid.main(Qpid.java:56)
> > > > >> java.net.SocketException: Socket is closed
> > > > >>         at
> > > > >> sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1467)
> > > > >>         at
> > > > >> sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1488)
> > > > >>         at
> > > > sun.security.ssl.AppOutputStream.write(AppOutputStream.java:70)
> > > > >>         at
> > > > >>
> > > >
> > org.apache.qpid.amqp_1_0.framing.ConnectionHandler$BytesOutputHandle
> > > > r.processBytes(ConnectionHandler.java:418)
> > > > >>         at
> > > > >>
> > > >
> > org.apache.qpid.amqp_1_0.framing.ConnectionHandler$FrameToBytesSourc
> > > > eAdapter.getBytes(ConnectionHandler.java:305)
> > > > >>         at
> > > > >>
> > > >
> > org.apache.qpid.amqp_1_0.framing.ConnectionHandler$SequentialBytesSou
> > > > rce.getBytes(ConnectionHandler.java:371)
> > > > >>         at
> > > > >>
> > > >
> > org.apache.qpid.amqp_1_0.framing.ConnectionHandler$BytesOutputHandle
> > > > r.run(ConnectionHandler.java:404)
> > > > >>         at java.lang.Thread.run(Thread.java:744)
> > > > >>
> > > > >> Jan Bareš
> > > > >> Calypso Lead Developer
> > > > >>
> > > > >> In association with
> > > > >> WOOD & Company Financial Services, a.s.
> > > > >> Palladium, Náměstí Republiky 1079/1a
> > > > >> 110 00 Prague, Czech Republic
> > > > >> Tel. +420 222 096 111
> > > > >> Direct +420 222 096 457
> > > > >> Fax. +420 222 096 222
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >> DISCLAIMER
> > > > >> ________________________________
> > > > >>          WOOD & Company Financial Services, a.s. and its
branches
> are
> > > > >> authorized and regulated by the CNB as Home State regulator and
in
> > > > Poland
> > > > >> by the KNF, in Slovakia by the NBS and in the UK by the FCA as
> Host
> > > State
> > > > >> regulators. For further information about WOOD & Co., its
> investment
> > > > >> services, financial instruments and associated risks, safeguard
> client
> > > > >> assets (incl. compensation schemes) and contractual relationship
> > > please
> > > > see
> > > > >> our website at www.wood.com<http://www.wood.com/> under
> > section
> > > > >> Corporate Governance.
> > > > >>          Unless otherwise stated, this transmission is neither
an
> > > offer
> > > > >> nor the solicitation of an offer to sell or purchase any
> investment.
> > > All
> > > > >> estimates, opinions and other information contained herein are
> > > subject to
> > > > >> change without notice and are provided in good faith but without
> legal
> > > > >> responsibility or liability. Opinion may be personal to the author
> > > and may
> > > > >> not reflect the opinions of WOOD & Co. Communications from
sales
> > > > persons,
> > > > >> sales traders or traders should not be regarded as investment
> > research
> > > > and
> > > > >> may contain opinions or trading ideas which are different from
> WOOD
> > &
> > > > Co.
> > > > >> investment research opinions.
> > > > >>          This e-mail and any attachments are confidential and
may
> be
> > > > >> privileged or otherwise protected from disclosure. If you are
not
> a
> > > named
> > > > >> addressee you must not use, disclose, distribute, copy, print
or
> rely
> > > on
> > > > >> this e-mail and any of its attachments. Please notify the sender
> that
> > > you
> > > > >> have received this email by mistake by replying to the email,
and
> then
> > > > >> delete the email and any copies of it. Although WOOD & Co.
> routinely
> > > > >> screens e-mails for viruses, addressees should scan this e-mail
> and
> > > any
> > > > >> attachments for viruses. WOOD & Co. makes no representation
or
> > > > warranty as
> > > > >> to the absence of viruses in this e-mail or any attachments.
> Please
> > > note
> > > > >> that to ensure regulatory compliance and for the protection of
our
> > > clients
> > > > >> and business, we may monitor and read e-mails sent to and from
our
> > > > >> server(s).
> > > > >> ________________________________
> > > > >>
> > > > >>
> ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> > > > >> For additional commands, e-mail: users-help@qpid.apache.org
> > > > >>
> > > > >>
> > > > >
> > >
> > >
> > >
> > > DISCLAIMER
> > > ________________________________
> > >          WOOD & Company Financial Services, a.s. and its branches are
> > > authorized and regulated by the CNB as Home State regulator and in
> > Poland
> > > by the KNF, in Slovakia by the NBS and in the UK by the FCA as Host
> State
> > > regulators. For further information about WOOD & Co., its investment
> > > services, financial instruments and associated risks, safeguard client
> > > assets (incl. compensation schemes) and contractual relationship please
> > see
> > > our website at www.wood.com<http://www.wood.com/> under section
> > Corporate
> > > Governance.
> > >          Unless otherwise stated, this transmission is neither an offer
> > > nor the solicitation of an offer to sell or purchase any investment.
> All
> > > estimates, opinions and other information contained herein are subject
> to
> > > change without notice and are provided in good faith but without legal
> > > responsibility or liability. Opinion may be personal to the author and
> may
> > > not reflect the opinions of WOOD & Co. Communications from sales
> > persons,
> > > sales traders or traders should not be regarded as investment research
> and
> > > may contain opinions or trading ideas which are different from WOOD &
> > Co.
> > > investment research opinions.
> > >          This e-mail and any attachments are confidential and may be
> > > privileged or otherwise protected from disclosure. If you are not a
> named
> > > addressee you must not use, disclose, distribute, copy, print or rely
> on
> > > this e-mail and any of its attachments. Please notify the sender that
> you
> > > have received this email by mistake by replying to the email, and then
> > > delete the email and any copies of it. Although WOOD & Co. routinely
> > > screens e-mails for viruses, addressees should scan this e-mail and any
> > > attachments for viruses. WOOD & Co. makes no representation or
> > warranty as
> > > to the absence of viruses in this e-mail or any attachments. Please
> note
> > > that to ensure regulatory compliance and for the protection of our
> clients
> > > and business, we may monitor and read e-mails sent to and from our
> > > server(s).
> > > ________________________________
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> > > For additional commands, e-mail: users-help@qpid.apache.org
> > >
> > >
>
>
>
> DISCLAIMER
> ________________________________
>          WOOD & Company Financial Services, a.s. and its branches are
> authorized and regulated by the CNB as Home State regulator and in Poland
> by the KNF, in Slovakia by the NBS and in the UK by the FCA as Host State
> regulators. For further information about WOOD & Co., its investment
> services, financial instruments and associated risks, safeguard client
> assets (incl. compensation schemes) and contractual relationship please see
> our website at www.wood.com<http://www.wood.com/> under section Corporate
> Governance.
>          Unless otherwise stated, this transmission is neither an offer
> nor the solicitation of an offer to sell or purchase any investment. All
> estimates, opinions and other information contained herein are subject to
> change without notice and are provided in good faith but without legal
> responsibility or liability. Opinion may be personal to the author and may
> not reflect the opinions of WOOD & Co. Communications from sales persons,
> sales traders or traders should not be regarded as investment research and
> may contain opinions or trading ideas which are different from WOOD & Co.
> investment research opinions.
>          This e-mail and any attachments are confidential and may be
> privileged or otherwise protected from disclosure. If you are not a named
> addressee you must not use, disclose, distribute, copy, print or rely on
> this e-mail and any of its attachments. Please notify the sender that you
> have received this email by mistake by replying to the email, and then
> delete the email and any copies of it. Although WOOD & Co. routinely
> screens e-mails for viruses, addressees should scan this e-mail and any
> attachments for viruses. WOOD & Co. makes no representation or warranty as
> to the absence of viruses in this e-mail or any attachments. Please note
> that to ensure regulatory compliance and for the protection of our clients
> and business, we may monitor and read e-mails sent to and from our
> server(s).
> ________________________________
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message