Clients sometimes blocked to get the proxy of the server when using IceGrid

in Help Center
Hi, all
I'm using the IceGrid as the location service in my app, but I find that sometimes when I launched a client to connected to server, it will take a long time to resolve the proxy and get the result back.
After my debuging the client, I found that it will blocked for about 20 seconds at :
but finally, it can get the proxy and finished the call, it occured often when I launch a client frequently in a short time.
My icegrid has only one node, and it has two services under this node, both of them running on the same PC
can someone give me suggestions? Thanks in advance.
I'm using the IceGrid as the location service in my app, but I find that sometimes when I launched a client to connected to server, it will take a long time to resolve the proxy and get the result back.
After my debuging the client, I found that it will blocked for about 20 seconds at :
Ice::ObjectPrx svcBase = m_commPtr->stringToProxy("[email protected]"); m_proxy = ObjectPrx::checkedCast(svcBase) ;
but finally, it can get the proxy and finished the call, it occured often when I launch a client frequently in a short time.
My icegrid has only one node, and it has two services under this node, both of them running on the same PC
can someone give me suggestions? Thanks in advance.
0
Comments
config.AlarmService & config.ScadaService : my service app config files
config.node1 : node config file
application.xml & config.grid : my icegrid config files
I've set the Ice Trace Properties and log the trace level messages.I found that:
I do not understand why this endpoint ' tcp -h 192.168.122.1 -p 53890: ' is append to my real endpoint 'tcp -h 192.168.1.117 -p 53890', I do know how this endpoint comes out?
The computer where you run your server (and node1) has 2 network interfaces, one with address 192.168.1.117 and one with address 192.168.122.1.
Currently, you configure this server to listen on both network interfaces, and more importantly to register both network interfaces with IceGrid as the endpoints for @ScadaAdapter and @AlarmAdapter proxies:
tcp is equivalent to "tcp -h *" for object adapter endpoints.
(side note: if you use a recent version of Ice, you don't need register-process)
The solution is to add "-h <name or IP address>" to your endpoints, for example endpoints="tcp -h 192.168.1.117". This way, your server will only listen on this network interface, and will only register the corresponding endpoint with IceGrid.
Best regards,
Bernard
Hi Bernard,
Thanks for your reply, it works fine after apply your solution, thanks a lot!!!!!:)
Best Regards,
Dorian lee