"A tenant could not be started: Default"

Topics: Installing Orchard, Troubleshooting
May 9, 2012 at 11:33 PM
Edited May 10, 2012 at 2:58 AM

I've got a source code subscription to Orchard, and I'm using the latest 1.4.x branch (merged into my local dev fork). Everything runs fine on my local machine, but when I build and promote it out to my beta staging server, I'm getting this error message filling my logs:

2012-05-09 22:55:37,383 [8] Orchard.Environment.Extensions.ExtensionLoaderCoordinator - Done loading extensions...2012-05-09 22:55:37,383 [8] Orchard.Environment.DefaultOrchardHost - Start creation of shells2012-05-09 22:55:37,383 [8] Orchard.Environment.DefaultOrchardHost - Creating shell context for tenant Default2012-05-09 22:55:37,383 [8] Orchard.Environment.ShellBuilders.ShellContextFactory - Creating shell context for tenant Default2012-05-09 22:55:37,383 [8] Orchard.Environment.ShellBuilders.CompositionStrategy - Composing blueprint2012-05-09 22:55:37,383 [8] Orchard.Environment.Extensions.ExtensionManager - Loading features2012-05-09 22:55:37,383 [8] Orchard.Environment.Extensions.ExtensionManager - Done loading features2012-05-09 22:55:37,414 [8] Orchard.Environment.ShellBuilders.CompositionStrategy - Done composing blueprint2012-05-09 22:55:37,649 [8] Orchard.Data.SessionLocator - Acquiring session for Orchard.Core.Settings.Descriptor.Records.ShellDescriptorRecord2012-05-09 22:55:37,649 [8] Orchard.Data.SessionFactoryHolder - Building session factory2012-05-09 22:55:37,649 [8] Orchard.Data.SessionFactoryHolder - Building configuration2012-05-09 22:55:37,649 [8] Orchard.Data.SessionConfigurationCache - The cached NHibernate configuration is out of date. A new one will be re-generated.2012-05-09 22:55:37,649 [8] Orchard.Environment.DefaultOrchardHost - A tenant could not be started: DefaultSystem.ArgumentException: An item with the same key has already been added.   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)   at Orchard.Data.Conventions.RecordTableNameConvention..ctor(IEnumerable`1 descriptors) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\Conventions\RecordTableNameConvention.cs:line 13   at Orchard.Data.Providers.AbstractDataServicesProvider.CreatePersistenceModel(IEnumerable`1 recordDescriptors) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\Providers\AbstractDataServicesProvider.cs:line 30   at Orchard.Data.Providers.AbstractDataServicesProvider.BuildConfiguration(SessionFactoryParameters parameters) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\Providers\AbstractDataServicesProvider.cs:line 0   at Orchard.Data.SessionFactoryHolder.<>c__DisplayClass3.<BuildConfiguration>b__2() in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\SessionFactoryHolder.cs:line 94   at Orchard.Data.SessionConfigurationCache.GetConfiguration(Func`1 builder) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\SessionConfigurationCache.cs:line 51   at Orchard.Data.SessionFactoryHolder.BuildConfiguration() in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\SessionFactoryHolder.cs:line 93   at Orchard.Data.SessionFactoryHolder.GetConfiguration() in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\SessionFactoryHolder.cs:line 71   at Orchard.Data.SessionFactoryHolder.BuildSessionFactory() in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\SessionFactoryHolder.cs:line 83   at Orchard.Data.SessionFactoryHolder.GetSessionFactory() in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\SessionFactoryHolder.cs:line 61   at Orchard.Data.SessionLocator.For(Type entityType) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\SessionLocator.cs:line 29   at Orchard.Data.Repository`1.get_Session() in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\Repository.cs:line 26   at Orchard.Data.Repository`1.get_Table() in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\Repository.cs:line 30   at Orchard.Data.Repository`1.Fetch(Expression`1 predicate) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\Repository.cs:line 126   at Orchard.Data.Repository`1.Get(Expression`1 predicate) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\Repository.cs:line 91   at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Data\Repository.cs:line 60   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord() in c:\source\Alanta\working\www.alanta.com\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:line 57   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor() in c:\source\Alanta\working\www.alanta.com\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:line 30   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:line 66   at Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings settings) in c:\source\Alanta\working\www.alanta.com\src\Orchard\Environment\DefaultOrchardHost.cs:line 174   at Orchard.Environment.DefaultOrchardHost.CreateAndActivateShells() in c:\source\Alanta\working\www.alanta.com\src\Orchard\Environment\DefaultOrchardHost.cs:line 1342012-05-09 22:55:37,649 [8] Orchard.Environment.DefaultOrchardHost - Done creating shells2012-05-09 22:55:37,649 [8] Orchard.Environment.DefaultOrchardHost - EndRequest

The actual error on the website (http://www.beta.alanta.com/) is a straightforward 404.

Any suggestions for troubleshooting it?

Coordinator
May 10, 2012 at 4:06 AM

App pool on ASP.NET 4.0, IIS 7 Integrated pipeline? Has it ever worked on that host?

May 10, 2012 at 4:14 AM

I figured out what it was. I had the Vandelay.Favicon module installed on my staging server, and I recently added the Vandelay.Industries module to my dev solution. When I pushed my dev build out to staging, the Vandelay.Industries module got pushed out with it. Once there, it tried to create a separate "Vandelay_Favicon_FaviconSettingsPartRecord" table, and that was what was causing the error. My fault, of course, but some better logging would be helpful. I've filed an issue to that effect.