Welcome to EMC Consulting Blogs Sign in | Join | Help

Russell Seymour's Blog

  • TFS: Scrum Burn Down Charts

    Sometimes the burndown chart for a sprint may not look the way you expect, even after sorting out all the hours and the remaining effort involved.  If they do not look correct then there is problem something wrong with the data warehouse of the TfsWarehouse database.

    The first thing to do is to see how recently the warehouse was updated.  The way to do this is to log into the SQL server of TFS (erither using RDP or direct from the SQL Management Suite) and run the following query on the TfsWarehouse database:

    use [TFSWarehouse]

    select top 1 __LastUpdatedTime from dbo.[Work Item History] with (nolock) order by __LastUpdatedTime desc

    select * from _WarehouseConfig

    The output will include something similar to the following:

    __LastUpdatedTime

    -----------------------

    2007-08-06 17:58:37.560

    This was a scenario that happened at one of our clients and we were investigating this problem on Wed 15th August.  This showed that the warehouse had not updated for at least 6 days!

    The immediate reaction might be to rebuild the Warehouse, indeed this is what I did, however this does not address the issue.  The way to fix this problem is to check the analysis service of SQL running on the data-tier of the TFS server.  It may have stopped running, in which case the reason why it stopped needs to be investigated, however if it is running restart it.

    Once the service has restarted check the System Event log, it is possible that although it has started it is moaning about some files in the filesystem.  This is the error that we got:

    Event Type:        Error

    Event Source:    MSSQLServerOLAPService

    Event Category:                (289)

    Event ID:              18

    Date:                     15/08/2007

    Time:                     14:20:45

    User:                     N/A

    Computer:          TFS-SERVER

    Description:

    Errors in the metadata manager. An error occurred when instantiating a metadata object from the file, '\\?\C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\TfsWarehouse.0.db\Team System.12604.cub.xml'.

    Using explorer on the server go to the location specified in the log file.  In our case there were a bunch of 0 byte XML files that had created; strangely these files were compressed.  Any XML file that is corrupt or does not contain anything will cause problems for the update process.  Delete these files (as specified in the event log) and restart the service which should now start cleanly.

    The last step in the process is to get the TFS system to update the warehouse.  Use the web service for TFS to invoke this, BUT bear in mind that it could well take a long time and on a busy TFS server it maybe better to do outside of hours - although remember that TFS itself will try to updated the warehouse every hour by default.

  • MS SQL 2005 and MS CRM 3.0 Server Pointers

    Since before the Christmas break we have been working on a project that requires us to get an installation of Microsoft CRM 3.0 server up and running; and to be brutally honest it has not been easy.

    Yesterday I decided that one of the ways to get rid of some of the errors we were having was to create a brand new Virtual Machine as the one we had been using had been installed, removed and reconfigured during initial development phases.

    This started off well enough with the following steps being taken:

    1. Install Windows 2003 Standard Edition and join to domain
    2. Patch Windows
    3. Add IIS and SMTP components
    4. Install MS SQL 2005 Standard Edition
    5. Install MS CRM 3.0

    This seems to be the best way to approach this, but it would not work in the end.

    Problem

    When a user is added to CRM, the software itself checks to ensure that the user already exists in the Active Directory for the domain.  If it does nothing much happens until the end when it informs you the user cannot be found which you would expect.

    The problem occured when we tried to add a user that did indeed exist in the AD, but the CRM software would just come back with a standard error message asking us to contact our system administrator, which is me!

    The only bit of logging I could find was in the standard W3SVC logging directory for the website and gave the rather cryptic code error:

    /_common/error/dlg_error.aspx hresult=Not%20available&errMessage=Index%20was%20out%20of%20range.%20Must%20be%20non-negative%20and%20less%20than%20the%20size%20of%20the%20collection.%0AParameter%20name%3A%20index 80 t5m\administrator 192.168.16.97 Mozilla/4.0+(compatin/ ble;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+1.1.4322;n/ +.NET+CLR+2.0.50727;+InfoPath.1) 200 0 0


    Resolution

    In true Conchango style I sent an email to the community to see if we had anyone that had the answer to this problem.  As it turned out no one reply was 100% accurate, but many people did reply and it started me thinking of the different .NET versions that are installed on the server.  Thanks to all the pointers everyone.

    The installation steps that I took to get the software up and running actually meant that the .NET 1.1 (which comes as standard with Windows 2003 Standard) was deregistered from IIS - this is thanks to MS SQL 2005 as that installs .NET 2.0 and rather unhelpfully stops IIS from being able to use .NET 1.1

    Once it was clear that CRM required 1.1 to run (which seems very strange) I started to poke around the default website of IIS and found that .NET 2 was the default engine but i was not able to select the 1.1 version I required, although it was installed.  The answer here is to use a utility that is actually in the .NET 1.1 directory called aspnet_regiis.exe with the command switch -i.

    For example:

       %SYSTEMROOT%\windows\Microsoft .NET\framework\v1.1.4322\aspnet_regiis.exe -i

    This command will run for a small period of time and then will state it has finished.  When I went back to the configuration for the website in IIS I was indeed now able to select the correct version of .NET for use with the website.

    Pain points

    The following points are some off the issues that I have found with CRM that make the software an unfriendly beast. 

    • CRM does not have any logging capabilities except to the web logs, so when it tells the user to 'contact your System Administrator' the System Administrator will be no wiser than the user
    • It is not possible to install CRM Client once and have it work in various profiles of Outlook
    • Unless the offline-ready version of the CRM Client is installed it is not possible to change the directory in which the software will be installed
    • It is not possible to install CRM on an Outlook client that is part of another domain as it is not possible to specify a different user for authentication
  • Playing the Field

    One of the things that I loved about my career is that I have been able to stay multi disciplined with Microsoft, UNIX and Open Source products; and I very pleased to say that i have been able to continue at Conchango.

     All technologies have a place in the market, and whilst I sometimes play devils advocate in the old Windows vs. UNIX debate I firmly believe that there is a no clear cut answer.  What is good for one solution may not be good for something else.  It is this understanding of the different systems that has given me a much broader view of technologies and has helped many a time in projects that I have worked.

    So how has this all helped?

    Personally I love to play with Linux and find out what extra things it can do, and over time i have learnt that it can do some truely spectacular things that other systems can do but bormally cost the earth.

    Recently I was on a project that used HP servers and Windows 2003 Server for a development and test environment.  There are sme monitoring management tools that come with HP servers, but as the name suggests it is aimed at HP servers and there were a couple of servers that were not HP based so it would be (near) impossible to manage.

    This is where Linux comes in.  My favorite distribution is Gentoo (www.gentoo.org) as it is a build from scratch 'distro' and you can have as much or as little as you like.  Using this as a platform and installing some truely brilliant open source applications:

    • Apache 2
    • PHP 5
    • MySQL 5

    It then became a very simple matter of monitoring any system you like, be it a network switch, router, Windows or UNIX server.  The key thing here is that they can all talk the same language, Simple Network Management Protocol (SNMP).

    Monitoring

    OK so I have sold you on the platfor, but how does it all work?  The answer lies in using a PHP module and some nifty Perl scripts - all of which are distributed uinder the GPL licence.

    1. Cacti - www.cacti.net
    2. NetSNMP

    Cacti uses the cron system to periodically poll servers for status, anything from Network usages to disk space.  This is then pulled back and charted using the superb RRDTool (www.rrdtool.org).  It gets the information using the NetSNMP package.

    There are many more systems that can be added to this, such as Nagios (www.nagios.com), SmokePing (http://oss.oetiker.ch/smokeping/), Nessus (www.nessus.org) to name but a few.

    Learning Curve

    I think one of the biggest problems people have with Linux and open source software is that they do not know how to use it and thus are fearful which makes them shy away from these systems.  In reality once the base system has been setup most of the applications have extremely friendly and easy to use web interfaces.

    The draw for me is that I can make Linux do (almost) anything I want it, albeit using the experience of other people - but this is the great thing about Open Source software.

    I know this is an extremely small insight into why I like Linux and what it can do and I will do and I wille xpand on it in the next few weeks, but my primary reason for this blog is that I balled over by the fact that I am able to continue using this technlogy at Conchango.  It is great that I share information about the diversity of Linux and showcase projects and applications that I use.  We have a great community dedicated to Open Source and J2EE applications which is full of people that have similar views.

    Ok so this is the geek spot, but please look at Michelle Flynn's blog (our Recruitment Manager) for a taste of the personal side of Conchango Smile
     

     

     

  • CruiseControl Build Notification with Messenger

    For those of you that know CruiseControl.NET will know that you can get updates of how the continuous builds are progressing using CCTray.  However this can be limiting if you are a develper in the team and are not on the same network as the development server, thus you may not get the information you need.

    This is where the Messenger comes in.  Using some ideas and libraries that have been created for such a purpose from here, it becomes a relatively easy thing to sort out.

    NB. The site describes a setup with VS 2005 and Source Safe, the following guidelines are for Subversion and is not bound to any IDE.

    Download the zip file from the website and unpack the DotMSN.dll and Macaw.MSBuild.Tasks.dll to any directory.  These two libraries now need to be added to the GAC (Global Assembly Catalog):

    gacutil -i DotMSN.dll
    gacutil -i Macaw.MSBuild.Tasks.dll

    Now these have been added to the system, modify the ContinuousIntegration.proj file (or whatever file your CruiseControl uses) and add the following lines:

    <UsingTask TaskName="Macaw.MSBuild.Tasks.CheckWorkspaceUpToDate" AssemblyName="Macaw.MSBuild.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=77d1de835a1afaee" />
    <UsingTask TaskName="Macaw.MSBuild.Tasks.StartTeamBuild" AssemblyName="Macaw.MSBuild.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=77d1de835a1afaee" />
    <UsingTask TaskName="Macaw.MSBuild.Tasks.GetUnexaminedBuild" AssemblyName="Macaw.MSBuild.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=77d1de835a1afaee" />
    <UsingTask TaskName="Macaw.MSBuild.Tasks.MessengerNotification" AssemblyName="Macaw.MSBuild.Tasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=77d1de835a1afaee" />

    Now that the assemblies have been added the appropriate Targets must be added.  The following is an example of a target that could be used:

      <Target Name="Notify">
         <SvnInfo LocalPath="$(SourceDirectory)">
             <Output TaskParameter="LastChangedAuthor" PropertyName="LastChangedAuthor" />
         </SvnInfo>

         <CreateProperty Value="$(LastChangedAuthor) prompted the latest SVN Checkout by CruiseControl">
         <Output TaskParameter="Value" PropertyName="Shamer" />
         </CreateProperty>

         <CreateProperty value="CruiseControl MSBuild Script has been called, no status available">
             <Output TaskParameter="Value" PropertyName="MSNMsg" />
         </CreateProperty>

         <!-- Message for successful build of project -->
         <CreateProperty
        Condition="'$(CCNetIntegrationStatus)'=='Success'"
            Value="$(Shamer) \n (Y) Project has successful built">
            <Output TaskParameter='Value' PropertyName="MSNMsg" />
         </CreateProperty>

        <MessengerNotification Message="$(MSNMsg)"
            SenderAlias="Conchango Continuous Integration Notification"
            SenderAccount="example@conchango.com"
            SenderPassword="xxxxxxx"
        Recipients="someone.to.be.notified@conchango.com"
        />
      </Target>

    Finally a Messenger account must be created so that the system has an account to send from.  In addition this account must have the recipients in their contact list that you would ever want to notify.

    1. Create a new account on the MSN Site or use Windows Live Messenger.
    2. Sign into this account on your machine and add the recipients to the list, you will have to wait until people authorise the account before it can be used to send notification messages.
    3. Now use the account information in the target you have created in the MSBuild Script.
    If all has gone to plan anyone in the recipient list should be able to see the status of the builds.

    Troubleshooting:

    If the development servers are on a slow network you may find that MSBuild timesout waiting for a response to send the message to the recipient.  At the moment I do not know a cure for this.


Powered by Community Server (Personal Edition), by Telligent Systems