You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by manco <me...@yahoo.com> on 2009/05/23 01:18:52 UTC

Howto config samples Server,Client, Synapse to run on 3 machines

Hi, 

I am thinking of using Synapse in the following situation: 
  LINUXBOX1: I have an Axis2 Client running on a linux box in the US
       WBOX1: I have a windows box in the Europe  which has a VPN connection 
                   to a .Net WS Server in a third country (WBOX2).

 My plan is to install Synapse on the WBOX1 as a proxy to WBOX2, and use 
 my local Axis2Client to talk thru the Synapse Proxy. 

 I am trying to simulate this locally but I am getting hung up on
configuration issues, I have to admit
 I don't know much about Linux or windows port configuration. 

 I have run thru the quick start and other examples
including Mock Web services with Apache Synapse to develop and test Web
services
https://www6.software.ibm.com/developerworks/education/ws-synapse/index.html
https://www6.software.ibm.com/developerworks/education/ws-synapse/index.html 
all on a single
machine, ie localhost. I ran the samples with Client/Synapse/Server on the
same machine on my local
linux box, local windows box and my windows box in the EU, they all work
great!

I am now trying to simulate my final setup locally, by running Synapse and
the Server on one machine
and the Client on another. At this point both setups( Synapse/Server on
Linux| Client on Windows, and
Client on Linux | Synapse/Server on Windows) are failing.

Setup 1) Axis2Client(LINUX 192.168.1.105) , Synapse/Axis2Server (WBOX
192.168.1.100:8280)
In this case I think that Synapse gets the msgs but doesn't forward it
properly to the Server

[linuxbox axis2Client]$ ant stockquote
-Dtrpurl=http://192.168.1.100:8280/services/StockQuoteProxy -Dmode=quote
-Dsymbol=IBM
Buildfile: build.xml

init:

compile:

stockquote:
     [java] 2009-05-22 14:24:15,300 [-] [main]  INFO MailTransportSender
MAILTO Sender started
     [java] 2009-05-22 14:24:15,386 [-] [main]  INFO JMSSender JMS Sender
started
     [java] org.apache.axis2.AxisFault: The input stream for an incoming
message is null.
     [java]     at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:72)
     [java]     at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)
     [java]     at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
     [java]     at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
     [java]     at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
     [java]     at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
     [java]     at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
     [java]     at samples.userguide.StockQuoteClient.executeClient(Unknown
Source)
     [java]     at samples.userguide.StockQuoteClient.main(Unknown Source)

However on LINUXBOX from the FireFox browser this is successful:
http://192.168.1.100:8280/soap/StockQuoteProxy?wsdl

On WBOX:
Synapse Output:
2009-05-22 15:23:35,846 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-3] 
INFO LogMediator To: /services/StockQuoteProxy, WSAction: urn:getQuote,
SOAPAction: urn:getQuote, Repl
yTo: http://www.w3.org/2005/08/addressing/anonymous, MessageID:
urn:uuid:6214777A46C6B4F6741243031055518, Direction: request
2009-05-22 15:23:35,846 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-3]
DEBUG LogMediator End : Log mediator
2009-05-22 15:23:35,846 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-3]
DEBUG DropMediator Start : Drop mediator
2009-05-22 15:23:35,846 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-3]
DEBUG DropMediator End : Drop mediator
2009-05-22 15:23:35,846 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-3]
DEBUG SequenceMediator End : Sequence <main>
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG SynapseMessageReceiver Synapse received a new message for message
mediation...
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG SynapseMessageReceiver Received To: /services/StockQuoteProxy
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG SynapseMessageReceiver SOAPAction: urn:getQuote
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG SynapseMessageReceiver WSA-Action: urn:getQuote
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG Axis2SynapseEnvironment Injecting MessageContext
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG Axis2SynapseEnvironment Using Main Sequence for injected message
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG SequenceMediator Start : Sequence <main>
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG SequenceMediator Sequence <SequenceMediator> :: mediate()
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG LogMediator Start : Log mediator
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7] 
INFO LogMediator To: /services/StockQuoteProxy, WSAction: urn:getQuote,
SOAPAction: urn:getQuote, Repl
yTo: http://www.w3.org/2005/08/addressing/anonymous, MessageID:
urn:uuid:5B6645D227F669E1681243031793831, Direction: request
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG LogMediator End : Log mediator
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG DropMediator Start : Drop mediator
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG DropMediator End : Drop mediator
2009-05-22 15:35:54,268 [192.168.1.100-F52F2867C1364CC] [HttpServerWorker-7]
DEBUG SequenceMediator End : Sequence <main>

Setup 2) Axis2Client(WBOX 192.168.1.100), Synapse/Axis2Server  (LINUX
192.168.1.105:8280) 
I am running HTTPD on the LINUX1 and I would guess that there is some config
I have to do to open
up the port but I don't know what that is. I think this is part of the
problem.

C:\latte\apache\synapse\synapse-1.2\samples\axis2Client>ant stockquote
-Dtrpurl=http://192.168.1.105:8280/soap/StockQuoteProxy -Dmode=quote
-Dsymbol=IBM
Buildfile: build.xml

init:

compile:

stockquote:
     [java] 2009-05-22 15:53:05,753 [-] [main]  INFO MailTransportSender
MAILTO Sender started
     [java] 2009-05-22 15:53:05,784 [-] [main]  INFO JMSSender JMS Sender
started
     [java] 2009-05-22 15:53:27,237 [-] [main]  INFO HTTPSender Unable to
sendViaPost to url[http://192.168.1.105:8280/soap/StockQuoteProxy]
     [java] java.net.NoRouteToHostException: No route to host: connect
     [java]     at java.net.PlainSocketImpl.socketConnect(Native Method)
     [java]     at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
     [java]     at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
     [java]     at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
     [java]     at
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
     [java]     at java.net.Socket.connect(Socket.java:507)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] org.apache.axis2.AxisFault: No route to host: connect
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)

WireShark on WBOX:
1	0.000000	192.168.1.100	192.168.1.105	TCP	1470 > 8280 [SYN] Seq=0 Len=0
MSS=1460
2	0.000203	192.168.1.105	192.168.1.100	ICMP	Destination unreachable (Host
administratively prohibited)
3	2.995964	192.168.1.100	192.168.1.105	TCP	1470 > 8280 [SYN] Seq=0 Len=0
MSS=1460
4	2.996166	192.168.1.105	192.168.1.100	ICMP	Destination unreachable (Host
administratively prohibited)
5	5.000043	IntelCor_2f:ca:2f	Sony_8d:61:7c	ARP	Who has 192.168.1.100?  Tell
192.168.1.105
6	5.000059	Sony_8d:61:7c	IntelCor_2f:ca:2f	ARP	192.168.1.100 is at
00:13:a9:8d:61:7c
7	9.121092	192.168.1.100	192.168.1.105	TCP	1470 > 8280 [SYN] Seq=0 Len=0
MSS=1460
8	9.121295	192.168.1.105	192.168.1.100	ICMP	Destination unreachable (Host
administratively prohibited)

WireShark output from LINUXBOX:
1	0.000000	192.168.1.100	192.168.1.105	TCP	uaiact > synapse-nhttp [SYN]
Seq=0 Win=65535 Len=0 MSS=1460
2	0.000023	192.168.1.105	192.168.1.100	ICMP	Destination unreachable (Host
administratively prohibited)
3	2.995935	192.168.1.100	192.168.1.105	TCP	uaiact > synapse-nhttp [SYN]
Seq=0 Win=65535 Len=0 MSS=1460
4	2.995989	192.168.1.105	192.168.1.100	ICMP	Destination unreachable (Host
administratively prohibited)

>From WBOX This fails in the FireFox Browser:
http://192.168.1.105:8280/soap/StockQuoteProxy?wsdl


Any and all help would be greatly appreciated,
Tim



-- 
View this message in context: http://www.nabble.com/Howto-config-samples-Server%2CClient%2C-Synapse-to-run-on-3-machines-tp23679284p23679284.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: Howto config samples Server,Client, Synapse to run on 3 machines

Posted by manco <me...@yahoo.com>.

manco wrote:
> 
> 
> Setup 1) Axis2Client(LINUX 192.168.1.105) , Synapse/Axis2Server (WBOX
> 192.168.1.100:8280)
> In this case I think that Synapse gets the msgs but doesn't forward it
> properly to the Server
> 
> 

changed: respository\conf\synapse.xml

       <!-- filter source="get-property('To')"
regex="http://localhost:9000.*" -->
        <filter source="get-property('To')"
regex="http://192.168.1.100:9000.*">
            <!-- Send the messages where they have been sent (i.e. implicit
"To" EPR) -->
            <send/>
        </filter>

Got me a bit further but now I consistently see cksum errors on the LINUX
wireshark

1	0.000000	192.168.1.105	192.168.1.100	TCP	49192 > synapse-nhttp [SYN] Seq=0
Win=5840 Len=0 MSS=1460 TSV=95505801 TSER=0 WS=6
4	0.000500	192.168.1.100	192.168.1.105	TCP	synapse-nhttp > 49192 [SYN, ACK]
Seq=0 Ack=1 Win=65535 Len=0 MSS=1460 WS=0 TSV=0 TSER=0
5	0.000536	192.168.1.105	192.168.1.100	TCP	49192 > synapse-nhttp [ACK] Seq=1
Ack=1 Win=5888 Len=0 TSV=95505802 TSER=0
6	0.106660	192.168.1.105	192.168.1.100	TCP	49192 > synapse-nhttp [PSH, ACK]
Seq=1 Ack=1 Win=5888 [TCP CHECKSUM INCORRECT] Len=183 TSV=95505908 TSER=0
7	0.106920	192.168.1.105	192.168.1.100	TCP	49192 > synapse-nhttp [PSH, ACK]
Seq=184 Ack=1 Win=5888 [TCP CHECKSUM INCORRECT] Len=481 TSV=95505908 TSER=0
8	0.107231	192.168.1.100	192.168.1.105	TCP	synapse-nhttp > 49192 [ACK] Seq=1
Ack=665 Win=64871 Len=0 TSV=2039016 TSER=95505908
9	0.202697	192.168.1.100	192.168.1.105	TCP	synapse-nhttp > 49192 [PSH, ACK]
Seq=1 Ack=665 Win=64871 Len=126 TSV=20390110
10 0.202751	192.168.1.105	192.168.1.100	TCP	49192 > synapse-nhttp [ACK]
Seq=665 Ack=127 Win=5888 Len=0 TSV=95506004 TSER=2039017TSER=95505908
11	0.202981	192.168.1.100	192.168.1.105	TCP	synapse-nhttp > 49192 [PSH, ACK]
Seq=127 Ack=665 Win=64871 Len=5 TSV=2039017 TSER=95506004
12	0.203016	192.168.1.105	192.168.1.100	TCP	49192 > synapse-nhttp [ACK]
Seq=665 Ack=132 Win=5888 Len=0 TSV=95506004 TSER=2039017
13	0.258909	192.168.1.105	192.168.1.100	TCP	49192 > synapse-nhttp [RST, ACK]
Seq=665 Ack=132 Win=5888 Len=0 TSV=95506060 TSER=2039017


-- 
View this message in context: http://www.nabble.com/Howto-config-samples-Server%2CClient%2C-Synapse-to-run-on-3-machines-tp23679284p23679696.html
Sent from the Synapse - User mailing list archive at Nabble.com.