Error while registering crawler by RegisterThisCrawler.bat

Has anyone encountered following error message when you execute the 'RegisterThisCrawler.bat'?

Finished initializing ProjectConfiguration for 'InfoShareBuilders'.
MACHINEXXXX::InfoShareBuilders pid[6224] threadId[1]
MACHINEXXXX::InfoShareBuilders::DatabaseTypeName[sqlserver2016]
MACHINEXXXX::InfoShareBuilders::Database[prod-db.intra.global.com][ISHCMDB][isource]
Initializing CatalogSettings...
Initializing CatalogStructure...
Finished initializing the CrawlerConfiguration for 'InfoShareBuilders'.
-------------------------------------------------------------------------------
Registering a Crawler for 'TrisoftInfoShareIndex' on 'MACHINEXXXX'
Adding the Crawler with hostname 'MACHINEXXXX' and catalogname 'TrisoftInfoShareIndex' failed with an error.
System.Transactions.TransactionAbortedException: The transaction has aborted. ---> System.TimeoutException: Transaction Timeout
--- End of inner exception stack trace ---
at System.Transactions.TransactionStateAborted.BeginCommit(InternalTransaction tx, Boolean asyncCommit, AsyncCallback asyncCallback, Object asyncState)
at System.Transactions.CommittableTransaction.Commit()
at System.Transactions.TransactionScope.InternalDispose()
at System.Transactions.TransactionScope.Dispose()
at Trisoft.InfoShare.Crawler.RegisteredCrawlersDataSqlServer.Add(String hostName, String catalogName)
at Trisoft.InfoShare.Crawler.RegisteredCrawlers.RegisterCrawler()
Crawler.RegisterCrawler => RegisteredCrawlers..ctor => RegisteredCrawlers.RegisterCrawler
Registering the Crawler for 'InfoShareBuilders' failed with an error.
System.Transactions.TransactionAbortedException: The transaction has aborted. ---> System.TimeoutException: Transaction Timeout
--- End of inner exception stack trace ---
at System.Transactions.TransactionStateAborted.BeginCommit(InternalTransaction tx, Boolean asyncCommit, AsyncCallback asyncCallback, Object asyncState)
at System.Transactions.CommittableTransaction.Commit()
at System.Transactions.TransactionScope.InternalDispose()
at System.Transactions.TransactionScope.Dispose()
at Trisoft.InfoShare.Crawler.RegisteredCrawlersDataSqlServer.Add(String hostName, String catalogName)
at Trisoft.InfoShare.Crawler.RegisteredCrawlers.RegisterCrawler()
at Trisoft.InfoShare.Crawler.RegisteredCrawlers..ctor(RegisterMode registerMode)
at Crawler.Crawler.RegisterCrawler()
Program.Main => Crawler.Process => Crawler.RegisterCrawler
# ErrorLevel was 0
# Relocating to starting position
# Script finished
Press any key to continue . . .

It seems that cause of issue is related to the database. Because, the issue occurred after I restored a database from a backup file.

When I restored the database, I overwrote the existing database. I'd like to make sure whether a new database should be created or it can be overwritten to an existing database when restoring database from the backup file.

Thanks,

Naoki

  • You should be able to overwrite an existing database with a prior backup.  If the backup came from a different environment, you will need to run UnregisterAllCrawlers before running RegisterThisCrawler

  • Hi Greg,

    Thank you for your comment. Of course, I executed the 'UngisterAllCrawlers.bat' as administrator before executing 'RegisterThisCrawler.bat'.

    I installed LCA/KC/TD tens of times in various environments, but I haven't encountered this issue before. It's really mysterious issue.

    Thanks,

    Naoki

  • Hi Naoki,

    It looks like you are running into an absolute transaction timeout because of "The transaction has aborted."

    Absolute timeout exists in all kinds of software and are sometimes clumsy to track, because it works on one system (which has more throughput in I/O or CPU) and not on others.

    In your scenario a simple workaround could be to increase the machine.config timeout as described on https://blogs.msdn.microsoft.com/madhuponduru/2005/12/16/how-to-change-system-transactions-timeout/ 
    The app.config (so your case Crawler service) configuration is already set to a higher value (from the top of my head 1 hour). The lowest value counts upon execution, so probably your default machine.config 10 minutes is the one you see happening, increasing that one might get you past this cliff.

    -Dave


    [SRQ-12559]

  • Hi Dave-san,

    Yes, you are right. I think following page is better to understand about timeout/maxTimeout settings.

    http://kreelbits.blogspot.com/2013/09/systemtransactionstransactionscope.html

    Actually, I did following things to deal with this issue:

    (1) Modified "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config"

    As described in the above page, set allowExeDefinition="MachineToApplication" on the system.transaction section group in the machine.config.

    <sectionGroup name="system.transactions" type="System.Transactions.Configuration.TransactionsSectionGroup, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null">
    <section name="defaultSettings" type="System.Transactions.Configuration.DefaultSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" />
    <section name="machineSettings" type="System.Transactions.Configuration.MachineSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" allowDefinition="MachineOnly" allowExeDefinition="MachineToApplication"/>
    </sectionGroup>

    (2) Modified "C:\InfoShare\App\Crawler\Bin\Crawler.exe.config"

    Extended the maxTimeout to 1 hour and timeout to 30 minutes as below:

    <?xml version="1.0"?>
    <configuration>
    <system.transactions>
    <!-- The default transaction time-out should be smaller or equal than the maximum transaction time-out which is normally 10 minutes -->
    <defaultSettings timeout="00:30:00"/>
    <!--
    The maxTimeOut is set by the machine settings and is default 10 minutes. The maxTimeOut can normally only be set on the machine.config.
    In order to set the maxTimeOut in your application config, the attribute "allowExeDefinition" in the machine.config must be replaced from 'MachineOnly' to 'MachineToApplication' (see mantis 3058)
    -->
    <machineSettings maxTimeout="01:00:00"/>
    </system.transactions>

    (3) Executed 'UnregisterAllCrawlers.bat' as administrator

    (4) Executed 'RegisterThisCrawler.bat' as administrator

    Thank you for your assistance.

    Best regards,

    Naoki