Yesterday a colleague wrote, "It's hard to believe you had 27 blog posts in one month a year ago." I think that his disbelief was triggered by my lack of regular posts recently compared to my abundance of posts then. Last night I took a look back through some of those posts from this time last year to see what the heck I was doing that would give me enough material to post nearly once per day. One of the things I was working on was the WhatIWantMost project, but the other was that I had only months before joined the Telligent team and I was getting my first strong dose of Community Server. I had used CS for blogs long before that time so I was familiar with that side of the product, but I had only implemented CS forums once before that - and even then it was vanilla. Because I was new I had a lot of information that I could relay to other beginners.
Over the course of the past year I have gained more experience working with Community Server and have grown more comfortable with it. When an issue does come up it's usually not "new" to me so I don't feel that it's worth blogging about. Yesterday I ran into something that I would have normally cast aside in the same manner, but I realize now that it is worth sharing.
I installed the Community Server News Gateway add-on to a new server and it seemed to be a successful installation. I updated the configuration files and dropped everything into place (I was copying from a known good installation on an existing server). I ran the console application and everything worked fine. However, when I tried to start the service it would immediately stop and show a generic message. In the Application Event Log I found something similar to this:
System.NullReferenceException: Object reference not set to an instance of an object.
at CommunityServer.NntpServer.Service.Program.OnStart(String args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
Since the console app worked fine I assumed that there was nothing wrong with my configuration or with the program itself. I thought that there must be something wrong with the setup of the service. After searching through the CommunityServer.org forums I found a similar issue with a different service that had something to do with the registry key being stored in the wrong place.
The News Gateway service was expecting to find its registry entry at:
HKEY_LOCAL_MACHINE\SOFTWARE\Telligent Systems, Inc.\Community Server News Gateway
but mine had been installed at:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Telligent Systems, Inc.\Community Server News Gateway
The new web server that I was installing to was a 64-bit OS and I had chosen the default path that was presented to me when running the service's installer so it was installed to the "Program Files (x86)" folder. I assume that is why it was put in the "Wow6432Node" rather than directly in the "SOFTWARE" node. Seems that the service could not find its registry entry which was why it was throwing the NullReferenceException.
The quick fix for me was to manually create a copy of the node (along with its keys and entries) directly in the "SOFTWARE" node. After that the service fired right up and ran properly.
Hopefully someone will find this information useful when happening upon this post while searching for the described exception. I'll try to remember to keep posting bits like this as I encounter them.