arachnode.net
An Open Source C# web crawler with Lucene.NET search using SQL Server 2005/2008/CE An Open Source C# web crawler with Lucene.NET search using MongoDB/RavenDB/Hadoop
Mongo/Raven/MySQL/Hadoop Does arachnode.net scale? | VS2008/2010/2012 & SQL2008/2012 | Download the latest release

Service Installation Help

rated by 0 users
Answered (Verified) This post has 2 verified answers | 23 Replies | 2 Followers

Top 75 Contributor
7 Posts
jamesy posted on Sun, Jul 10 2011 1:09 AM

Mike, 

I have tried for a couple days to install and run as a service on Windows 7 and Server 2008 and it doesn't work for me.  I can install the service without a problem, but when I start the service it times out.  This happens when I create the service with installutil, sc.exe.  I tried something called nssm that installs and runs the service, but the service does nothing (writing CrawlRequests.txt).  

I imagine there is a security issue, but I have no clue.  Have you successfully installed on 7 or 2008?  Do you have any tips?

I have run the console app from this server and so the database, connection string, etc. all work fine. 

Thanks,

James

Answered (Verified) Verified Answer

Top 75 Contributor
7 Posts
Answered (Verified) jamesy replied on Sun, Jul 10 2011 10:26 AM

I found the culprit in Crawler.cs line 79

                _arachnodeDAO = new ArachnodeDAO(ApplicationSettings.ConnectionString, true, true);

This static constructor below fails in the service code line 48 because ApplicationSettings.ConnectionString above is not set properly:
          private static readonly Crawler _crawler = new Crawler(CrawlMode.BreadthFirstByPriority, false);
ApplicationSettings is getting populated above implicitly in the constructor, and I had not set the connection strings to the server sql instance, and there's no debug info when the crawler constructor fails.

 

Top 10 Contributor
1,750 Posts
Verified by arachnode.net

Yeah, I guess it would be nice if you could see an error since it's a service.

I moved the instantiation of the _crawler to the try/catch to OnStart.

Thanks for the suggestion!  Big Smile

For best service when you require assistance:

  1. Check the DisallowedAbsoluteUris and Exceptions tables first.
  2. Cut and paste actual exceptions from the Exceptions table.
  3. Include screenshots.

Skype: arachnodedotnet

All Replies

Top 75 Contributor
7 Posts
jamesy replied on Sun, Jul 10 2011 10:06 AM

On Windows Server 2008, I tried changing the permissions on the file directories, database, and service account.  I always get the system error:

Error 1053: The arachnode.net service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.

The reason I think it is security is because even when OnStart contains only event logging methods, i.e. I comment out all the code from OnStart, the service still fails to start.

The nssm installs and the service starts, but there are no event log messages, so I can't tell what state the service is in.

Thanks for any help,

James

Top 75 Contributor
7 Posts
Answered (Verified) jamesy replied on Sun, Jul 10 2011 10:26 AM

I found the culprit in Crawler.cs line 79

                _arachnodeDAO = new ArachnodeDAO(ApplicationSettings.ConnectionString, true, true);

This static constructor below fails in the service code line 48 because ApplicationSettings.ConnectionString above is not set properly:
          private static readonly Crawler _crawler = new Crawler(CrawlMode.BreadthFirstByPriority, false);
ApplicationSettings is getting populated above implicitly in the constructor, and I had not set the connection strings to the server sql instance, and there's no debug info when the crawler constructor fails.

 

Top 10 Contributor
1,750 Posts
Verified by arachnode.net

Yeah, I guess it would be nice if you could see an error since it's a service.

I moved the instantiation of the _crawler to the try/catch to OnStart.

Thanks for the suggestion!  Big Smile

For best service when you require assistance:

  1. Check the DisallowedAbsoluteUris and Exceptions tables first.
  2. Cut and paste actual exceptions from the Exceptions table.
  3. Include screenshots.

Skype: arachnodedotnet

Page 1 of 1 (4 items) | RSS
An Open Source C# web crawler with Lucene.NET search using SQL 2005/2008/CE

copyright 2004-2014, arachnode.net LLC