Do not use on any
shared computer
August 21, 2008 05:42pm pdt
 
[x]
Attachment Details

IdHTTPServer, using SSL. Hanging situations.

Tags: Delphi, 2006/2007
We have an web server (indy: idHTTPServer).

We are using SSL with this server, with method "sslvSSLv23".

The problem is that if someone connects with only SSLv3 or SSLv2 we get the following error (OnException):
Error accepting connection with SSL.
error:00000005:lib(0):func(0):DH lib

In some occations - I suspect it is when the user have only SSLv3 checked the socket is not released. When enough sockets are "hanging" the webserver will be "blocked" and have to be restarted.

I have asked about this twice in borland.public.delphi.internet.winsock forum - but I do not get any response... But I hope there is some experts here that may help...

There is several ways to solve this I think.
1) To be able to release the socket manually.
2) Avoid the problem in the first place by enforcing that everyone have SSLv2 and SSLv3 enabled.
3) Solve the problem in Indy/openSSL.

We are using the snapshot from 1/4/2008 with the latest openSSL release.

I have tried various aproaches for 1):
AContext.Connection.Socket.Close; - no success...

AContext.Connection.Disconnect(true); - works sometimes, but sometimes I get:
Socket Error # 10054
Connection reset by peer.
These are the sockets that are hanging.

To me it seems like the socket is closed, but not properly...

Any suggestions???
Start your free trial to view this solution
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Question Stats
Zone: Programming
Question Asked By: Elisas
Solution Provided By: Elisas
Participating Experts: 1
Solution Grade: B
Views: 31
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by MaximKorobov
Expert Comment by MaximKorobov:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by Elisas
Author Comment by Elisas:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by Elisas
Author Comment by Elisas:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Accepted Solution by Elisas
Accepted Solution by Elisas:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by Elisas
Author Comment by Elisas:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Administrative Comment by modus_operandi
Administrative Comment by modus_operandi:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Administrative Comment by Vee_Mod
Administrative Comment by Vee_Mod:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Administrative Comment by Vee_Mod
Administrative Comment by Vee_Mod:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_2_20070628