Sudden server errorr: "A connection attempt failed..."

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/22/2012 9:25:12 AM
Gravatar
Total Posts 11

Sudden server errorr: "A connection attempt failed..."

Yesterday I were happily editing a website based on mojoPortal (in the afternoon). I had one page opened for editing in IE 9 and the same page opened for viewing in FireFox 11.

I then went for a meeting letting both browsers stay open and returned after about 6 hours. When trying to edit the page in IE 9 I got the error page.

I have changed nothing on the host (a webhost solution, where I have several mojoPortal solutions running). I just checked one of the other websites I run there and it showed an error too (older version of mojoPortal, so slightly different error message from the mojoPortal solution). A third website at the same webhost works it seems.

I have sometimes experienced very short downtime periods at this webhost in the middle of the night. A few seconds. I suppose it means they do a restart of hardware or the web server software. So I gave up last night and waited until today before I tried again. Same result.

I then set customErrors mode="Off"  as I couldn't find any log file FTP'ing to the site. And got the following error:

Server Error in '/' Application.

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: [SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond] System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +6132200 System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +134[IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.] System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +300 MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count) +55[TimeoutException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond] mojoPortal.Web.WebTaskManager.StartOrResumeTasks(Boolean appWasRestarted) +336 mojoPortal.Web.Global.StartOrResumeTasks() +427 mojoPortal.Web.Global.Application_Start(Object sender, EventArgs e) +216

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

The question is - what do I do to solve this?

Is it a problem at webhost? In that case I suppose I have to ask them to reset "something". But what? As the problem also shows up on some of the other mojoPortal based websites I have at same host (but not all!) it could be webhost of course.

Lars

3/22/2012 9:34:36 AM
Gravatar
Total Posts 18439

Re: Sudden server errorr: "A connection attempt failed..."

Hi Lars,

Are you using the AppKeepAlive?

If so I would disable that and instead use one of the services listed at the bottom of the AppKeepAlive article.

I'm just guessing that the AppKeepAlive which is trying to make web requests is the source of the netwroks socket error if it can't connect. The error stack trace doesn't make it very clear.

Hope that helps,

Joe

3/22/2012 3:52:08 PM
Gravatar
Total Posts 11

Re: Sudden server errorr: "A connection attempt failed..."

Hi Joe,

It seems I have set it to true in on this website. But there's other websites, that won't show up and give same error. And those websites have it set to false.

I am getting more and more convinced it must be the server at webhost. I will write them now. I just couldn't before I was more sure it wasn't something connected to the use of mojoPortal.

I have looked through all the mojoPortal based solutions I have placed at that Web-host. And out of 10, 5 is not working and have this error. Only the one where I realised I had a problem have the AppKeepAlive set to true.

Thanks for the help until now.

Lars

3/22/2012 9:07:08 PM
Gravatar
Total Posts 11

Re: Sudden server errorr: "A connection attempt failed..."

Connecting webhost didn't help much.

My contact there answered something about the message could mean it tried to pick up something external like a feed. And that they have blocked cross scripting so it can't work. I doubt that he really have an idea what could be wrong Frown But I know he's more a php and Linux guy and that .NET is a bit obscure to him. It was perhaps a stab in the dark.

So the question is, how do I diagnose this error better, so I can find the cause?

Lars

3/23/2012 10:33:02 AM
Gravatar
Total Posts 11

Re: Sudden server errorr: "A connection attempt failed..."

Dear Joe,

OK - now I got the webhost admin to restart the server.

He did that this morning, but I didn't get back until 1 hour ago from a customer visit.

First try after I read his e-mail: no luck

But then 5 minutes later, I decided to check out all the websites on same host that didn't work this morning. And then i found that some the first 3 i tried did work. So I went back to the first one I had problems with - and now - only 5 minutes later - they all work.

So I believe it was a server problem. But I have made a "note to self" about the Keep Alive thing. I will check all websites and set it to false and then consider another solution on those websites, where the traffic is very low (all the new ones).

Thanks for your help!

Lars

You must sign in to post in the forums. This thread is closed to new posts.