Old:Bugs 3.5-Apollo: Apanel not displayed: Difference between revisions
(New page: {{Uc nav 3.5 bugs}} '''''Server_Start.bat''''' == Bug fix Apanel initial display == File: '''Server_Start.bat'''<br> Location: '''*\Uniform Server''' '''Problem:''' In certain situations...) |
m (BobS moved page Bugs 3.5-Apollo: Apanel not displayed to Old:Bugs 3.5-Apollo: Apanel not displayed without leaving a redirect) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
'''''Server_Start.bat''''' | '''''Server_Start.bat''''' | ||
== Bug fix Apanel initial display == | == Bug fix: Apanel initial display == | ||
File: '''Server_Start.bat'''<br> | File: '''Server_Start.bat'''<br> | ||
Location: '''*\Uniform Server''' | Location: '''*\Uniform Server''' | ||
Line 8: | Line 8: | ||
'''Problem:''' In certain situations Apanel is requested before Apache is running resulting in browser error message "Failed to connect" | '''Problem:''' In certain situations Apanel is requested before Apache is running resulting in browser error message "Failed to connect" | ||
'''Solution:''' Before requesting the Apanel page wait for Apache to start using a delay loop . | '''Solution:''' Before requesting the Apanel page, wait for Apache to start using a delay loop. | ||
In the past I have proposed using ping to introduce a delay however this fails if the IP address used is in use. | In the past I have proposed using ping to introduce a delay, however this fails if the IP address used is in use. | ||
An elegant solution is now possible using the delay taken from the mini-servers series. | An elegant solution is now possible using the delay taken from the mini-servers series. It's a small C-program, fully documented and including source code hence officially open source. | ||
== Implementation == | == Implementation == | ||
Line 19: | Line 19: | ||
Copy file '''unidelay.exe''' to folder '''udrive\home\admin\program''' | Copy file '''unidelay.exe''' to folder '''udrive\home\admin\program''' | ||
Edit Server_Start.bat add the following block of code just above line '''start %apanel%\redirect.html''' | Edit Server_Start.bat and add the following block of code just above line '''start %apanel%\redirect.html''' | ||
<pre> | <pre> | ||
Line 44: | Line 44: | ||
</pre> | </pre> | ||
Script first resets the safety loop counter; this is incremented each time around the loop. On reaching a count of 60 (approx 60 seconds) it is assumed Apache is never going to start | Script first resets the safety loop counter; this is incremented each time around the loop. On reaching a count of 60 (approx 60 seconds) it is assumed Apache is never going to start. Script transfers control to the TIMEDOUT section killing virtual drive created and informs user. The Apache process is checked every second (unidelay.exe with no parameters defaults to 1 second) if errorlevel returned is 1, loop is repeated (:next). A zero value confirms Apache is running; script exits loop and runs next line of code (Starts Apanel). | ||
== Download == | == Download == | ||
Line 60: | Line 60: | ||
== Proposed solution == | == Proposed solution == | ||
See above. | See above. | ||
---- | ---- | ||
Line 69: | Line 67: | ||
|} | |} | ||
[[Category: | [[Category: Archive]] | ||
Latest revision as of 12:30, 21 June 2013
Uniform Server 3.5-Apollo known bugs or issues. |
Server_Start.bat
Bug fix: Apanel initial display
File: Server_Start.bat
Location: *\Uniform Server
Problem: In certain situations Apanel is requested before Apache is running resulting in browser error message "Failed to connect"
Solution: Before requesting the Apanel page, wait for Apache to start using a delay loop.
In the past I have proposed using ping to introduce a delay, however this fails if the IP address used is in use.
An elegant solution is now possible using the delay taken from the mini-servers series. It's a small C-program, fully documented and including source code hence officially open source.
Implementation
Copy file unidelay.exe to folder udrive\home\admin\program
Edit Server_Start.bat and add the following block of code just above line start %apanel%\redirect.html
rem ### Before starting Apanel wait for Apache to start rem ### Safety loop counter cnt give up after 60 seconds echo starting Apache ............... set /a cnt=0 :next set /a cnt+=1 if "%cnt%"=="60" goto :TIMEDOUT \home\admin\program\unidelay.exe \home\admin\program\pskill.exe apache.exe > nul IF ERRORLEVEL 1 goto :next
Add the following block of code just above line :HINT
:TIMEDOUT rem ### Apache failed to start. Kill virtual drive. Inform user subst %Disk%: /D CLS echo Unable to start Apache Server goto :PAUSE
Script first resets the safety loop counter; this is incremented each time around the loop. On reaching a count of 60 (approx 60 seconds) it is assumed Apache is never going to start. Script transfers control to the TIMEDOUT section killing virtual drive created and informs user. The Apache process is checked every second (unidelay.exe with no parameters defaults to 1 second) if errorlevel returned is 1, loop is repeated (:next). A zero value confirms Apache is running; script exits loop and runs next line of code (Starts Apanel).
Download
Download program unidelay.exe note this is included in the combined bug fix download.
MD5 = f9183635b0b23b212ab20e679d5c348e
Reference
Additional information or background can be found on the following pages:
Mini Servers: Start Stop design notes
Proposed solution
See above.
Ric |