You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Hiranya Jayathilaka <hi...@gmail.com> on 2008/11/13 11:31:27 UTC

Problem Running Sample 57 (Dynamic Load Balance)

Hi Folks,

When trying out the sample 57 (dynamic load balance scenario) on a latest
snapshot build I got the following error on an Axis2 node instance.

org.apache.axis2.AxisFault: The service cannot be found for the endpoint
reference (EPR) http://10.8.108.114:9001
        at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:65)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:334)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:248)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:157)
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167)
        at
org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:278)
        at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:187)
        at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
2008-11-13 15:35:17,242 [-] [HttpServerWorker-1] ERROR ServerWorker Error
processing POST request
org.apache.axis2.AxisFault: The service cannot be found for the endpoint
reference (EPR) http://10.8.108.114:9001
        at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:65)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:334)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:248)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:157)
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167)
        at
org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:278)
        at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:187)
        at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

I ran a few debug sessions and found that the DynamicLoadbalanceEndpoint
actually performs the URL rewrite accurately and forwards the message to one
of the Axis2 node instances in the cluster. But the node instance cannot
deal with the incoming request. The LoadBalanceFailOver service is properly
deployed on the Axis2 instance too.

Some feedback on this issue will be highly appreciated.

Thanks

Best Regards,
Hiranya

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Indika,

Please see my comments in line.

On Thu, Nov 13, 2008 at 6:05 PM, indika kumara <in...@gmail.com>wrote:

> Hi
>
> options.setTo(new EndpointReference("http://localhost:" +
> synapsePort))  is the one by default there (as only need to talk to
> synapse by default) and if you look at further in the code, you can
> see if 'addurl' is presented, it is used as 'to' EPR to be called and
> if 'trpurl' presents it set as TRASPORT_URL. So, for me, no need for
> change in client code.
>
> Try with –Daddurl or –Dtrpurl (same as for other client – stockquote,etc)
>
> BTW, in the DynamicLoadbalanceEndpoint code, it seems 'path'
> information of 'to 'address of incoming message is used to create new
> target ApplicationMember's address. So, in case where client directly
> call to synapse, this 'path' is empty and it may cause your issue.


That is correct. I made a few changes to my local copy of the client and now
I don't see any errors in Axis2 any more. But it seems Axis2 does not send
any responses back. Still trying to figure out that issue.

Anyway it seems we might have to update our documentation accordingly
indicating that sample 57 requires the use of addurl switch.

Thanks

Best Regards,
Hiranya


>
>
> BTW, I only just look at code ...didn't go into deep
>
> Thanks
> Indika
>
> On Thu, Nov 13, 2008 at 5:11 PM, Hiranya Jayathilaka
> <hi...@gmail.com> wrote:
> > Hi Folks,
> >
> > I may have found one of the issues. In LoadBalanceFailoverClient the 'To'
> > value is not properly set. Currently it is being set as follows.
> >
> > options.setTo(new EndpointReference("http://localhost:" + synapsePort));
> >
> > But I think it should be set as follows.
> >
> > options.setTo(new EndpointReference("http://localhost:" + synapsePort +
> > "/services/LBService1"));
> >
> > Looking at the SVN history this is how it used to be. It has been changed
> > recently though. Thoughts?
> >
> > Thanks
> >
> > Best Regards,
> > Hiranya
> >
> >
> > On Thu, Nov 13, 2008 at 4:46 PM, Hiranya Jayathilaka <
> hiranya911@gmail.com>
> > wrote:
> >>
> >> Hi Asanka,
> >>
> >> Things seem to work when invoking the service directly from the client.
> I
> >> used the trpurl switch to specify the URI and then I get this.
> >>
> >> hiranya@ultimate-domain:~/synapse-SNAPSHOT/samples/axis2Client$ ant
> >> loadbalancefailover -Di=1
> >> -Dtrpurl=http://10.8.108.114:9001/services/LBService1?sampleOperation
> >> Buildfile: build.xml
> >>
> >> init:
> >>
> >> compile:
> >>
> >> loadbalancefailover:
> >>      [java] timeout=10000000
> >>      [java] Request: 1 ==> Response from server: Node1
> >>
> >> I'll continue to look into this problem.
> >>
> >> Thanks
> >>
> >> Best Regards,
> >> Hiranya
> >>
> >> On Thu, Nov 13, 2008 at 4:12 PM, Asankha C. Perera <as...@apache.org>
> >> wrote:
> >>>
> >>> Hiranya
> >>>>
> >>>> org.apache.axis2.AxisFault: The service cannot be found for the
> endpoint
> >>>> reference (EPR) http://10.8.108.114:9001
> >>>> ...
> >>>> 2008-11-13 15:35:17,242 [-] [HttpServerWorker-1] ERROR ServerWorker
> >>>> Error processing POST request
> >>>> org.apache.axis2.AxisFault: The service cannot be found for the
> endpoint
> >>>> reference (EPR) http://10.8.108.114:9001
> >>>>
> >>>> I ran a few debug sessions and found that the
> DynamicLoadbalanceEndpoint
> >>>> actually performs the URL rewrite accurately and forwards the message
> to one
> >>>> of the Axis2 node instances in the cluster. But the node instance
> cannot
> >>>> deal with the incoming request.
> >>>
> >>> So what you mean is that the remote service does not properly reply to
> >>> this request? If so can you post a TCPMon trace of the conversation?
> >>>>
> >>>> The LoadBalanceFailOver service is properly deployed on the Axis2
> >>>> instance too.
> >>>
> >>> What if you invoke it through the same client bypassing Synapse?
> >>>
> >>> asankha
> >>>
> >>> --
> >>> Asankha C. Perera
> >>> http://adroitlogic.org
> >>>
> >>> http://esbmagic.blogspot.com
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> >>> For additional commands, e-mail: dev-help@synapse.apache.org
> >>>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by indika kumara <in...@gmail.com>.
Hi

options.setTo(new EndpointReference("http://localhost:" +
synapsePort))  is the one by default there (as only need to talk to
synapse by default) and if you look at further in the code, you can
see if 'addurl' is presented, it is used as 'to' EPR to be called and
if 'trpurl' presents it set as TRASPORT_URL. So, for me, no need for
change in client code.

Try with –Daddurl or –Dtrpurl (same as for other client – stockquote,etc)

BTW, in the DynamicLoadbalanceEndpoint code, it seems 'path'
information of 'to 'address of incoming message is used to create new
target ApplicationMember's address. So, in case where client directly
call to synapse, this 'path' is empty and it may cause your issue.

BTW, I only just look at code ...didn't go into deep

Thanks
Indika

On Thu, Nov 13, 2008 at 5:11 PM, Hiranya Jayathilaka
<hi...@gmail.com> wrote:
> Hi Folks,
>
> I may have found one of the issues. In LoadBalanceFailoverClient the 'To'
> value is not properly set. Currently it is being set as follows.
>
> options.setTo(new EndpointReference("http://localhost:" + synapsePort));
>
> But I think it should be set as follows.
>
> options.setTo(new EndpointReference("http://localhost:" + synapsePort +
> "/services/LBService1"));
>
> Looking at the SVN history this is how it used to be. It has been changed
> recently though. Thoughts?
>
> Thanks
>
> Best Regards,
> Hiranya
>
>
> On Thu, Nov 13, 2008 at 4:46 PM, Hiranya Jayathilaka <hi...@gmail.com>
> wrote:
>>
>> Hi Asanka,
>>
>> Things seem to work when invoking the service directly from the client. I
>> used the trpurl switch to specify the URI and then I get this.
>>
>> hiranya@ultimate-domain:~/synapse-SNAPSHOT/samples/axis2Client$ ant
>> loadbalancefailover -Di=1
>> -Dtrpurl=http://10.8.108.114:9001/services/LBService1?sampleOperation
>> Buildfile: build.xml
>>
>> init:
>>
>> compile:
>>
>> loadbalancefailover:
>>      [java] timeout=10000000
>>      [java] Request: 1 ==> Response from server: Node1
>>
>> I'll continue to look into this problem.
>>
>> Thanks
>>
>> Best Regards,
>> Hiranya
>>
>> On Thu, Nov 13, 2008 at 4:12 PM, Asankha C. Perera <as...@apache.org>
>> wrote:
>>>
>>> Hiranya
>>>>
>>>> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
>>>> reference (EPR) http://10.8.108.114:9001
>>>> ...
>>>> 2008-11-13 15:35:17,242 [-] [HttpServerWorker-1] ERROR ServerWorker
>>>> Error processing POST request
>>>> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
>>>> reference (EPR) http://10.8.108.114:9001
>>>>
>>>> I ran a few debug sessions and found that the DynamicLoadbalanceEndpoint
>>>> actually performs the URL rewrite accurately and forwards the message to one
>>>> of the Axis2 node instances in the cluster. But the node instance cannot
>>>> deal with the incoming request.
>>>
>>> So what you mean is that the remote service does not properly reply to
>>> this request? If so can you post a TCPMon trace of the conversation?
>>>>
>>>> The LoadBalanceFailOver service is properly deployed on the Axis2
>>>> instance too.
>>>
>>> What if you invoke it through the same client bypassing Synapse?
>>>
>>> asankha
>>>
>>> --
>>> Asankha C. Perera
>>> http://adroitlogic.org
>>>
>>> http://esbmagic.blogspot.com
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>>> For additional commands, e-mail: dev-help@synapse.apache.org
>>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Folks,

While trying out different load balance samples on the latest synapse build
I encountered an issue with sample 54 (session affinity load balancing
scenario).  According to the documentation all the requests with a specific
session ID should be always directed to the same Axis2 instance. But this is
the kind of output I get.

loadbalancefailover:
     [java] Request: 1 with Session ID: 2 ---- Response : with    Response
from server: Node3
     [java] Request: 2 with Session ID: 0 ---- Response : with    Response
from server: Node1
     [java] Request: 3 with Session ID: 2 ---- Response : with    Response
from server: Node2
     [java] Request: 4 with Session ID: 2 ---- Response : with    Response
from server: Node3
     [java] Request: 5 with Session ID: 2 ---- Response : with    Response
from server: Node1
     [java] Request: 6 with Session ID: 1 ---- Response : with    Response
from server: Node2
     [java] Request: 7 with Session ID: 2 ---- Response : with    Response
from server: Node3
     [java] Request: 8 with Session ID: 1 ---- Response : with    Response
from server: Node1
     [java] Request: 9 with Session ID: 1 ---- Response : with    Response
from server: Node2
     [java] Request: 10 with Session ID: 1 ---- Response : with    Response
from server: Node3

Looks like a bug to me. Thoughts?

Thanks

Best Regards,
Hiranya

On Fri, Nov 14, 2008 at 4:33 PM, Hiranya Jayathilaka
<hi...@gmail.com>wrote:

> Further adding to what I said earlier, sample 54 and other load balancing
> scenarios also seem to work fine. I haven't tried them all yet. I'll let you
> know the situation as soon as I try them out.
>
> Thanks
>
> Best Regards,
> Hiranya
>
>
> On Fri, Nov 14, 2008 at 4:30 PM, Hiranya Jayathilaka <hiranya911@gmail.com
> > wrote:
>
>> Hi Folks,
>>
>> I tried the same scenario on a completely different machine with the
>> latest snapshot build. But still the client does not receive the reply.
>>
>> However sample 150 seems to work without any issues. So I guess this is a
>> problem with the dynamic load balance code.
>>
>> Thanks
>>
>> Best Regards,
>> Hiranya
>>
>>
>>
>> On Fri, Nov 14, 2008 at 3:09 PM, Asankha C. Perera <as...@apache.org>wrote:
>>
>>> Hi Hiranya
>>>
>>>> As per the suggestion by Asankha I did some testing and debugging using
>>>> two different machines. I have attached my Synapse configuration herewith
>>>> (synapse_sample_57.xml). I have included some additional log mediators in
>>>> the config. I see the requests getting logged but not the responses (see
>>>> attachment - synapse.txt). But the tcpdump output (see attachment -
>>>> tcpdump.txt) says that Axis2 actually does send a response (this was
>>>> confirmed by previous results from TCPMon).
>>>>
>>>> However I also noticed this. Requests sent from the service client
>>>> contain addressing headers. But when Synapse forwards the messages to Axis2
>>>> the addressing headers are lost. Can this have any effect on this strange
>>>> behavior? Or am I doing something wrong?
>>>>
>>> The tcpdump shows the acceptance of the response by Synapse, so this
>>> looks a bit more serious.. does the simple samples such as Sample #150 work
>>> for you? If indeed this is a bug, I need to take a close look by
>>> recreating.. I will try to do it over the weekend
>>>
>>>
>>> asankha
>>>
>>> --
>>> Asankha C. Perera
>>> http://adroitlogic.org
>>>
>>> http://esbmagic.blogspot.com
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>>> For additional commands, e-mail: dev-help@synapse.apache.org
>>>
>>>
>>
>

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Further adding to what I said earlier, sample 54 and other load balancing
scenarios also seem to work fine. I haven't tried them all yet. I'll let you
know the situation as soon as I try them out.

Thanks

Best Regards,
Hiranya

On Fri, Nov 14, 2008 at 4:30 PM, Hiranya Jayathilaka
<hi...@gmail.com>wrote:

> Hi Folks,
>
> I tried the same scenario on a completely different machine with the latest
> snapshot build. But still the client does not receive the reply.
>
> However sample 150 seems to work without any issues. So I guess this is a
> problem with the dynamic load balance code.
>
> Thanks
>
> Best Regards,
> Hiranya
>
>
>
> On Fri, Nov 14, 2008 at 3:09 PM, Asankha C. Perera <as...@apache.org>wrote:
>
>> Hi Hiranya
>>
>>> As per the suggestion by Asankha I did some testing and debugging using
>>> two different machines. I have attached my Synapse configuration herewith
>>> (synapse_sample_57.xml). I have included some additional log mediators in
>>> the config. I see the requests getting logged but not the responses (see
>>> attachment - synapse.txt). But the tcpdump output (see attachment -
>>> tcpdump.txt) says that Axis2 actually does send a response (this was
>>> confirmed by previous results from TCPMon).
>>>
>>> However I also noticed this. Requests sent from the service client
>>> contain addressing headers. But when Synapse forwards the messages to Axis2
>>> the addressing headers are lost. Can this have any effect on this strange
>>> behavior? Or am I doing something wrong?
>>>
>> The tcpdump shows the acceptance of the response by Synapse, so this looks
>> a bit more serious.. does the simple samples such as Sample #150 work for
>> you? If indeed this is a bug, I need to take a close look by recreating.. I
>> will try to do it over the weekend
>>
>>
>> asankha
>>
>> --
>> Asankha C. Perera
>> http://adroitlogic.org
>>
>> http://esbmagic.blogspot.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>> For additional commands, e-mail: dev-help@synapse.apache.org
>>
>>
>

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Folks,

I tried the same scenario on a completely different machine with the latest
snapshot build. But still the client does not receive the reply.

However sample 150 seems to work without any issues. So I guess this is a
problem with the dynamic load balance code.

Thanks

Best Regards,
Hiranya


On Fri, Nov 14, 2008 at 3:09 PM, Asankha C. Perera <as...@apache.org>wrote:

> Hi Hiranya
>
>> As per the suggestion by Asankha I did some testing and debugging using
>> two different machines. I have attached my Synapse configuration herewith
>> (synapse_sample_57.xml). I have included some additional log mediators in
>> the config. I see the requests getting logged but not the responses (see
>> attachment - synapse.txt). But the tcpdump output (see attachment -
>> tcpdump.txt) says that Axis2 actually does send a response (this was
>> confirmed by previous results from TCPMon).
>>
>> However I also noticed this. Requests sent from the service client contain
>> addressing headers. But when Synapse forwards the messages to Axis2 the
>> addressing headers are lost. Can this have any effect on this strange
>> behavior? Or am I doing something wrong?
>>
> The tcpdump shows the acceptance of the response by Synapse, so this looks
> a bit more serious.. does the simple samples such as Sample #150 work for
> you? If indeed this is a bug, I need to take a close look by recreating.. I
> will try to do it over the weekend
>
>
> asankha
>
> --
> Asankha C. Perera
> http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Hiranya
> As per the suggestion by Asankha I did some testing and debugging 
> using two different machines. I have attached my Synapse configuration 
> herewith (synapse_sample_57.xml). I have included some additional log 
> mediators in the config. I see the requests getting logged but not the 
> responses (see attachment - synapse.txt). But the tcpdump output (see 
> attachment - tcpdump.txt) says that Axis2 actually does send a 
> response (this was confirmed by previous results from TCPMon).
>
> However I also noticed this. Requests sent from the service client 
> contain addressing headers. But when Synapse forwards the messages to 
> Axis2 the addressing headers are lost. Can this have any effect on 
> this strange behavior? Or am I doing something wrong?
The tcpdump shows the acceptance of the response by Synapse, so this 
looks a bit more serious.. does the simple samples such as Sample #150 
work for you? If indeed this is a bug, I need to take a close look by 
recreating.. I will try to do it over the weekend

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Folks,

As per the suggestion by Asankha I did some testing and debugging using two
different machines. I have attached my Synapse configuration herewith
(synapse_sample_57.xml). I have included some additional log mediators in
the config. I see the requests getting logged but not the responses (see
attachment - synapse.txt). But the tcpdump output (see attachment -
tcpdump.txt) says that Axis2 actually does send a response (this was
confirmed by previous results from TCPMon).

However I also noticed this. Requests sent from the service client contain
addressing headers. But when Synapse forwards the messages to Axis2 the
addressing headers are lost. Can this have any effect on this strange
behavior? Or am I doing something wrong?

Thanks

Best Regards,
Hiranya

On Fri, Nov 14, 2008 at 12:55 PM, Asankha C. Perera <as...@apache.org>wrote:

> Hi Hiranya
>
>> Thanks for the tip. I'll try it out and will let the team know. Anyway
>> even in the previous case the service client didn't receive any response
>> back. However according to the TCPMon trace the Axis2 server instance has
>> sent a response back. Could it be because Synapse failed to route the
>> response back properly?
>>
> Well, yes it could.. the easiest way to find that out is to put a verbose
> log mediator in the out sequence
>
>
> asankha
>
> --
> Asankha C. Perera
> http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Hiranya
> Thanks for the tip. I'll try it out and will let the team know. Anyway 
> even in the previous case the service client didn't receive any 
> response back. However according to the TCPMon trace the Axis2 server 
> instance has sent a response back. Could it be because Synapse failed 
> to route the response back properly?
Well, yes it could.. the easiest way to find that out is to put a 
verbose log mediator in the out sequence

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Asanka,

Thanks for the tip. I'll try it out and will let the team know. Anyway even
in the previous case the service client didn't receive any response back.
However according to the TCPMon trace the Axis2 server instance has sent a
response back. Could it be because Synapse failed to route the response back
properly?

Thanks

Best Regards,
Hiranya

On Fri, Nov 14, 2008 at 10:30 AM, Asankha C. Perera <as...@apache.org>wrote:

> Hi Hiranya
>
>> Getting a TCPMon trace in a dynamic load balance scenario is tricky since
>> the destination hosts and ports are discovered and determined dynamically by
>> Synapse. However using the ability of IntelliJ-IDEA debugger to manually set
>> object properties in the debug mode I managed to trace the messages going
>> from Synapse to Axis2 node instances. The trace is attached herewith.  (If
>> there is a better way of doing this please do let me know. I can try it
>> out.)
>>
>> It seems the addressing headers are missing in the request.
>>
> This trace shows a successful case.. what would be interesting is one that
> fails.. one option is to run the server on another machine (you cannot get a
> tcpdump on the same machine), and get a tcpdump instead.. Usually I use
> something like
>
> sudo tcpdump -i eth1 -X -n -s 4096 port 8080 or port 8200 > /tmp/dump3.txt
>
>
> asankha
>
> --
> Asankha C. Perera
> http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Hiranya
> Getting a TCPMon trace in a dynamic load balance scenario is tricky 
> since the destination hosts and ports are discovered and determined 
> dynamically by Synapse. However using the ability of IntelliJ-IDEA 
> debugger to manually set object properties in the debug mode I managed 
> to trace the messages going from Synapse to Axis2 node instances. The 
> trace is attached herewith.  (If there is a better way of doing this 
> please do let me know. I can try it out.)
>
> It seems the addressing headers are missing in the request.
This trace shows a successful case.. what would be interesting is one 
that fails.. one option is to run the server on another machine (you 
cannot get a tcpdump on the same machine), and get a tcpdump instead.. 
Usually I use something like

sudo tcpdump -i eth1 -X -n -s 4096 port 8080 or port 8200 > /tmp/dump3.txt

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Folks,

Getting a TCPMon trace in a dynamic load balance scenario is tricky since
the destination hosts and ports are discovered and determined dynamically by
Synapse. However using the ability of IntelliJ-IDEA debugger to manually set
object properties in the debug mode I managed to trace the messages going
from Synapse to Axis2 node instances. The trace is attached herewith.  (If
there is a better way of doing this please do let me know. I can try it
out.)

It seems the addressing headers are missing in the request.

Thoughts?

Thanks

Best Regards,
Hiranya

On Thu, Nov 13, 2008 at 6:18 PM, Asankha C. Perera <as...@apache.org>wrote:

> Hi Hiranya
>
>> Any idea what could be causing this behavior?
>>
> That TCPMon output will help pinpoint the problem much faster :-) !
>
> asankha
>
> --
> Asankha C. Perera
> http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Hiranya
> Any idea what could be causing this behavior?
That TCPMon output will help pinpoint the problem much faster :-) !

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Folks,

I'm facing a good news - bad news scenario :-). Good news is I don't see any
errors in the Axis2 node instance any more. The bad news is that the service
client does not receive any response. Debugging shows that Synapse properly
rewrites the URIs and invokes the send mediator to route the request
messages to one of the Axis2 instances. I have attached the console output
of Synapse for further reference.

Any idea what could be causing this behavior?

Thanks

Best Regards,
Hiranya

On Thu, Nov 13, 2008 at 5:18 PM, Asankha C. Perera <as...@apache.org>wrote:

>  Hiranya
>
> I may have found one of the issues. In LoadBalanceFailoverClient the 'To'
> value is not properly set. Currently it is being set as follows.
>
> options.setTo(*new* EndpointReference(*"http://localhost:"* + synapsePort));
>
> But I think it should be set as follows.
>
> options.setTo(*new* EndpointReference(*"http://localhost:"* + synapsePort + *"/services/LBService1"*));
>
> Looking at the SVN history this is how it used to be. It has been changed
> recently though. Thoughts?
>
> Seems like a mistake..
>
> asankha
>
> --
> Asankha C. Pererahttp://adroitlogic.org
> http://esbmagic.blogspot.com
>
>

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by "Asankha C. Perera" <as...@apache.org>.
Hiranya
> I may have found one of the issues. In LoadBalanceFailoverClient the 
> 'To' value is not properly set. Currently it is being set as follows.
> options.setTo(*new* EndpointReference(*"http://localhost:"* + synapsePort));
> But I think it should be set as follows.
> options.setTo(*new* EndpointReference(*"http://localhost:"* + synapsePort + *"/services/LBService1"*));
> Looking at the SVN history this is how it used to be. It has been 
> changed recently though. Thoughts?
Seems like a mistake..

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Folks,

I may have found one of the issues. In LoadBalanceFailoverClient the 'To'
value is not properly set. Currently it is being set as follows.

options.setTo(*new* EndpointReference(*"http://localhost:"* + synapsePort));


But I think it should be set as follows.

options.setTo(*new* EndpointReference(*"http://localhost:"* +
synapsePort + *"/services/LBService1"*));


Looking at the SVN history this is how it used to be. It has been changed
recently though. Thoughts?

Thanks

Best Regards,
Hiranya


On Thu, Nov 13, 2008 at 4:46 PM, Hiranya Jayathilaka
<hi...@gmail.com>wrote:

> Hi Asanka,
>
> Things seem to work when invoking the service directly from the client. I
> used the trpurl switch to specify the URI and then I get this.
>
> hiranya@ultimate-domain:~/synapse-SNAPSHOT/samples/axis2Client$ ant
> loadbalancefailover -Di=1 -Dtrpurl=
> http://10.8.108.114:9001/services/LBService1?sampleOperation
> Buildfile: build.xml
>
> init:
>
> compile:
>
> loadbalancefailover:
>      [java] timeout=10000000
>      [java] Request: 1 ==> Response from server: Node1
>
> I'll continue to look into this problem.
>
> Thanks
>
> Best Regards,
> Hiranya
>
>
> On Thu, Nov 13, 2008 at 4:12 PM, Asankha C. Perera <as...@apache.org>wrote:
>
>> Hiranya
>>
>>> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
>>> reference (EPR) http://10.8.108.114:9001
>>> ...
>>> 2008-11-13 15:35:17,242 [-] [HttpServerWorker-1] ERROR ServerWorker Error
>>> processing POST request
>>> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
>>> reference (EPR) http://10.8.108.114:9001
>>>
>>> I ran a few debug sessions and found that the DynamicLoadbalanceEndpoint
>>> actually performs the URL rewrite accurately and forwards the message to one
>>> of the Axis2 node instances in the cluster. But the node instance cannot
>>> deal with the incoming request.
>>>
>> So what you mean is that the remote service does not properly reply to
>> this request? If so can you post a TCPMon trace of the conversation?
>>
>>> The LoadBalanceFailOver service is properly deployed on the Axis2
>>> instance too.
>>>
>> What if you invoke it through the same client bypassing Synapse?
>>
>> asankha
>>
>> --
>> Asankha C. Perera
>> http://adroitlogic.org
>>
>> http://esbmagic.blogspot.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
>> For additional commands, e-mail: dev-help@synapse.apache.org
>>
>>
>

Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Hi Asanka,

Things seem to work when invoking the service directly from the client. I
used the trpurl switch to specify the URI and then I get this.

hiranya@ultimate-domain:~/synapse-SNAPSHOT/samples/axis2Client$ ant
loadbalancefailover -Di=1 -Dtrpurl=
http://10.8.108.114:9001/services/LBService1?sampleOperation
Buildfile: build.xml

init:

compile:

loadbalancefailover:
     [java] timeout=10000000
     [java] Request: 1 ==> Response from server: Node1

I'll continue to look into this problem.

Thanks

Best Regards,
Hiranya

On Thu, Nov 13, 2008 at 4:12 PM, Asankha C. Perera <as...@apache.org>wrote:

> Hiranya
>
>> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
>> reference (EPR) http://10.8.108.114:9001
>> ...
>> 2008-11-13 15:35:17,242 [-] [HttpServerWorker-1] ERROR ServerWorker Error
>> processing POST request
>> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
>> reference (EPR) http://10.8.108.114:9001
>>
>> I ran a few debug sessions and found that the DynamicLoadbalanceEndpoint
>> actually performs the URL rewrite accurately and forwards the message to one
>> of the Axis2 node instances in the cluster. But the node instance cannot
>> deal with the incoming request.
>>
> So what you mean is that the remote service does not properly reply to this
> request? If so can you post a TCPMon trace of the conversation?
>
>> The LoadBalanceFailOver service is properly deployed on the Axis2 instance
>> too.
>>
> What if you invoke it through the same client bypassing Synapse?
>
> asankha
>
> --
> Asankha C. Perera
> http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>

Re: New synapse transaction mediator

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Irantha
> I'm working on a new synapse mediator to manipulate JTA transactions.
>
> syanpse.xml configuration for new mediator:
> <transaction 
> action="new|use-existing-or-new|fault-if-no-tx|commit|rollback|suspend|resume"/> 
>
>
> Meaning of action attribute values are explained below:
> new : create a new jta transaction. generate a fault if a transaction 
> already exist.
> use-existing-or-new : create a new jta transaction. do nothing if a 
> transaction exist.
> fault-if-no-tx : generate a fault if no transaction exist.  do nothing 
> if a transaction exist.
> commit : commit transaction. generate a fault if no transaction exist.
> rollback: rollback transaction. generate a fault if no transaction exist.
> suspend: suspend transaction. generate a fault if no transaction exist.
> resume: resume transaction. generate a fault if no transaction exist.
>
> There will be a new transaction configuration section in axis2.xml to 
> define UserTransaction (used to create a new transaction) and 
> TransactionManager (need for suspend and resume actions ) JNDI 
> parameters.
>
> newly created usertransaction is assigned to axis2 message context 
> property named BaseConstants.USER_TRANSACTION and newly created 
> transaction manager is assigned to axis2 message context property 
> named BaseConstants.TRANSACTION_MANAGER
>
> Same message context property is used by JMS transport when creating a 
> new usertransaction.
> WDYT?
+1

I also suggest you keep the Axis2 dev list updated about this too.. and 
it'll be a good use case later on for a Axis2 service to be able to 
create a new JTA transaction from within the service code. - e.g. a 
http/s service invocation calls into a service implemented as an AAR 
file, that creates a new JTA transaction and updates two physically 
separate Databases. This might be also good for DataServices etc..

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


New synapse transaction mediator

Posted by Irantha <ir...@wso2.com>.
Hi All,

I'm working on a new synapse mediator to manipulate JTA transactions.

syanpse.xml configuration for new mediator:
<transaction 
action="new|use-existing-or-new|fault-if-no-tx|commit|rollback|suspend|resume"/>

Meaning of action attribute values are explained below:
new : create a new jta transaction. generate a fault if a transaction 
already exist.
use-existing-or-new : create a new jta transaction. do nothing if a 
transaction exist.
fault-if-no-tx : generate a fault if no transaction exist.  do nothing if a 
transaction exist.
commit : commit transaction. generate a fault if no transaction exist.
rollback: rollback transaction. generate a fault if no transaction exist.
suspend: suspend transaction. generate a fault if no transaction exist.
resume: resume transaction. generate a fault if no transaction exist.

There will be a new transaction configuration section in axis2.xml to define 
UserTransaction (used to create a new transaction) and TransactionManager 
(need for suspend and resume actions ) JNDI parameters.

newly created usertransaction is assigned to axis2 message context property 
named BaseConstants.USER_TRANSACTION and newly created transaction manager 
is assigned to axis2 message context property named 
BaseConstants.TRANSACTION_MANAGER

Same message context property is used by JMS transport when creating a new 
usertransaction.
WDYT?

Thanks,
Irantha



----- Original Message ----- 
From: "Asankha C. Perera" <as...@apache.org>
To: <de...@synapse.apache.org>
Sent: Thursday, November 13, 2008 4:12 PM
Subject: Re: Problem Running Sample 57 (Dynamic Load Balance)


> Hiranya
>> org.apache.axis2.AxisFault: The service cannot be found for the endpoint 
>> reference (EPR) http://10.8.108.114:9001
>> ...
>> 2008-11-13 15:35:17,242 [-] [HttpServerWorker-1] ERROR ServerWorker Error 
>> processing POST request
>> org.apache.axis2.AxisFault: The service cannot be found for the endpoint 
>> reference (EPR) http://10.8.108.114:9001
>>
>> I ran a few debug sessions and found that the DynamicLoadbalanceEndpoint 
>> actually performs the URL rewrite accurately and forwards the message to 
>> one of the Axis2 node instances in the cluster. But the node instance 
>> cannot deal with the incoming request.
> So what you mean is that the remote service does not properly reply to 
> this request? If so can you post a TCPMon trace of the conversation?
>> The LoadBalanceFailOver service is properly deployed on the Axis2 
>> instance too.
> What if you invoke it through the same client bypassing Synapse?
>
> asankha
>
> -- 
> Asankha C. Perera
> http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Re: Problem Running Sample 57 (Dynamic Load Balance)

Posted by "Asankha C. Perera" <as...@apache.org>.
Hiranya
> org.apache.axis2.AxisFault: The service cannot be found for the 
> endpoint reference (EPR) http://10.8.108.114:9001
> ...
> 2008-11-13 15:35:17,242 [-] [HttpServerWorker-1] ERROR ServerWorker 
> Error processing POST request
> org.apache.axis2.AxisFault: The service cannot be found for the 
> endpoint reference (EPR) http://10.8.108.114:9001
>
> I ran a few debug sessions and found that the 
> DynamicLoadbalanceEndpoint actually performs the URL rewrite 
> accurately and forwards the message to one of the Axis2 node instances 
> in the cluster. But the node instance cannot deal with the incoming 
> request. 
So what you mean is that the remote service does not properly reply to 
this request? If so can you post a TCPMon trace of the conversation?
> The LoadBalanceFailOver service is properly deployed on the Axis2 
> instance too.
What if you invoke it through the same client bypassing Synapse?

asankha

-- 
Asankha C. Perera
http://adroitlogic.org

http://esbmagic.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org