Thursday, 21 May 2015

A Volume Shadow Copy Service operation failed. Detailed error: The volume shadow copy operation failed with error code 0x800423f0

Windows Small Business Server 2011 randomly started to fail backups.

Backup console shows the following error:
A Volume Shadow Copy Service operation failed. Detailed error: The volume shadow copy operation failed with error code 0x800423f0

First things first, run a "vssadmin list writers" from a elevated command prompt. Output shows this to the be the faulty writer:

Writer name: 'SPSearch4 VSS Writer'
Writer Id: {35500004-0201-0000-0000-000000000000}
Writer Instance Id: {2f53b890-9998-4a18-8859-a5b70b3a56a3}
State: [8] Failed
Last error: Inconsistent shadow copy

This is usually a sign that Sharepoint needs updating (guide here) but upon running the "(get-spserver $env:computername).NeedsUpgrade" in the sharepoint shell I relieve:

(get-spserver $env:computername).NeedsUpgrade 

False

OK, not a sharepoint upgrade then! 

I check the services - all are running. For good measure I restart all the sharepoint services one at a time:

SharePoint 2010 Administration
SharePoint 2010 Timer
SharePoint 2010 Tracing
SharePoint 2010 VSS Writer (this is probably the only one that needed restarting)
SharePoint Foundation Search V4

I also restart the sharepoint SQL service
SQL Server (SHAREPOINT)

Re-run the backup job and voila - working.

A server reboot would probably have done the same.. but my clients don't like reboots during working hours

Thursday, 14 May 2015

Windows 8.1 not connecting to domain controller on login

I had a interesting problem recently where a Windows 8 laptop connected to a domain over wireless would login, but then not load the profile as it couldn't authenticate with the domain controller. It would instead, pop up with a username and password box, which if you entered the users details again would sometimes connect and work and other times not.

Very strange, as the system was connected to the wireless without issue and I could ping the server and do everything would expect.

On close examination, i discovered that the wireless network had manged to get itself changed from a "domain" category to a "private".

In the network and sharing center I was unable to change it from a public back to domain so I resorted to using the registry.

The keys are located in:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

Each folder in the profile key is a different connection - click on them and look for the one called "Category".

The category field defines the connection type:

0 = public
1 = private
2 = domain

I changed it back to a 2 and reboot the laptop - and everything started working again. This solved the problem for 2 days, whereupon the connected then changed to a private network and the same issue occurred again.

This time, i used the wireless network list to forget the network totally and then reconnect from scratch. The system picked it up as a domain connect immediately and this seems to have solved the problem since.

A new one on me :)

Update:
the problem came back! And on further investigation I discovered that the client had managed to re-enable DHCP on their router (instead of their server). This was causing the laptop to automatically go into "public" profile mode. Disabled DHCP on the router and the issue went away. Guess I should have looked at the problem in more detail

Thursday, 30 April 2015

Wordpress Nimbus Business Theme not displaying Page Content or excerpt under the featured pages

I've recently been using a different set of Wordpress Themes and one that I quite like it by Nimbus. (http://www.nimbusthemes.com/free/business/)

Sadly, the theme doesn't actually work out of the bag - and it seems to be down to shoddy coding (sorry guys, I even found the post you made on the wordpress site to have it featured and even they told you it wasn't working!)

It seems to be because when they load page content, it doesn't check if there's anything and then continue to load.

To fix, do the following:

1: Navigate to the following file:
themes\business-theme\page.php

Find the following line:

<?php the_content(); ?>

Delete the whole line and replace with:

 <?php if (have_posts()) : while (have_posts()) : the_post();
the_content();
endwhile; endif; ?>

And that should fix it

The excerpt bug seems to be something to do with a function called "chop_text" which doesn't seem to work properly. Rather than debugging why, I changed it to the built in wordpress function - wp_trim_words (why did they bother remaking it?)

Load the following page:

themes\business-theme\parts\frontpage-4boxes.php

Delete this:

 if (is_home()) {
            $content = chop_string(get_post_field( 'post_content', get_option( 'page_for_posts' ) ));
        } else {
            $content = chop_string($post->post_content);
        }

Replace with:

 if (is_home()) {
            $content = chop_string(get_post_field( 'post_content', get_option( 'page_for_posts' ) ));
        } else {
            $content = chop_string($post->post_content);
        }

Problem solved

considering this is the free demo it doesn't bode well.

But then it is a nice theme :) A very specific set of fixes but perhaps it will help someone - remember to +1 me if it does!

Friday, 10 April 2015

Slow HP Envy Laptop - High spec but very slow/sluggish performance

I've had a few clients come to me with HP Envy laptops that they have purchased in the past - and I started to realize that they were all complaining about the same thing: performance

The laptops themselves are pretty good specs - Intel i5/i7 8GB RAM and even a GT740M graphics card. CPU and memory usage looks good, but just using it for average tasks eventually slows it down to a crawl.

What gives? These are good laptops - certainly not cheap entry level units

Simple answer - the HDDs in them suck. 

All the laptops that had these problem had one thing a common : a HGST 1TB 5400RPM disk

I have to wonder why HP are selling such laptops with a low spec drive? The easy solution was to replace the drive with an SSD. Thankfully, replacing the drive in these units is very easy - you only need to remove a single screw.

Perhaps quite obvious, but you wouldn't expect a laptop of this level to come with a drive such as this. 

Below - one of the offending drives!



Wednesday, 8 April 2015

Help for setting up a btnet leased line with a Cisco 2921 and FSP150CP

I recently helped a client who had a btnet leased line installed - BT turned up to the property, installed a Cisco 2921 router connected to a FSP150CP showed the client it was working with their laptop and promptly left with a few notes as to IP address and mask.

The client was a little confused to say the least! I was asked to help - and many other people may find themselves in a similar situation.

Firstly, you will need a few things:

  • IPv4 Network Address (You should have been sent this in advance, if not ask the engineer installing)
  • IPv4 Network Mask (same as above)
  • Something to take care of NAT and act as a firewall (we used a Draytek Vigor 2830)
To work out your range of external IPs, you can use your network address and mask with a subnet calculator (such as http://www.subnet-calculator.com/)

The following has been created using the following IP addresses - you will need to enter your own instead for this to work! Be sure to change them and use the subnet calculator above if you need your entire range.

If our Network address is: 81.14.198.192 and our mask is 255.255.255.248 then our range is: 81.14.198.193 - 81.14.198.198 (to work this out, enter the address and select the mask on the calculator - the bottom then gives you the range)

In this instance, BT put their Gateway device on 81.14.198.193 (the first available IP from the available range) therefore you have 194 to 198 as external IP addresses to use.

So how do you get your kit working?

Get your firewall/router and plug a cable from the GE 0/1 port on the Cisco into the "WAN" port on your router. Ensure that this is a WAN port that takes a network cable and not a telephone one, as this is for ADSL or VDSL.

Now login to your own router, and set it a static IP address for Internet Access. The routers IP can be any of the addresses from 81.14.198.194 to 81.14.198.198. Enter the subnet address as: 255.255.255.248 and the Gateway address as 81.14.198.193.

And that should be it - there are a lot more things that can be done but these are the basics to get things working.

I hope it helps someone


On a more personal note, I did all of the above correctly for my latest setup of this equipment but couldn't get any data to move in or out of the router. Long story short, BT managed to assign the gateway device (The Cisco) with the range IP instead of the first available IP address! After a few calls to BT it was sorted and everything magically started working.

Tuesday, 17 March 2015

How to E-Mail backup notifications for Windows Backup

I love SBS - but we occasionally get a server that doesn't use it but we will still want to use Windows Backup. I hate not having reports, therefore we came up with the following alternative for emailing backup success events:

It utilities a third party mail sending tool which you can specify remote email servers and authentication parameters 

http://caspian.dotconf.net/menu/Software/SendEmail/
http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v156.zip

1: Setup your backup job and successfully run it at least once
2: Go to your event viewer and then "application and services logs"
3: Enter the "Microsoft" folder and then "Windows", "Backup" and select "Operational"
4: Find the successful backup log (It should have an event ID of 4) and then right click on it and select "Attach a task to this event"
5: Name the event (I leave it as the default name) and click "Next"
6: Because we're tying the task to an event the information will already by filled in for the second section, so click "next" again
7: On the action page, select "Start a program" and click "Next"
8: Extract the Send Email application at the top of this post to somewhere on the server and then browse to it and select it as the program to launch.
9: In the "Add Arguments" box enter the following details:
-f fromaddress@somewhere.co.uk -t toaddress@somewhereelse.co.uk -u FromName -m EmailSubject -s your.mailserver.co.uk -xu mailserveruser -xp mailserverpassword

Be sure to change the above for real values, a breakdown of the options are:

-f from address
-t to address
-u from name
-m email subject
-s mailserver
-xu mailserver username
-xp mailserver password

10: Click "Next" and then "Finish"

Your event task is now created - if you go to the task scheduler and select "Event Viewer Tasks" you should able to see it in there and even run it to check it works.

Works a treat - kudos to SendEmail team for lightweight app

Thursday, 12 March 2015

Restoring a Windows Backup to a 2008 or Vista Virtual Machine when you can't use SCSI drivers. USB drive wouldn't offline

A local company had an unfortunate incident with their buildings power supply which managed to blow up their server. We had a good Windows Backup of it (2008 SBS) however the USB drive seemed a little iffy.

To get them back online ASAP we decided to restore the backup onto the replacement server as a virtual machine - they already had a spare 2008 R2 licence so we used this as the host OS.

When it came to trying to restore the backup, the external USB drive wouldn't offline - which meant that we couldn't mount it as a virtual drive in the guest. To get around this, we ended up cloning the USB drive to a VHD and then mounting this instead.

All good, except I then discovered that 2008 cannot mount the SCSI drive from the installation area. A lot of digging later I was still with a solution and running out of time.

Eventually, I hit upon the idea of doing it over the network instead (why it didn't come to me sooner I don't know!). So I removed the Virtual Network Adapted, added a Legacy Network Adapter so the guest installer could use it and then shared the VHD on the host which was then access by the guest over the network and restored.

9 hours later (!) and just in time for the next day of trading of the company the restore completed and the server was good to go after a few driver tweaks here and there.

Next time this happens I'll remember to ignore the SCSI option for anything older than Windows 7/2008 R2 and just use a legacy network driver and restore over the network immediately.