Tuesday, 23 August 2011

ILM07 - Creating an SPN

OK - I won't go into how to get up password sync in ILM07 - there are plenty of documents out there. But here's an interesting error I got and took a couple of hours to work out.
I had successfully created an SPN against the account I was using to run MIIS. But try as I might, I couldn't create a PCNS link - I just got:
"The service principal name you specified could not be found..."
Anyway - it seems that PCNSCFG is fussy about its slashes. When you use the /S option you need to put a forward slash between the SPN name and machine, NOT A BACKSLASH!
Oh well!

Tuesday, 22 February 2011

ASP.NET - w3wp crash

It's very frustrating when a server component fails and gives you no information about why. Especially when the asp.net code that fails on the server works just fine on the visual studio 2010 development server.

In this case, I had a function that called itself recursively. It scanned and table and generated another table looking for the least cost of all possible combinations of the first table.

It turns out that IIS is really conservative about stack space it allocates to a thread, but then doesn't tell you if you exceed that (which is really each with a recursive function) - it just doesn't return anything. A useless entry is recorded in the event log.

Anyway, the solution is to run your recursive function in it's own thread using threading.thread

In the NEW method, you have an optional parameter, stacksize, and you can set it to whatever you want. In my case, I upped it to 5Mb for the function, and hey presto, it all works properly.

Thursday, 6 January 2011

Exhange 2007 to 2010 Upgrade - "Reboot Needed"

Over Christmas we upgraded our old Exchange 2007 server (in which the public folder store was playing up) to Exchange 2010 SP1.

We hit a number of problems with this, and this is what we had to do.
  • The old server would not upgrade directly to 2010 - it needed to have SP2 on it first
  • It would not install SP2 because it "needed a reboot" first - and kept saying so after multiple reboots (yes, that it pretty typical with MS stuff, I know)
  • None of the normal places in the registry that make you think some action is needed after a reboot were populated - so it was something very obscure
  • We created a new Exchange 2007SP2 server instead and migrated the mailboxes to it. Regular readers will know we use VMWare here, so that wasn't hard (although time consuming)
  • We then removed the old 2007 server from the exchange environment and destroyed it
  • Now we created a new 2010SP1 server and migrated the mailboxes to it
The "new" 2007 server is still in the infrastructure at the moment, but will eventually be removed and replaced with another 2010 server to create a cluster. That will probably have to wait to the next college holiday at Easter, though.

N

Outlook 2007 - View Attachments on Context Menu Fails after Exchange 2010 Upgrade

Over Christmas we upgraded our exchange system to 2010SP1 from 2007 (more about that in another post!)

As users returned following the new year, an obscure bug in Outlook became apparent which caused "View Attachments" on the context menu (right click) for email messages to disappear for external messages (but still work for internal ones).

Microsoft have released a hotfix, http://support.microsoft.com/kb/2276479, which solves this problem.

Thursday, 9 December 2010

Create a NFS mount point in ESX

If you need to mount an NFS (windows share) drive in ESX, do it as follows:
  • First you will have to open the firewall port in ESX by typing in theservice console “esxcfg-firewall -e smbClient”. This opens outbound TCPports 137 – 139 and 445.
  • Next make sure the Local Security Policy on the Windows Server youare going to map to has the following settings under Security options.If you do not do this you may get a “Stale NFS Handle” or “Permissiondenied” error when trying to mount.
    - Microsoft network client – digitally sign communications (always) – DISABLED
    - Microsoft network client – digitally sign communications (if server agrees) – DISABLED
    - Microsoft network server – digitally sign communications (always) – DISABLED
    - Microsoft network server – digitally sign communications (if server agrees) – DISABLED
  • Next type “cd /vmimages” and then “mkdir ISO”
  • Next type “mount -t smbfs -o username= //windows server/share/vmimages/ISO” you can also use a windows domain username by typing“username=,workgroup=”
    You will be prompted for a password for the user account you are using.
  • You can type “cd /vmimages/ISO” and do “ls” and you should see allyour files. You can now map your VM’s CD-ROM using the Datastore ISOfile device type and select the /vmimages/ISO folder.
  • If you no longer need this mount point you can un-mount it by typing “umount /vmimages/ISO”
  • To automatically have your ESX server mount this share when it restarts do the following:
    Edit /etc/fstab using Nano or Vi
    Add the following line to the bottom of the file: “//windowsserver/share /vmimages/ISO smbfs noauto,username=,password= 0 0”
    Edit /etc/rc.local using Nano or Vi
    Add the following line to the bottom of the file “mount –a”

Wednesday, 17 November 2010

SQL 2008 - Restrict Memory Use

Sometimes it seems like SQL is using far too much memory and making the server itself very unresponsive. This is because SQL is designed to grab as much physical memory as it can, and it's very slow to release it back if the system gets overloaded (if indeed it ever does - don't start me on that one!).

So on, say, an 8GB system, you really want to restrict SQL to only using say 6GB. Then we have plenty of headroom for the SQL console, ApexSQL log, backups and any other software you need.

To do this, execute the following SQL commands:
EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
EXEC sp_configure 'max server memory (MB)', 6000
RECONFIGURE WITH OVERRIDE

Monday, 15 November 2010

VMWare Server / Windows - Cannot Lock File

We tried to move a couple of WVWare VMs today to a new copy of VM Server (because the old hardware had failed). The server errored, telling us that it couldn't lock the (copied) files.

Solution: delete any .lck files/folders from the VM folder and it works!