Page 1 of 1

Exception connecting to server

Posted: Wed Feb 25, 2009 4:11 pm
by smartbear
Can you take a look at this error? We're using the 4.1.4 Java client API release, and a customer is having problems using our integration to connect to his server. The client never appears to finish connecting, and gets these exceptions:

2/25/2009 1:25:52 PM <crypto>: Failed encryption. [System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: dstOffset
at system.Buffer.BlockCopy(Buffer.java:51)
at Mono.Security.Cryptography.PKCS1.I2OSP(Unknown Source)
at Mono.Security.Cryptography.PKCS1.Encrypt_v15(Unknown Source)
at system.Security.Cryptography.RSAPKCS1KeyExchangeFormatter.CreateKeyExchange(Unknown Source)
at system.Security.Cryptography.RSACryptoServiceProvider.Encrypt(Unknown Source)
at VaultLib.VaultUserCrypt.EncryptPassword(Unknown Source)
at VaultClientNetLib.VaultConnection.Login(Unknown Source)

I've attached the Vault client API log file.

Thanks,
Eric

Re: Exception connecting to server

Posted: Thu Feb 26, 2009 9:09 am
by jeremy_sg
Eric,

I don't see the log file. Could you have the user check his Event Viewer to see if anything is logged there? I've never seen this error before, for what that's worth. Can the user have another person log on on his machine with their Vault credentials? Can he log on with the Java CLC from another computer?

Re: Exception connecting to server

Posted: Thu Feb 26, 2009 1:56 pm
by smartbear
Oops. Got a "The extension log is not allowed" error attaching that file. Here it is. I'll check with the user about vault.exe

Re: Exception connecting to server

Posted: Thu Feb 26, 2009 2:07 pm
by jeremy_sg
I see the issue more clearly now. The Java crypto API is unreliable for some unknown reason. We get these exceptions and log the fact that we got them, and then try to encrypt the string again. You can see the log message: 2/25/2009 "<crypto>: Took N tries to encrypt the password" in the log file. This message is logged when the string is finally encrypted. I can also see from the log that it did get connected (At least it called the server to ask for an updated tree structure at 1:21:15). The only true error I see in the log file is: "UnknownHostException" at 1:24:20.