AbstractHttpConnection

49 views
Skip to first unread message

Jeff Nuss

unread,
May 29, 2012, 6:22:37 PM5/29/12
to cometd...@googlegroups.com
Has anyone had any experience with this warning before?

W/System.err(1537): 81946 [HttpClient-85] WARN org.eclipse.jetty.client.AbstractHttpConnection - No exchange for response

Our app will handshake and subscribe and start getting messages from the server but after a few minutes, this warning will show up and then we'll stop receiving cometd messages. Any thoughts? Thanks.

Jeff

Matthew Tyson

unread,
May 29, 2012, 9:19:48 PM5/29/12
to cometd...@googlegroups.com
What server are you running inside of?



Jeff

--
You received this message because you are subscribed to the Google Groups "cometd-users" group.
To post to this group, send email to cometd...@googlegroups.com
To unsubscribe from this group, send email to cometd-users...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cometd-users
 
Visit the CometD website at http://www.cometd.org

Simone Bordet

unread,
May 30, 2012, 3:40:50 AM5/30/12
to cometd...@googlegroups.com
Hi,

On Wed, May 30, 2012 at 12:22 AM, Jeff Nuss <jeff...@gmail.com> wrote:
> Has anyone had any experience with this warning before?
>
> W/System.err(1537): 81946 [HttpClient-85] WARN
> org.eclipse.jetty.client.AbstractHttpConnection - No exchange for response

Never seen it.

> Our app will handshake and subscribe and start getting messages from the
> server but after a few minutes, this warning will show up and then we'll
> stop receiving cometd messages. Any thoughts? Thanks.

The warning is because of an internal state messed up in HttpClient.
How it can mess it up like that, not clear to me (should not be
possible, it's a paranoid check).

Exact CometD and Jetty versions ? OS ? Jetty/CometD configuration ?
Is this reproducible in a test case ?

Simon
--
http://cometd.org
http://intalio.com
http://bordet.blogspot.com
----
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz

Jeff Nuss

unread,
May 30, 2012, 4:56:26 PM5/30/12
to cometd...@googlegroups.com
We're using jetty 8.1.3 v20120416 and Cometd v.2.4.0. The OS is android. I'm not sure what you mean by Jetty/CometD configuration. As for a test case, I don't have one at the moment. I'm testing a client against a server that I didn't write, but it seems unlikely to be the server because there's another app that works against the same server doing a similar function using the javascript cometd library and it works fine. Thanks for the help.

Jeff

Simone Bordet

unread,
May 31, 2012, 2:55:36 AM5/31/12
to cometd...@googlegroups.com
Hi,

On Wed, May 30, 2012 at 10:56 PM, Jeff Nuss <jeff...@gmail.com> wrote:
> We're using jetty 8.1.3 v20120416 and Cometd v.2.4.0. The OS is android. I'm
> not sure what you mean by Jetty/CometD configuration. As for a test case, I
> don't have one at the moment. I'm testing a client against a server that I
> didn't write, but it seems unlikely to be the server because there's another
> app that works against the same server doing a similar function using the
> javascript cometd library and it works fine. Thanks for the help.

How do you setup BayeuxClient and HttpClient in your application ?
What kind of connector do you use ?

Jeff Nuss

unread,
May 31, 2012, 12:26:54 PM5/31/12
to cometd...@googlegroups.com
Here's our setup code:

HttpClient httpClient = new HttpClient();
httpClient.setConnectTimeout(TIMEOUT);
httpClient.setTimeout(TIMEOUT);
try {
    httpClient.start();
} catch (Exception e) {
    logger.e(e, "Unable to start httpClient");
}
LongPollingTransport transport = new LongPollingTransport(null,
        httpClient) {

    @Override
    protected void customize(ContentExchange exchange) {

        super.customize(exchange);

        exchange.addRequestHeader(HEADER_SESSIONID,
                sessionId);
    }
};

client = new BayeuxClient(serverAddress, transport);

ClientSessionChannel.MessageListener handshakeListener = new HandshakeListener();
client.getChannel(Channel.META_HANDSHAKE)
        .addListener(handshakeListener);

Map<String, Object> handshakeFields = new HashMap<String, Object>();
Map<String, Object> extFields = new HashMap<String, Object>();
extFields.put("uuid", uuid);
extFields.put("type", R.string.app_name);
handshakeFields.put("ext", extFields);
client.handshake(handshakeFields);

// Wait for the client to connect or else the client ID will be null
connected = client.waitFor(1000, BayeuxClient.State.CONNECTED);

It's worth noting that we're running CometD in an Android service and that we create it's own thread to run in. I noticed that where the warning is occurring, the ContentExchange variable _exchange that is being checked is volatile, so it seems possible that some thread is setting the _exchange variable to null.

Jeff

Simone Bordet

unread,
Jun 3, 2012, 9:57:09 AM6/3/12
to cometd...@googlegroups.com
Hi,
First time I see this problem... we have other people using the Java
CometD client in Android with no problems.

Can you try to use different Jetty versions, and see if it happens
with all of them ? Perhaps we can narrow down the problem.
Reply all
Reply to author
Forward
0 new messages