PublishedEndpoints and IceGrid

in Help Center
Hi Benoit,
I now have to deploy the midlet into a real phone.
Before using IceGrid, in my simple bidir example, I found out that I needed to set up the PublishedEndpoints property into the config file.
Now that I use IceGrid, how can I set the PublishedEndpoints in the application.xml file (and/or in the config.grid) ?
This is the previous config file (before using IceGrid):
Code:
This is the config file (with IceGrid):
Do I have to put the GLOBAL_IP_ADDRESS in the config.grid file, concerning the Ice.Default.Locator ?
This is the application.xml file:
In my example, I have the Locator and the server application that are in the same host, but with different ports: I would like the first binded to the 12000 and the second binded to the 15000.
Thanks a lot in advance
Regards
Alberto
I now have to deploy the midlet into a real phone.
Before using IceGrid, in my simple bidir example, I found out that I needed to set up the PublishedEndpoints property into the config file.
Now that I use IceGrid, how can I set the PublishedEndpoints in the application.xml file (and/or in the config.grid) ?
This is the previous config file (before using IceGrid):
Code:
#SERVER CONFIGURATION Callback.Server.Endpoints=tcp -h LOCAL_IP_ADDRESS -p 15000 Callback.Server.PublishedEndpoints=tcp -h PUBLIC_IP_ADDRESS -p 15000
This is the config file (with IceGrid):
Do I have to put the GLOBAL_IP_ADDRESS in the config.grid file, concerning the Ice.Default.Locator ?
This is the application.xml file:
<icegrid> <application name="Callback"> <node name="localhost"> <server id="Callback.Server" exe="server" activation="on-demand"> <adapter name="Callback.Server" endpoints="tcp -h 192.168.1.220 -p 15000" register-process="true"> <object identity="callback" type="myCallBack"/> </adapter> </server> </node> </application> </icegrid>
In my example, I have the Locator and the server application that are in the same host, but with different ports: I would like the first binded to the 12000 and the second binded to the 15000.
Thanks a lot in advance
Regards
Alberto
0
Comments
<adapter>.PublishedEndpoints tells the ObjectAdapter the endpoints it "publishes". For direct-adapters, this means the endpoints in the proxies you create with this adapter (with any of the operation on the adapter that returns a proxy). For indirect adapters, this means the endpoints the adapter registers with IceGrid during activate().
If you configure your adapter with "tcp -h 192.168.1.220 -p 12000" for Endpoints and "tcp -h 192.168.1.220 -p 15000" for PublishedEndpoints, you also need some piece of software (typically firewall) that redirects requests to port 15000 to port 12000. Ice is not involved in this port redirection.
Likewise, if you have 2 network cards in your server, you can't just configure the adapter's Endpoints to be "tcp -h 192.168.1.220 -p 12000" and the PublishedEndpoints to be "tcp -h 1.2.4.5 -p 15000", unless you have another piece of software that takes care of the redirection.
I hope this is clearer now!
Bernard
My intention is to set the PublishedEndpoints with the global ip of my router and for Endpoints the local ip of the server.
Due to the fact that the Locator is installed in the the same PC where the server.exe is hosted, I tlought as a reasonable choice to set the same Endpoint for both, but with different ports.
My question is: can I set the PublishedEndpoints in the application.xml (in the case I need it)?
Should I have to set both the Endpoints and the PublishedEndpoints for the Locator as well?
Thank you again
Cheers
Alberto
Yes, you can set any property in a server descriptor with the <property> XML element.
Setting the published endpoints of the IceGrid registry client endpoints might be necessary if you want to access the IceGrid registry well known objects (IceGrid::Query, IceGrid::Registry, sessions) through the published endpoints.
Cheers,
Benoit.
I receive a WSAECONNREFUSED when a deploy the application described in the file application.xml (using the command icegridadmin --Ice.Config=config.grid -e "application add 'application.xml'").
I tried to change several settings, but I get this error anyway.
Could you please help me? This is the last step of my thesis....and I'm going to present it.
Consider that my laptop has a local address which is 192.168.1.220, and my router has an address which is 87.29.100.50.
The router is properly configure to manages all the requests that ask for the port 12000 and 15000.
My laptop hosts both the locator (binded to the port 12000) and the application (port 15000).
This is the config.grid file:
and this is the application.xml file:
What might be wrong?
Thank you in advance!
I would really appreciate any help from you.
Alberto
Instead you should have:
Also, to help you diagnose your problem you should turn on network tracing with Ice.Trace.Network=2 so you can see what addresses are being used where.
Cheers,
Benoit.
I was uncertain whether to put the PublishedEndpoints as an attributes of the adapter element or not.... in this case I get the error that Benoit shows.
I didn't realize that I had to put it as a true XML element
I use Ice 3.0.1.
Today is my last day of apprenticeship in the company that is written in my signature....On monday I will change it (and it will become University of Pisa - Italy)
I've noticed that when there is a sintax error in the application.xml file, if there is a WSAECONNREFUSED when I deploy the application, this xml-error is not shown.
I would like to thank you all! You have really helped me in the develop of this application! It will be an honor for me to quote all of you in my dissertation!
Thanks a lot!
With my very best regards
Alberto
Dear all,
I've changed the public IP address of the server, which is configured in the application.xml file, with my dynamyc DNS (it's something like XXXXX.dyndns.org).
I know for sure that this dynamic DNS address works correctly.
Well, the problem occurs when I call the server from my mobile: I get this error
Can I use this kind of addressing? Where else do I have to put it?
I left unmodified the config.grid file: do I have to modify also this?
Thanks in advance
Regards
Alberto
<server id="Callback.Server" exe="server" activation="on-demand">
I'd recommend to specify a full path for your exe.
Cheers,
Bernard