Archived

This forum has been archived. Please start a new discussion on GitHub.

Glacier2 Config in code 2

Translat Config to code,but error when initialize communicator ?why?

config files
#
# The proxy to the Glacier2 router for all outgoing connections. This
# must match the value of Glacier2.Client.Endpoints in config.glacier2.
#
Ice.Default.Router=DemoGlacier2/router:ssl -p 4064 -h 192.168.0.75

#
# We don't need any endpoints for the client if we use a
# router. Incoming requests are received through connections
# established from the client to the router.
#
Callback.Client.Endpoints=

#
# This must match the value of Callback.Server.Endpoints in
# config.server.
#
CallbackSender.Proxy=callback:tcp -h 192.168.0.75 -p 10000

#
# No active connection management is permitted with Glacier2.
# Connections must remain established.
#
Ice.ACM.Client=0

#
# Connection retry is not possible with Glacier2. Connections must
# remain established.
#
Ice.RetryIntervals=-1

#
# Warn about connection exceptions
#
#Ice.Warn.Connections=1

#
# Network Tracing
#
# 0 = no network tracing
# 1 = trace connection establishment and closure
# 2 = like 1, but more detailed
# 3 = like 2, but also trace data transfer
#
#Ice.Trace.Network=1

#
# Protocol Tracing
#
# 0 = no protocol tracing
# 1 = trace protocol messages
#
#Ice.Trace.Protocol=1

#

# Security Tracing
#
# 0 = no security tracing
# 1 = trace messages
#
#IceSSL.Trace.Security=1

#
# SSL Configuration
#
Ice.Plugin.IceSSL=IceSSL:createIceSSL
IceSSL.DefaultDir=../../../certs
IceSSL.CertAuthFile=cacert.pem
IceSSL.CertFile=c_rsa1024_pub.pem
IceSSL.KeyFile=c_rsa1024_priv.pem
Ice::CommunicatorPtr communicator;
initData.properties = Ice::createProperties();
	
initData.properties->setProperty( "Ice.Default.Router","DemoGlacier/router:ssl -p 4064 -h 192.168.0.75");
initData.properties->setProperty
( "CallbackSender.Proxy","callback:tcp -h 192.168.0.75 -p 10000");

initData.properties->setProperty( "Ice.ACM.Client","0");
initData.properties->setProperty( "Ice.RetryIntervals","-1");
initData.properties->setProperty( "Ice.Plugin.IceSSL","IceSSL:createIceSSL");
initData.properties->setProperty( "IceSSL.DefaultDir","../../../certs");
initData.properties->setProperty( "IceSSL.CertAuthFile","cacert.pem");
initData.properties->setProperty( "IceSSL.CertFile","c_rsa1024_pub.pem");
initData.properties->setProperty( "IceSSL.KeyFile","c_rsa1024_priv.pem");

[COLOR="Red"]communicator = Ice::initialize(argc, 0, initData);[/COLOR]

Comments

  • May be i konw the reson

    When i change ssl-p 4064 -h 192.168.0.75 to tcp -p 4064 -h 192.168.0.75 it's work ,i think it's about ssl.
  • benoit
    benoit Rennes, France
    Hi,

    You should copy/paste the error if you want us to help you with this error.

    Cheers,
    Benoit.