Hi

Sorry I dont have time to do problem solving in my spare time.

Try making you example simpler and see that piece by piece works until
it breaks.


On Fri, Nov 6, 2009 at 2:51 PM, fab_can <[email protected]> wrote:
>
> Hi Claus
>
> i am attaching a simple eclipse project with code that demonstrates the
> issue.
> http://old.nabble.com/file/p26230522/mina-routing.tgz mina-routing.tgz
> there's a Server class that acts as a listener on port 9999 (connecting to
> it via wget/curl/telnet works for me). There's also a Client class that can
> send requests direct and via camel (on port 8888).
> there's also a class HttpProxyBuilder with the route and a main method to
> start the context.
>
> i haven't included the camel libs in the project, so you'll have to define
> an eclipse build variable called camel.home to point to a camel 2 distro
>
> Any help would be much appreciated
>
> regards
>
> fabrizio
>
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> Do you have some server running and listening on port 9999 ???
>> The logs indicate that no response is received.
>>
>> If you use wget or the likes from the cmd line can you access port
>> 9999 and get a reply back?
>>
>>
>> On Thu, Nov 5, 2009 at 2:52 AM, fab_can <[email protected]> wrote:
>>>
>>> hello I am trying to build a route to proxy http traffic via camel-mina
>>> (I
>>> know of jetty and http endpoints but they are not suitable for my case).
>>> I
>>> have been trying all I can to make it work but still i haven't succeeded.
>>> The point I am at is that the request gets successfully to the to()
>>> endpoint
>>> but for whatever reason the response is never propagated back to the
>>> originating client.
>>>
>>> the route looks like
>>>
>>>
>>> from("mina:tcp://localhost:8888?codec=#httpMinaCodec&sync=true&minaLogger=true&lazySessionCreation=true")
>>>
>>> .to("mina:tcp://localhost:9999?codec=#httpMinaCodec&sync=true&minaLogger=true&lazySessionCreation=true&timeout=10000");
>>>
>>>
>>> and, with trace on the log looks like
>>>
>>> [          AnonymousIoService-6] DefaultProducerServicePool     TRACE
>>> Acquire:
>>> Endpoint[mina://tcp://localhost:9999?codec=%23httpMinaCodec&lazySessionCreation=true&minaLogger=true&sync=true&timeout=10000]
>>> service:
>>> Producer[mina://tcp://localhost:9999?codec=%23httpMinaCodec&lazySessionCreation=true&minaLogger=true&sync=true&timeout=10000]
>>> [          AnonymousIoService-6] MinaProducer                   DEBUG
>>> Creating connector to address: localhost/127.0.0.1:9999 using connector:
>>> org.apache.mina.transport.socket.nio.socketconnec...@c8d62f timeout:
>>> 10000
>>> millis.
>>> [SocketConnectorIoProcessor-1.0] MinaProducer$ResponseHandler   INFO
>>> [localhost/127.0.0.1:9999] CREATED
>>> [SocketConnectorIoProcessor-1.0] ExecutorFilter                 DEBUG
>>> Launching thread for localhost/127.0.0.1:9999
>>> [          AnonymousIoService-7] MinaProducer$ResponseHandler   INFO
>>> [localhost/127.0.0.1:9999] OPENED
>>> [          AnonymousIoService-7] ExecutorFilter                 DEBUG
>>> Exiting since queue is empty for localhost/127.0.0.1:9999
>>> [          AnonymousIoService-6] MinaProducer                   DEBUG
>>> Writing body : GET / HTTP/1.1
>>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g
>>> zlib/1.2.3.3 libidn/1.8
>>> Host: localhost:8888
>>> Accept: */*
>>>
>>>
>>> [          AnonymousIoService-6] MinaProducer$ResponseHandler   INFO
>>> [localhost/127.0.0.1:9999] WRITE: GET / HTTP/1.1
>>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g
>>> zlib/1.2.3.3 libidn/1.8
>>> Host: localhost:8888
>>> Accept: */*
>>>
>>>
>>> Encoding message: GET / HTTP/1.1
>>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g
>>> zlib/1.2.3.3 libidn/1.8
>>> Host: localhost:8888
>>> Accept: */*
>>>
>>>
>>> [SocketConnectorIoProcessor-1.0] ExecutorFilter                 DEBUG
>>> Launching thread for localhost/127.0.0.1:9999
>>> [          AnonymousIoService-8] ExecutorFilter                 DEBUG
>>> Exiting since queue is empty for localhost/127.0.0.1:9999
>>> [          AnonymousIoService-6] MinaProducer                   DEBUG
>>> Waiting for response. Timeout: 10000
>>> [SocketConnectorIoProcessor-1.0] ExecutorFilter                 DEBUG
>>> Launching thread for localhost/127.0.0.1:9999
>>> [          AnonymousIoService-9] MinaProducer$ResponseHandler   INFO
>>> [localhost/127.0.0.1:9999] SENT: GET / HTTP/1.1
>>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g
>>> zlib/1.2.3.3 libidn/1.8
>>> Host: localhost:8888
>>> Accept: */*
>>>
>>>
>>> [          AnonymousIoService-9] ExecutorFilter                 DEBUG
>>> Exiting since queue is empty for localhost/127.0.0.1:9999
>>> [SocketConnectorIoProcessor-1.0] ExecutorFilter                 DEBUG
>>> Launching thread for localhost/127.0.0.1:9999
>>> [         AnonymousIoService-10] ExecutorFilter                 DEBUG
>>> Exiting since queue is empty for localhost/127.0.0.1:9999
>>> [SocketConnectorIoProcessor-1.0] ExecutorFilter                 DEBUG
>>> Launching thread for localhost/127.0.0.1:9999
>>> [         AnonymousIoService-11] MinaProducer$ResponseHandler   INFO
>>> [localhost/127.0.0.1:9999] CLOSED
>>> [         AnonymousIoService-11] MinaProducer                   DEBUG
>>> Session closed but no message received from address:
>>> localhost/127.0.0.1:9999
>>> [          AnonymousIoService-6] DefaultProducerServicePool     TRACE
>>> Release:
>>> Endpoint[mina://tcp://localhost:9999?codec=%23httpMinaCodec&lazySessionCreation=true&minaLogger=true&sync=true&timeout=10000]
>>> service:
>>> Producer[mina://tcp://localhost:9999?codec=%23httpMinaCodec&lazySessionCreation=true&minaLogger=true&sync=true&timeout=10000]
>>> [          AnonymousIoService-6] DefaultTypeConverter           TRACE
>>> Converting com.myapp.mina.HttpMessage -> org.apache.camel.StreamCache
>>> with
>>> value: GET / HTTP/1.1
>>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g
>>> zlib/1.2.3.3 libidn/1.8
>>> Host: localhost:8888
>>> Accept: */*
>>>
>>>
>>> [          AnonymousIoService-6] DefaultTypeConverter           TRACE
>>> Converting org.apache.camel.impl.DefaultMessage ->
>>> org.apache.camel.StreamCache with value: Message: GET / HTTP/1.1
>>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g
>>> zlib/1.2.3.3 libidn/1.8
>>> Host: localhost:8888
>>> Accept: */*
>>>
>>>
>>> [          AnonymousIoService-6] DefaultTypeConverter           TRACE
>>> Converting com.myapp.mina.HttpMessage -> java.lang.String with value: GET
>>> /
>>> HTTP/1.1
>>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g
>>> zlib/1.2.3.3 libidn/1.8
>>> Host: localhost:8888
>>> Accept: */*
>>>
>>>
>>> [          AnonymousIoService-6] TraceInterceptor               INFO
>>> ID-fc-laptop-56193-1257383273772-0-1 >>>
>>> from(mina://tcp://localhost:8888?codec=%23httpMinaCodec&lazySessionCreation=true&minaLogger=true&sync=true)
>>> -->
>>> mina://tcp://localhost:9999?codec=%23httpMinaCodec&lazySessionCreation=true&minaLogger=true&sync=true&timeout=10000,
>>> Pattern:InOut, BodyType:com.myapp.mina.HttpMessage, Body:GET / HTTP/1.1
>>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g
>>> zlib/1.2.3.3 libidn/1.8
>>> Host: localhost:8888
>>> Accept: */*
>>>
>>> , Exception: org.apache.camel.CamelExchangeException: No response
>>> received
>>> from remote server:
>>> mina://tcp://localhost:9999?codec=%23httpMinaCodec&lazySessionCreation=true&minaLogger=true&sync=true&timeout=10000
>>> on the exchange: Exchange[Message: GET / HTTP/1.1
>>> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g
>>> zlib/1.2.3.3 libidn/1.8
>>> Host: localhost:8888
>>> Accept: */*
>>>
>>> I am really stuck here, so any help would be appreciated
>>>
>>> thanks
>>> fabrizio
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Session-closed-but-no-message-received-from-address%3A-localhost-127.0.0.1%3A9999-when-using-camel-mina-tp26207954p26207954.html
>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Session-closed-but-no-message-received-from-address%3A-localhost-127.0.0.1%3A9999-when-using-camel-mina-tp26207954p26230522.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to