Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-22-2004
yomi yomi is offline
Registered User
 
 
Join Date: Aug 2003
Posts: 32
Glacier Starter not support in Windows?

Even acted as a starter's client on windows is not support now?
I failed to use starter on windows.
Reply With Quote
  #2 (permalink)  
Old 04-22-2004
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Hi,

Glacier Starter is supported on Windows as of Ice 1.3.0.

If you are having trouble, you need to provide as much information as possible about the problem, such as your configuration settings, the command line parameters, and the error messages.

Take care,
- Mark
Reply With Quote
  #3 (permalink)  
Old 04-22-2004
yomi yomi is offline
Registered User
 
 
Join Date: Aug 2003
Posts: 32
Hi, here is my client's code.
It runs correctly in Linux(On the same machine with server). But throw Exception on windows when excute to "GameSessionPrx base = GameSessionPrx::checkedCast(session);"

here is the output information

[ Network: tcp connection established
local address = 172.16.65.182:4378
remote address = 172.16.65.192:3700 ]
[ Network: tcp connection established
local address = 172.16.65.182:4381
remote address = 172.16.65.192:3710 ]
.\Network.cpp:489: Ice::ConnectFailedException:
connect failed: WSAECONNREFUSED


code start: most of them copy from demo/glacier/session
=============================================
void CContactor::Starter()
{
try
{
int argc = 0;
char** argv = 0;
Ice::PropertiesPtr properties = Ice::createProperties(argc, argv);
properties->load("client-session-config");
_communicator = Ice::initializeWithProperties(argc, argv, properties);
_status = staterrun(0, 0, _communicator);
}
catch(const Ice::Exception& ex)
{
cerr << ex << endl;
}
catch(...)
{
cerr<<"unknow error " << endl;
}
}

int CContactor::staterrun(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
Ice::PropertiesPtr properties = communicator->getProperties();
const char* glacierStarterEndpintsProperty = "Glacier.Starter.Endpoints";
string glacierStarterEndpoints = properties->getProperty(glacierStarterEndpintsProperty);
assert(!glacierStarterEndpoints.empty());
Ice::ObjectPrx starterBase =
communicator->stringToProxy("Glacier/starter:" + glacierStarterEndpoints);
Glacier::StarterPrx stater = Glacier::StarterPrx::checkedCast(starterBase);

if (!stater)
{
cerr << "endpoints " << glacierStarterEndpoints
<< "do not refer to a glacier router starter" << endl;
}

Ice::ByteSeq privateKey;
Ice::ByteSeq publicKey;
Ice::ByteSeq routerCert;

try
{
_router = stater->startRouter(_Id, _Pwd, privateKey, publicKey, routerCert);
}
catch(const Glacier::CannotStartRouterException& ex)
{
cerr << ":" << ex << ":\n" << ex.reason << endl;
}
catch(const Glacier::PermissionDeniedException&)
{
cout << "password invalid, login permision denied" << endl;
}

Ice::PluginManagerPtr pluginManager = communicator->getPluginManager();
Ice::PluginPtr plugin = pluginManager->getPlugin("IceSSL");
IceSSL::PluginPtr sslPlugin = IceSSL::PluginPtr::dynamicCast(plugin);
assert(sslPlugin);

sslPlugin->configure(IceSSL::Client);
sslPlugin->addTrustedCertificate(IceSSL::Client, routerCert);
sslPlugin->setCertificateVerifier(IceSSL::Client, sslPlugin->getSingleCertVerifier(routerCert));

sslPlugin->setRSAKeys(IceSSL::Client, privateKey, publicKey);

communicator->setDefaultRouter(_router);

Glacier::SessionPrx session = _router->createSession();
GameSessionPrx base = GameSessionPrx::checkedCast(session);

_session =
GameSessionPrx::checkedCast(base->ice_twoway()->ice_timeout(-1)->ice_secure(false));


if (!_session)
{
cerr << "invalid object reference" << endl;
return EXIT_FAILURE;
}
return 0;
}

=============================================

client configure
=============================================
Ice.Warn.Connections=1
Ice.Trace.Network=1
#Ice.Trace.Protocol=1

Ice.Plugin.IceSSL=IceSSL:create
IceSSL.Client.CertPath=D:/Ice-1.3.0/certs
IceSSL.Client.Config=sslconfig.xml
IceSSL.Server.CertPath=D:/Ice-1.3.0/certs
IceSSL.Server.Config=sslconfig.xml
#IceSSL.Trace.Security=1

Glacier.Starter.Endpoints=tcp -h 172.16.65.192 -p 3700:ssl -h 172.16.65.192 -p 3701
Glacier.Starter.PropertiesOverride=Ice.ServerIdleT ime=60
Reply With Quote
  #4 (permalink)  
Old 04-22-2004
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Does the Glacier/session demo work correctly for you on Windows? If so, I suggest you compare your configuration settings against those from the demo to see if there are any significant differences that might explain the failure.

If the Glacier/session demo does not work correctly, please provide the console output from the client, starter and server.

Thanks,
- Mark
Reply With Quote
  #5 (permalink)  
Old 04-23-2004
yomi yomi is offline
Registered User
 
 
Join Date: Aug 2003
Posts: 32
HelloSessionManager.Endpoints=tcp -p 10000:udp -p 10000:ssl -p 10001

Ice.Warn.Connections=1
Ice.Trace.Network=1
#Ice.Trace.Protocol=1

Glacier session demo also failed.

config
=======================================

Ice.Plugin.IceSSL=IceSSL:create
IceSSL.Client.CertPath=../../../certs
IceSSL.Client.Config=sslconfig.xml
IceSSL.Server.CertPath=../../../certs
IceSSL.Server.Config=sslconfig.xml
#IceSSL.Trace.Security=1

Glacier.Router.Endpoints=default
Glacier.Router.SessionManager=HelloSessionManager: tcp -h 172.16.65.192 -p 10000:ssl -h 172.16.65.192 -p 10001
Glacier.Router.Client.Endpoints=tcp:udp:ssl
Glacier.Router.Trace.Client=2
Glacier.Router.Trace.RoutingTable=1

Glacier.Starter.PermissionsVerifier=PermissionsVer ifier:tcp -h 172.16.65.192 -p 10000:ssl -h 172.16.65.192 -p 10001
Glacier.Starter.AddUserToAllowCategories=1
Glacier.Starter.Endpoints=tcp -h 172.16.65.192 -p 11000:ssl -h 172.16.65.192 -p 11001
Glacier.Starter.PropertiesOverride=Ice.ServerIdleT ime=60

======================================
Out put:

[ Network: tcp connection established
local address = 172.16.65.182:1424
remote address = 172.16.65.192:11000 ]
user id: yomi
password: yomi
client: Glacier::CannotStartRouterException:
got EOF from `glacierrouter'
[ Network: closing tcp connection
local address = 172.16.65.182:1424
remote address = 172.16.65.192:11000 ]


I change
Glacier.Router.Endpoints=tcp -h 172.16.65.192 -p 3700

out put:

[ Network: tcp connection established
local address = 172.16.65.182:1427
remote address = 172.16.65.192:11000 ]
user id: yomi
password: yomi
[ Network: tcp connection established
local address = 172.16.65.182:1430
remote address = 172.16.65.192:3700 ]
.\Network.cpp:489: Ice::ConnectFailedException:
connect failed: WSAECONNREFUSED
[ Network: closing tcp connection
local address = 172.16.65.182:1430
remote address = 172.16.65.192:3700 ]
[ Network: closing tcp connection
local address = 172.16.65.182:1427
remote address = 172.16.65.192:11000 ]


seems better. but still error.
I am wondered why there are 3 connections?
one is connection with starter.
the other is connection with router.
what is the third one?
Reply With Quote
  #6 (permalink)  
Old 04-23-2004
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Ok, I believe I know what's going wrong now. From the error message in your post ("got EOF from ..."), it's clear that you are running GlacierStarter on Linux. The demo's configuration file is written assuming that the client, server and GlacierStarter are all running on the same host. If you want to run GlacierStarter and the server on a different host from the client, then you must make sure that all your endpoints are using a host address that is accessible to the client.

The easiest way to do this without modifying the configuration file on Linux is to run the server and GlacierStarter with the option

--Ice.Default.Host=172.16.65.192

The only property you need to change in the client's configuration file is Glacier.Starter.Endpoints.

Let us know if you're still having trouble.

Take care,
- Mark
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Support for Windows XP x64 vermorel Help Center 2 12-07-2005 05:53 PM
Question about Glacier.Router.Client.Endpoints in Glacier! rc_hz Help Center 4 11-21-2004 11:22 PM
about glacier and router li.c++ Help Center 0 10-22-2004 06:16 AM
Glacier Filtering StuartA Help Center 9 05-04-2004 08:51 AM
Callback and Glacier Example? feline Help Center 5 03-22-2004 05:33 PM


All times are GMT -4. The time now is 10:57 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.