Author Archives: JRevell

Microsoft Azure – Redis

Microsoft have implemented the open-sourced Redis key-cache and store in Azure.

Similar to have there are “Basic” and “Standard” levels of Virtual Machines, with associated redundancy, with Redis there are the same options available:

  • Basic – Single node
  • Standard – 2 node (in a primary/secondary setup), with built in replication and automatic failover

Redis Cache Azure Portal

Basic is ideal for development and non business critical (no SLA), whereas Standard is best for business critical systems (with a 99.9% SLA – 1 minute downtime per day)

Cache sizes range from 250mb through to 53GB. Prices range from £11 a month (250mb on Basic) to a huge £995 a month (53GB on Standard).

I’ve been using Redis on Azure for a good month or two now (started when it was in Preview before general release availability), speeds and reliability is impressive, with all requests taking less than 10ms. (only exception being GET * which returns all keys and takes about 50ms).

Redsmin

There are only a few changes which I would like to see:

  • Ability to manage via current management portal (only available on beta portal)
  • Ability to upgrade/downgrade packages on the fly (need to delete and recreate from scratch)
  • Improved statistics (although I currently use Redsmin)
  • Improved SLA for standard package

I thought about writing a guide, but Microsoft have a very good guide on their website about how to setup and use their Redis cache here: How to use Redis Cache in Azure

Server 2012 UNC Network Share One Way 0x80004005

Recently I’ve had a strange issue with Microsoft Azure. For some reason on some of the Virtual Machines could not access UNC network shares, throwing a 0x80004005 error. However strangely, worked the other way. The virtual machines run Server 2012 Datacentre edition.

For example:

From Machine A
Ping Machine B – Success
Access Network Share on Machine B – Success

From Machine B
Ping Machine A – Success
Access Network Share on Machine A – Fail

The following did not help with resolving the issue:

  • Removal and rejoin domain (rejoin failed)
  • Check Firewall Settings
  • Disable IP6
  • Delete network adapters

Following some work by Azure’s support team, it was identified that the issue is a bug in windows due to the way Azure handles the automatic scaling.

The automatic scaling feature in Microsoft Azure automatically boots and shuts down machines dependant on load on the cloud service. This allows cloud services and associated websites to benefit from extra processing power and memory when load is higher than expected.

Every time the virtual machine assigns the windows image to a new host machine, a new virtual network adapter is created, and various entries are added to the registry. SMB then picks up the details from the registry to resolve the UNC path on the network. Once a specific number is reached, SMB then fails to redirect the paths to the right address, causing this error.

Microsoft do not have a permanent fix, however the following script clears out the junk in the registry and leaves only the valid entries behind. Running this script fixed the issue after a reboot of the machine.

KB-269155

WordPress 4.0.1 Security Update

Today WordPress has released a security update, fixing several security holes plus 23 bugs.

These include:

  • Three cross-site scripting issues that a contributor or author could use to compromise a site.
  • A cross-site request forgery that could be used to trick a user into changing their password.
  • An issue that could lead to a denial of service when passwords are checked.
  • Additional protections for server-side request forgery attacks when WordPress makes HTTP requests.
  • An extremely unlikely hash collision could allow a user’s account to be compromised, that also required that they haven’t logged in since 2008.
  • WordPress now invalidates the links in a password reset email if the user remembers their password, logs in, and changes their email address.

It’s important to check your installs and install the latest update and install if required. Luckily most WordPress installs will automatically update using the built in auto-update script. Unfortunately the host I use does not support this (nor the automatic install via the dashboard), so I need to manually download the file, unzip and upload via FTP. A bit of a pain, but necessary.

For full details, view on the official website – WordPress 4.0.1

Or jump straight in – Download Latest Version of WordPress

.NET Framework and Visual Studio

Microsoft’s recent announcement regarding the .NET Framework is quite an interesting one, especially for those who are interested in the open source community.

The idea of making the CLR cross platform across Linux and Mac (on top of Windows of course) will make it easier for developers and users alike and remove the need for projects such as WINE.

Within the announcement there was a new version of Visual Studio 2013 called “Community”, aimed at those who are not producing enterprise grade software. Looking at the feature set, it’s comparable to the “Express” versions of earlier releases.
image

Additionally preview editions of Visual Studio 2015 was released. The new feature of being able to develop for Windows, Android and IOS from one development environment looks quite interesting.

Exciting times ahead

Further Information

OpenBSD 5.6 released

Today shows the release of OpenBSD 5.6. Download OpenBSD 5.6

There’s quite a few changes but most notable is the inclusion of LibreSSL and sendmail is no longer default, it’s SMTPD. Head over to the website for a full list of changes etc.

Personally I prefer CentOS over OpenBSD, but it’s all down to personal preference as all in all, all Unix type systems are pretty much the same.

Microsoft Dynamics Nav 2015

Microsoft has now released Microsoft Dynamics Nav 2015 earlier on this month. There’s a handful of new features above and beyond the features added in 2013. The tablet client looks pretty cool, removing the need to use the web client whilst out in the field. It’s optimised for touch use and available for all platforms:

If you have a valid subscription, it’s available for download on CustomerSource – Microsoft Dynamics Nav 2015 Download. You do need to get an upgraded licence to run 2015. This can be downloaded from CustomerSource (Microsoft are automatically upgrading Customer licences, or via your partner.)

BASH Vulnerability – ShellShock

Last month I blogged about the newest vulnerability in BASH. This has an official name now “ShellShock” and looks to be exploited in the wild with the botnet Mayhem which is aimed towards Linux systems.

Unfortunately it’s not just web servers which are vulnerable. There’s lots of devices out there which use Linux web servers, from home routers to mobile phones and other devices.

I’d recommend anyone using a Linux based system to do the following tests and check to make sure their system is not vulnerable. Tests for Shellshock Vulnerability

Further Information
Further Information

Live Chat

Live chat is all the rage now with websites. These allow you to instantly chat live with a real human being via the website. Being an IT Geek (or Professional as we like to be called), I could write one, but with the prices so low, I don’t really see the reason to. As they say, why invent the wheel?

To install, simply copy and paste the supplied code into your website and your pretty much up and running. The user interface allows the chat to be themed to match your website.

I’ve tried a few, and settled on Website Alive. Not only is it one of the cheaper options out there, it also allows you to view users live as they are on your site, giving you key information on what pages they are currently viewing, how many pages they have visited etc. Although it’s not as detailed as the de-facto standard – Google Analytics, it does allow you to push prompts to those users to start a chat session. Personally I find these quite annoying, but I guess in some industries a friendly prompt which is not too overwhelming can increase sales.

Before diving in and paying, I’d definitely recommend signing up for a free trial of the software you wish to use and see if there is benefit before you start coughing up any money.

Selective Reindexing of Indexes in SQL Server

I’ve wrote many scripts over the years to selectively reindex indexes and update statistics on Microsoft SQL Server. However more recently I’ve been using Hallengren’s SQL reindex script as it’s very powerful and pretty easy to use and schedule via SQL Agent.

Hallengren’s SQL Reindex Script

I currently use the following script run daily as it reorganises indexes with fragmentation of between 5% and 20%, and performs an online rebuild if over 20%. Fragmentation under 5% is ignored (it’s not worth doing anything with these). It also updates statistics on records which have been modified.

EXECUTE dbo.IndexOptimize @Databases = 'USER_DATABASES',
@FragmentationLow = NULL,
@FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 20,
@SortInTempdb = 'Y',
@MaxDOP = 0,
@UpdateStatistics = 'ALL',
@OnlyModifiedStatistics = 'Y'