Home Help Center

Ice::ProtocolException with Glacier2 and SSL

jmsanchezjmsanchez Member Jose Manuel Sanchez Matamoros PerezOrganization: ZennioProject: home automation system remote controller
Hi,

I have a system where many PCs connect to a server. This server is running a Glacier2 router and the communication is secured using SSL. All the client PCs are identical, same hardware running the same software.

In some of the PCs I have the following problem: when they try to get the Glacier2 router, a ProtocolException is thrown:
Ice::CommunicatorPtr ic;

[...]

Ice::RouterPrx defaultRouter = ic->getDefaultRouter();

try{
  Glacier2::RouterPrx router = Glacier2::RouterPrx::checkedCast(defaultRouter);
  [...]
}catch(const Ice::LocalException &le){
  // Exception handler
}

[...] 

The exception is thrown when the checkedCast() is executed. As I said before, the exception is a ProtocolException, and when the "reason" is printed, I get the following message:
Reason: SSL error ocurred for new outgoing connection: remote address = XXX.XXX.XXX.XXX:XXXX

The client configuration file is the following:
Ice.Default.Router=Glacier2/router:ssl -h myaddress.com -p 4063

Ice.ACM.Client=0
Ice.RetryIntervals=-1
Ice.Default.EncodingVersion=1.0

Announce.Server=Announce -t:ssl -h myaddress.com -p 8008

Ice.ThreadPool.Server.Size=10
Ice.ThreadPool.Client.Size=10

Ice.Plugin.IceSSL=IceSSL:createIceSSL
IceSSL.DefaultDir=certs
IceSSL.CertAuthFile=ca_cert.pem
IceSSL.CertFile=cert.pem
IceSSL.KeyFile=key.pem

The configuratioin file of the glacier2router program running in the server is the following:
Glacier2.Client.Endpoints=ssl -p 4063:tcp -p 4064
Glacier2.Server.Endpoints=ssl:tcp
Glacier2.SessionTimeout=60
Glacier2.PermissionsVerifier=Glacier2/NullPermissionsVerifier
Ice.Default.CollocationOptimized=0

Ice.Plugin.IceSSL=IceSSL:createIceSSL
IceSSL.DefaultDir=certs
IceSSL.CertAuthFile=ca_cert.pem
IceSSL.CertFile=glacier2_cert.pem
IceSSL.KeyFile=glacier2_key.pem

If I disable the SSL communication in the client PC and it connect to the server using TCP, the communication works properly.

Do you have any idea where my problem could be? Why this is working in some PC and fails in others?

Thank you in advance

Comments

  • jmsanchezjmsanchez Member Jose Manuel Sanchez Matamoros PerezOrganization: ZennioProject: home automation system remote controller
    Ok, I think I found the problem: the date of the client PC. If the date is not properly set, then the SSL certificates are not valid.
Sign In or Register to comment.