Jump to content

MBC can't connect to the Server


heula
 Share

Recommended Posts

I see in my log that a Wake on Lan request is send to my server when I open MBC.

2013-11-14 11:34:52.8407,Debug,,Attempting to wake server at address 54-04-A6-B4-8E-68,1,Application
2013-11-14 11:34:52.8507,Debug,,Wake command sent,1,Application
2013-11-14 11:34:52.8907,Debug,,=========System looking for assembly: Newtonsoft.Json,, Version=4.5.0.0,, Culture=neutral,, PublicKeyToken=30ad4fe6b2a6aeed,1,Application

Still I get this error. Shouldn't MBC have a delay on giving this error so the server does get the time to get active?

 

MBC%20can%27t%20connect..jpg

Link to comment
Share on other sites

There is no way for me to know if the server was awake or not at the time and I don't want to arbitrarily delay the start-up.  So, the WOL functionality will probably only work if the server was just asleep as opposed to truly off.

Link to comment
Share on other sites

There is no way for me to know if the server was awake or not at the time and I don't want to arbitrarily delay the start-up.  So, the WOL functionality will probably only work if the server was just asleep as opposed to truly off.

I understand that but if MBC gives a wol command why does it throw this error. When the server is in sleep mode it takes some time to fully awake so MBC can connect to it. Since the WOL command has been given the server shall always be available at some point so maybe MBC should just wait for that instead of throwing the error?

Link to comment
Share on other sites

Just because we send the WOL command is by no means a guarantee that the machine is there, will wake or that the server will be available.

 

My server does wake in time but it is a pretty fast box.  I'm sure this can be improved but I don't want to slow down the 99% case for the 1% case.  Like everything else this implementation is incremental.  As time and testing allows, it may be improved down the line.

Link to comment
Share on other sites

Just because we send the WOL command is by no means a guarantee that the machine is there, will wake or that the server will be available.

 

My server does wake in time but it is a pretty fast box.  I'm sure this can be improved but I don't want to slow down the 99% case for the 1% case.  Like everything else this implementation is incremental.  As time and testing allows, it may be improved down the line.

I understand. I was just wondering why the error came when a WOL command was send.

Link to comment
Share on other sites

I send the command at the first opportunity regardless because there isn't any way for me to know whether the server is awake or not other than querying it and that will entail a time-out of some length.

 

So, at the very start of the app, I just go ahead and send the command to wake up the last server to which you were connected in case it is asleep.  In my environment this is enough time but I'm sure it won't be in all.

 

I'm also sure I can improve it as I get the chance.

  • Like 1
Link to comment
Share on other sites

mboehler

@@ebr, can you maybe add a user select-able wait timer for instances such as this?  For example, my server is always on, so I would just disable the timer.  But @@heula may need to set the wait timer for 10 or even 30 seconds to give his server time to wake up.

Link to comment
Share on other sites

@@ebr, can you maybe add a user select-able wait timer for instances such as this?  For example, my server is always on, so I would just disable the timer.  But @@heula may need to set the wait timer for 10 or even 30 seconds to give his server time to wake up.

Yes but perhaps it can activate that timer if the server is not available wthin 10 seconds?

Most of the time my server is on but once in a while it went off after a long period of non activity.

Link to comment
Share on other sites

Before MBC introduced WOL, I was using a batch file that first tested to see it the server was on line/awake (simple IP ping), if yes start MBC, if no, send WOL and continue testing for a response, when yes start MBC. Perhaps you could implement something like that, then everyone would be happy :)

Edited by jordy
Link to comment
Share on other sites

Before MBC introduced WOL, I was using a batch file that first tested to see it the server was on line/awake (simple IP ping), if yes start MBC, if no, send WOL and continue testing for a response, when yes start MBC. Perhaps you could implement something like that, then everyone would be happy :)

 

As I said before, the routines that make this connection are in a part of the program that has no knowledge of an interface.  If I did what you described, there could be no feedback for the user and no ability to cancel it.  If the server were truly down, you would be stuck for some potentially long (or indefinite) period of time.

 

So, again, it is obviously possible to make this happen and I do know how to do it.  But, it is not a simple task so it simply has to wait a bit.

Link to comment
Share on other sites

As I said before, the routines that make this connection are in a part of the program that has no knowledge of an interface.  If I did what you described, there could be no feedback for the user and no ability to cancel it.  If the server were truly down, you would be stuck for some potentially long (or indefinite) period of time.

 

So, again, it is obviously possible to make this happen and I do know how to do it.  But, it is not a simple task so it simply has to wait a bit.

oK thanks. In your own time...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...