Archived
This forum has been archived. Please start a new discussion on GitHub.
problem connection
shimrod
in Help Center
Hello,
I got a problem.
I wrote a little java application server , and a little c++ application client.
When I launch the two application on the same machine, its' Heaven
.
I precise the ip in the endpoints, in the ice config file, and the port. Everything sounds good.
When a launch client and server on different machines, my client doesn't reach the server. Not possible to create a proxy.
if in a shell, I launch telnet myIp myPort, the connection is OK. No network problem.
here the client code (c++) creating the proxy. Nothing complex
here the server code (java)
does this behaviour tell you something?
thx for help!
I got a problem.
I wrote a little java application server , and a little c++ application client.
When I launch the two application on the same machine, its' Heaven
I precise the ip in the endpoints, in the ice config file, and the port. Everything sounds good.
When a launch client and server on different machines, my client doesn't reach the server. Not possible to create a proxy.
if in a shell, I launch telnet myIp myPort, the connection is OK. No network problem.
here the client code (c++) creating the proxy. Nothing complex
Ice::ObjectPrx base=ic->stringToProxy("MyServer:default -h xxx.xxx.xxx.xxx -p XXXXX");
proxyToServer=IConnexionManagerPrx::checkedCast(base);
if(!proxyToServer){
throw("invalid proxy" + proxy);
}else{
isConnected=true;
MyLogger::getAppliLog()->LogMessage("Server is ready and has been contacted");
}
here the server code (java)
Ice.ObjectAdapter adapter=ic.createObjectAdapterWithEndpoints("Server", "default -p XXXXX");
ConnexionManager objet=new ConnexionManager();// class extends Interface created by slice
adapter.add(objet,ic.stringToIdentity("MyServer"));
does this behaviour tell you something?
thx for help!
0
Comments
-
See also this FAQ.0
-
Hum, I try to modify my config file:
Mytest.Client.CallbackServer=MyServer:tcp -p XXXX Mytest.Server.Endpoints=tcp -h XXX.XX.XX.XXX -p XXX Ice.Trace.Network=3 Ice.Trace.Protocol=1 Ice.Warn.Connections=1 Ice.ACM.Client=0 Ice.ThreadPool.Client.SizeMax=5 Ice.ThreadPool.Client.Size=4
I can use the properties in my program easily, and find the endpoints for connection, but no trace for the client appears.
I'll try to find what happens, if you got an idea while this time...
thank you0 -
Yes I do.
I have others tasks today, I will test furthermore in few hours.
It is weird, because I can manipulate the properties file in my C++ code, and reach the properties concerning the endpoints, and in my applicative trace, I trace the good things, but the parameters concerning the trace... nothing.
The trace will be write on the console, of the shell launching the application? doesn't it?0 -
It should work when you set the property in the configuration file. So either the property is not being parsed by the communicator or there's nothing to trace.
Are you sure other properties in the configuration file are parsed by the communicator? How do you create the communicator and specify the configuration file?
Cheers,
Benoit.0 -
simply (red),
ic=Ice::initialize(argc,argv); PropertiesPtr properties = ic->getProperties(); string proxyProperty2 = "MyTest.Server.Endpoints"; adressToServer = properties->getProperty(proxyProperty2.c_str());
I try thisPropertiesPtr properties = Ice::createProperties(); properties->setProperty("Ice.Trace.Network", "3"); ic= Ice::initializeWithProperties(argc,argv, properties);
but no trace again...
but I communicate between my differents machine ( windows, debian ), it was effectively and simply a problem from choosing the good ip to adress...
Thanks for your good advice...0 -
Oki...
in fact, when I launch my program, two files are created, stand up, stderr.txt, and stdout.txt. And I saw the trace in it...
But strangely, they are deleted when my program is stopped. Why the trace doesn't appear in my shell, and appear in this file... I dont know where configure it.
Sorry for your lost time...
Thank you0
