You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sergey Beryozkin <sb...@gmail.com> on 2013/03/01 12:10:56 UTC

Re: d-OSGi greeter_rest demo in Felix 4.0.3 - client question

Hi

On 28/02/13 22:19, nkrendel wrote:
> I'm trying to test the greeter_rest dOSGi sample in a vanilla install of
> Felix 4.0.3.  I have two instances running on two different machines.  I
> installed the multi-bundle version of dOSGI 1.4.0. and ran the server in a
> Mac install of Felix 4.0.3 and the client in a Windows install of Felix
> 4.0.3.
>
> The server comes up and I can get to the /greeter resource via browser or
> restclient.  However the client bundle doesn't bring up the UI, and looks
> like it's not able to find the remote service.

Does the client work when running it on the same host with the server ?
I wonder if the Mac endpoint should be configured with a host name that 
can be reached from the Windows client ?

Cheers, Sergey

>
> The last log lines I see on the client side are these:
>
> --------------------------
> [FelixDispatchQueue] DEBUG
> org.apache.cxf.dosgi.topologymanager.importer.TopologyManagerImport -
> importable se
> rvice added for filter
> (&(objectClass=org.apache.cxf.dosgi.samples.greeter.rest.GreeterService)(!(endpoint.fra
> mework.uuid=ca2698c6-3437-4fa9-978c-3587b779bd7a))), endpoint
> {endpoint.id=http://localhost:9000/org/apache/cx
> f/dosgi/samples/greeter/rest/GreeterService,
> objectClass=[org.apache.cxf.dosgi.samples.greeter.rest.GreeterSer
> vice], org.apache.cxf.rs.address=http://10.47.36.213:8080/greeter,
> service.imported=true, service.imported.con
> figs=org.apache.cxf.rs}
> [FelixDispatchQueue] DEBUG
> org.apache.cxf.dosgi.topologymanager.importer.TopologyManagerImport - Import
> of a s
> ervice for filter
> (&(objectClass=org.apache.cxf.dosgi.samples.greeter.rest.GreeterService)(!(endpoint.framewor
> k.uuid=ca2698c6-3437-4fa9-978c-3587b779bd7a))) was queued
> [FelixDispatchQueue] DEBUG
> org.apache.cxf.dosgi.topologymanager.importer.TopologyManagerImport -
> importable se
> rvice added for filter
> (&(objectClass=org.apache.cxf.dosgi.samples.greeter.rest.GreeterService2)(!(endpoint.fr
> amework.uuid=ca2698c6-3437-4fa9-978c-3587b779bd7a))), endpoint
> {endpoint.id=http://localhost:9000/org/apache/c
> xf/dosgi/samples/greeter/rest/GreeterService2,
> objectClass=[org.apache.cxf.dosgi.samples.greeter.rest.GreeterS
> ervice2], org.apache.cxf.rs.address=http://10.47.36.213:8080/greeter2,
> service.imported=true, service.imported
> .configs=org.apache.cxf.rs}
> [FelixDispatchQueue] DEBUG
> org.apache.cxf.dosgi.topologymanager.importer.TopologyManagerImport - Import
> of a s
> ervice for filter
> (&(objectClass=org.apache.cxf.dosgi.samples.greeter.rest.GreeterService2)(!(endpoint.framewo
> rk.uuid=ca2698c6-3437-4fa9-978c-3587b779bd7a))) was queued
> [FelixDispatchQueue] DEBUG cxf-dosgi-ri-samples-greeter-rest-client -
> BundleEvent STARTED - cxf-dosgi-ri-sampl
> es-greeter-rest-client
> --------------------------
>
> The URL mentioned for org.apache.cxf.rs.address is right, but still the
> service import remains as "queued" according to the log.
>
> Any help as to what I may be missing would be much appreciated!
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900.html
> Sent from the cxf-user mailing list archive at Nabble.com.



Re: d-OSGi greeter_rest demo in Felix 4.0.3 - client question

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 06/03/13 21:12, nkrendel wrote:
> Well, in order to provide you with a nice well-documented proof of this not
> working, I started again from scratch, in Felix 4.0.3 and in Karaf 2.3.1,
> and just made a change to remote-services.xml to talk to my server instead
> of localhost.   Lo and Behold, when I _wanted_ it to break - it worked!
>
> All I can conclude from this at this point is that I changed something to
> cause it to break.  Maybe by trying to pull the Server configuration from
> the Activator into blueprint.xml I broke something that prevented the client
> from connecting properly...
>
> Thanks for your help!
Well, I did not help at all :-) Thanks for making it work

Sergey
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5724176.html
> Sent from the cxf-user mailing list archive at Nabble.com.


Re: d-OSGi greeter_rest demo in Felix 4.0.3 - client question

Posted by nkrendel <nk...@yahoo.com>.
Well, in order to provide you with a nice well-documented proof of this not
working, I started again from scratch, in Felix 4.0.3 and in Karaf 2.3.1,
and just made a change to remote-services.xml to talk to my server instead
of localhost.   Lo and Behold, when I _wanted_ it to break - it worked!

All I can conclude from this at this point is that I changed something to
cause it to break.  Maybe by trying to pull the Server configuration from
the Activator into blueprint.xml I broke something that prevented the client
from connecting properly...

Thanks for your help!



--
View this message in context: http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5724176.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: d-OSGi greeter_rest demo in Felix 4.0.3 - client question

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 05/03/13 15:58, nkrendel wrote:
>
> As of now I have not been able to get the greeter_rest sample to work when
> the client and server are not on the same machine.  It doesn't work when
> using IP addresses and it doesn't work when using fully-qualified host
> names.  I have tried with the server on Mac and on SunOs and the client on a
> Windows 2003 VM.
>
> Is it possible for somebody to create a version of greeter_rest that is
> pre-configured for this kind of setup as opposed to everything on localhost?
> If any of you have been able to get the greeter_rest sample working in a
> similar configuration where the client and server are different machines, on
> different networks, what configuration worked for you?
>

Can you please share you client & server configuration here, may be we 
can spot something,

and also,

ckeckout DOSGi source,
and put a breakpoint in
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java,
in createProxy method and see what happens ?

Cheers, Sergey

> I also tried using ZooKeeper instead of remote-services.xml but that didn't
> work either.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5724082.html
> Sent from the cxf-user mailing list archive at Nabble.com.


Re: d-OSGi greeter_rest demo in Felix 4.0.3 - client question

Posted by nkrendel <nk...@yahoo.com>.
As of now I have not been able to get the greeter_rest sample to work when
the client and server are not on the same machine.  It doesn't work when
using IP addresses and it doesn't work when using fully-qualified host
names.  I have tried with the server on Mac and on SunOs and the client on a
Windows 2003 VM.  

Is it possible for somebody to create a version of greeter_rest that is
pre-configured for this kind of setup as opposed to everything on localhost? 
If any of you have been able to get the greeter_rest sample working in a
similar configuration where the client and server are different machines, on
different networks, what configuration worked for you?

I also tried using ZooKeeper instead of remote-services.xml but that didn't
work either.



--
View this message in context: http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5724082.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: d-OSGi greeter_rest demo in Felix 4.0.3 - client question

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 02/03/13 00:53, nkrendel wrote:
>>> Yes it works when both client and server are on the same host.  Therefore
> it
>>> seemed a bit mysterious that it would stop working when two different ip
>>> addresses were involved.
>> What do you mean, why 2 different IP addresses ?
>
> What I meant is the server is on my Mac and the client is on a Windows
> server.  Each machine has its own IP address, hence 2 different IP
> addresses, as opposed to client and server running on the same host.
>
I got confused by you referring to 2 IP addresses, because for the 
purpose of DOSGi client consuming the remote endpoint, only a single 
address of the endpoint (to be consumed) is needed
>>>
>>> The client can reach the host via the the ip address specified in the xml
>>> file.
>>
>> Are you saying it works if IP addresses are used ?
>
> No, the *greeter_rest* sample does /not/ work when IP addresses are used.
> However I know that the server is up because I can access it manually (via
> IP address) using a browser on the client machine.
>
>>> I was even able to access the server REST resource from the client
>>> using a browser.  Are you saying that perhaps I need to be using a host
>>> name
>>> rather than an ip address, and that this should make it work?!
>>>
>> I don't have time right now to test it with multiple hosts, I don't know
>> of any specific limitation which would prevent it from working across
>> hosts. You can also try using ZooKeeper but using explicit references to
>> the hosts should also work
>>
>> Cheers, Sergey
>
> I have only been trying using IP addresses in the configuration file.  My
> next two attempts will be:
> 1. Trying a host-name instead of IP address in the xml file.
> 2. Trying the same sample with ZooKeeper instead of a xml file.
>
> Meanwhile if you are seeing something wrong with what I'm trying to do I'd
> appreciate the pointer!
Does Mac has multiple network adapters by any chance and hence you may 
be using 0.0.0.0 in the endpoint address ? If you set the server to 
publish say "123.123.1.2" address and configure the client to use that 
address too, then I'd expect it to work, sorry I've no other ideas 
really at the moment,
Hope you can narrow the issue soon,
Sergey
>
> Thanks!
>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5723935.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5723948.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: d-OSGi greeter_rest demo in Felix 4.0.3 - client question

Posted by nkrendel <nk...@yahoo.com>.
>> Yes it works when both client and server are on the same host.  Therefore
it
>> seemed a bit mysterious that it would stop working when two different ip
>> addresses were involved.
>What do you mean, why 2 different IP addresses ?

What I meant is the server is on my Mac and the client is on a Windows
server.  Each machine has its own IP address, hence 2 different IP
addresses, as opposed to client and server running on the same host.

>>
>> The client can reach the host via the the ip address specified in the xml
>> file.
>
>Are you saying it works if IP addresses are used ?

No, the *greeter_rest* sample does /not/ work when IP addresses are used. 
However I know that the server is up because I can access it manually (via
IP address) using a browser on the client machine.

>> I was even able to access the server REST resource from the client
>> using a browser.  Are you saying that perhaps I need to be using a host
>> name
>> rather than an ip address, and that this should make it work?!
>>
>I don't have time right now to test it with multiple hosts, I don't know 
>of any specific limitation which would prevent it from working across 
>hosts. You can also try using ZooKeeper but using explicit references to 
>the hosts should also work
>
>Cheers, Sergey

I have only been trying using IP addresses in the configuration file.  My
next two attempts will be:
1. Trying a host-name instead of IP address in the xml file.
2. Trying the same sample with ZooKeeper instead of a xml file.

Meanwhile if you are seeing something wrong with what I'm trying to do I'd
appreciate the pointer!

Thanks!

>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5723935.html
> Sent from the cxf-user mailing list archive at Nabble.com.





--
View this message in context: http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5723948.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: d-OSGi greeter_rest demo in Felix 4.0.3 - client question

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 01/03/13 18:10, nkrendel wrote:
> Hi Sergey,
>
> Yes it works when both client and server are on the same host.  Therefore it
> seemed a bit mysterious that it would stop working when two different ip
> addresses were involved.
What do you mean, why 2 different IP addresses ?

>
> The client can reach the host via the the ip address specified in the xml
> file.

Are you saying it works if IP addresses are used ?


> I was even able to access the server REST resource from the client
> using a browser.  Are you saying that perhaps I need to be using a host name
> rather than an ip address, and that this should make it work?!
>
I don't have time right now to test it with multiple hosts, I don't know 
of any specific limitation which would prevent it from working across 
hosts. You can also try using ZooKeeper but using explicit references to 
the hosts should also work

Cheers, Sergey

> Thanks again for your reply!
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5723935.html
> Sent from the cxf-user mailing list archive at Nabble.com.



Re: d-OSGi greeter_rest demo in Felix 4.0.3 - client question

Posted by nkrendel <nk...@yahoo.com>.
Hi Sergey,

Yes it works when both client and server are on the same host.  Therefore it
seemed a bit mysterious that it would stop working when two different ip
addresses were involved.

The client can reach the host via the the ip address specified in the xml
file.  I was even able to access the server REST resource from the client
using a browser.  Are you saying that perhaps I need to be using a host name
rather than an ip address, and that this should make it work?!

Thanks again for your reply!



--
View this message in context: http://cxf.547215.n5.nabble.com/d-OSGi-greeter-rest-demo-in-Felix-4-0-3-client-question-tp5723900p5723935.html
Sent from the cxf-user mailing list archive at Nabble.com.