Thursday, 29 November 2012

Manual removal of domain in Plesk 9.X

I have had issues today removing a domain from Plesk 9. Web administration panel kept on coming back with "Delete successful" however the domain was still there. It seems that someone has removed files and IIS records without actually removing anything from Plesk records. This caused some dirty records and issues that web front wasn't showing.

After some research I managed to find some good old command prompt tools inside
%plesk dir%\bin
%plesk dir%\admin\bin

1. Command line returned following error. (At least it returned some error rather than just saying it was successful).
An error occured during domain removal: Unable to remove domains: Unable to remove hosting: Unable to delete logrotate config: logrot_mng failed: Execute websrvmng --update-log-rotation "--vhost-name=[name_of_domain]" failed: Site [name_of_domain] doesn't exist.

2. I have then changed directory to admin/bin and ran following command
websrvmng.exe --reconfigure-vhost --vhost-name=[name_of_domain]

3. Remove domain.
domain.exe -r [name_of_domain]

This fixed my problem and left our Plesk server nice and clean.

Thursday, 22 November 2012

IE (Internet Explorer) 9 Crashing when loading a page

Issue

I have been assigned a critical issue one of our customers had with their site. Every time they loaded certain page IE9 would crash without giving any reason as to why. (Used Windows 7 in all cases)
Faulting application name: iexplore.exe, version: 9.0.8112.16455, time stamp: 0x507284ba
Faulting module name: MSHTML.dll, version: 9.0.8112.16455, time stamp: 0x50728e5d
Exception code: 0xc0000005
Fault offset: 0x003a2478
Faulting process id: 0x518
Faulting application start time: 0x01cdc928fdf2a877
Faulting application path: C:\Program Files (x86)\Internet Explorer\iexplore.exe
Faulting module path: C:\Windows\system32\MSHTML.dll
Report Id: 455b7416-351c-11e2-828f-000c29ad02c9
I have used Google Problem resolving technique however I was not able to find any info as to why IE9 would just crash. I couldn't replicate the issue on my machine, yet my project manager's machine crashed every time.
It turned out that it only happens on version of IE 9 (9.0.8112.16455) which as of 2012-11-23 seems to be the latest. Previous version (which I ran on my local weren't affected by this problem.

Investigation

IE would just crash with no apparent reason (one of those "Internet Explorer needs to be closed"). Event Viewer showed me error showed above.

Next step was to get "Fiddler" to see if there is any miscalculation in HTTP header or some incorrect syntax that IE was sensitve to. Nothing...

I have then decided to put some break points and actually load data one bit at the time (our site consist of many AJAX queries) shortly after I have pin pointed the cause to one particular load.

Problem was caused by an iframe that was loading some content (to be displayed in tabs - not sure if this is related). I have changed URL of that iframe and it fixed the problem. So the final step was really to find out why the content the page caused IE to crash (even though if you load page in separate tab in IE it worked fine).

Solution

Problem turned out to be page that was loaded externally in the iframe. Page was pretty much Terms and Condition sort of page (full of <li> tags). Page had a lot of list nesting <ul> into <ol> and vice versa. Restructuring the page into DIVs and single lists fixed the problem. 

I'm still confused as to why IE9 and only that particular sub version would crash on something so simple. I expected JavaScript as we use many different frameworks etc but No simple list. Huh?