Open madmox opened 9 years ago
We had the same symptons with Azure Web Apps, as elaborated in the linked discussion. With 1.9 such log messages were generated during deployment, but after the deployment finished the sites actually started fine. With 1.9 however the starts weren't starting any more and the error persisted.
The culprit was that the below line is needed in the Publish Profile:
<_DestinationType>AzureWebSite</_DestinationType>
in the existing <PropertyGroup>
.
This is an Azure-specific config that is required as something is unique with Azure deployments.
I understand that yours is a Cloud Service but I suspect you should have a similar issue. Any way, your issue is surely related to how the instance is deployed, since you experience it during scaling.
I would like to join the fanclub of this issue. The thing is that Orchard is not runnig as Web App or Cloud Service but as Azure's VM (2008R2, IIS 7.5, Orchard 1.8.1). And it's not random but it happens after the deployment.
Application is deployed by VS Publish. Restart of the AppPool helps and after that it runs just fine. Is there anything I could check since it's a different environment?
Orchard.Environment.DefaultOrchardHost - (null) - A tenant could not be started: Default
Autofac.Core.DependencyResolutionException: None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Settings.CurrentSiteWorkContext' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Settings.ISiteService siteService' of constructor 'Void .ctor(Orchard.Settings.ISiteService)'.
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
.
.
.
at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings)
at Orchard.Environment.DefaultOrchardHost.CreateShellContext(ShellSettings settings)
at Orchard.Environment.DefaultOrchardHost.<CreateAndActivateShells>b__7(ShellSettings settings)
@cwojke did you check whether you have any similar similar config issue than I mentioned?
Thanks for your reply. I checked my publishing profile but I didn't find anything unusual and because I'm not deploying it to AzureWebSite/CloudService I add nothing.
But as you mention it, I've found some example with <_DestinationType>AzureVirtualMachine... I will try it, but I'm not giving it much chance. It's an ordinary web deploy to VM (on Azure).
And up until last week, it worked fine. I will change log level and see if there isn't something else going on.
We deployed our solution on an Azure Cloud Service and activated the Azure auto-scaling functionality (2 instances from 8 A.M. to 19 P.M. during the week and 1 instance otherwise).
Orchard's version is 1.8.1, we have a few custom modules and themes and are using the multitenancy feature. Usually the deployment does not cause any trouble and the sites are working just fine.
But sometimes (~ once a week), when auto-scaling starts the 2nd instance (at 8 A.M. but not on any particular day during the week), the tenants fail to start on this instance. We then keep getting this error in the logs:
Manually restarting the instance usually solves (until the next failing auto-scaling) the problem. Disabling auto-scaling reduces the impact of the issue (because instances are started less frequently), but it does not solve it completely: deployments regularly fail, and sometimes Azure restarts or moves deployments to another instance. Any idea what's going on?
Checkout the original discussion on codeplex: http://orchard.codeplex.com/discussions/587886