Log into PaasPortal: https://paasportal.episerver.net/
Click the troubleshoot tab
Clicky the application logs, stream or download. Maybe there's a clue in there.
Potentially your archive is not in the correct structure
If you can setup Azure Pipelines, I created a very basic YML script here to publish to Integration
Azure DevOps build pipeline for CMS 12 | Optimizely Developer Com
Do you have all the configuration correctly setup. You need to make sure you have
1. EPiServer.CloudPlatform.Cms and EPiServer.CloudPlatform.Commerce (if a commerce site) packages added
2. Calls in the startup to AddCmsCloudPlatformSupport / AddCommerceCloudPlatformSupport for these packages
3. Starup doing the default _configuration = configuration; in the constructor. When doing local development some change the way it loads config but you have to make sure it loads the default way e.g. this is an example of a working startup that has the appSetting loading for local but falls back for DXP to normal
public Startup(IWebHostEnvironment webHostingEnvironment, IConfiguration configuration)
{
_webHostingEnvironment = webHostingEnvironment;
if (webHostingEnvironment.IsDevelopment())
{
var builder = new ConfigurationBuilder()
.SetBasePath(_webHostingEnvironment.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{_webHostingEnvironment.EnvironmentName}.json", optional: true);
_configuration = builder.Build();
}
else
{
_configuration = configuration;
}
SetStaticOptions();
}
4. Empty Events/Blobs sections setup in the appSettings e.g
"ConnectionStrings": {
"EPiServerDB": "",
"EcfSqlConnection": "",
"EPiServerAzureBlobs": "",
"EPiServerAzureEvents": ""
},
5. Make sure you have a default wildcard binding in the site configuration section
also in your logs it's showing your client's name just incase you want to blat it out :p
Also although Surjit mentioned the pass portal error logs, since the change of the docker structure with Linux on .NET 5/6 some infrastructure error messages from Docker don't show there but you can see them by going in to the direct logs on the app service in Azure. This helped me troubleshoot a lot
I'd like to make another suggestion. How have you verified the deployment was completed successfully? When you mentioned you didn't see any errors, is that watching the output of the powershell script?
I had a couple of issues i needed to resolve and they were only showing up in paasportal on the deployment log (Deployment tab -> Recent Deployments section at the bottom of the page).
This is an example of an error appearing when you misname your package:
Example of a successful deployment:
Hi
If you don't see any error within PaaS portal deployment log section, it means your deployment went into successfully. From your log, it seems your application fails to start that caused the container exit. There could be many causes for application failed to start in DXP. Typical ones I've seen so far are around case-sensitive literal and config transformation issue.
The safest way to test this is run your app in either docker or WSL first to see if there is any error. I hope this helps.
There were multiple factors causing this issue:
if (isDevelopment)
{
//Development configuration can be addded here, like local logging.
return Host.CreateDefaultBuilder(args)
.ConfigureCmsDefaults()
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
}).ConfigureLogging((context, logging) =>
{
logging.ClearProviders();
var loggingSection = context.Configuration.GetSection("Logging");
logging.AddConfiguration(loggingSection);
logging.AddDebug();
logging.AddConsoleFormatter<PlainConsoleFormatter, PlainConsoleFormatterOptions>();
logging.AddConsole(options => options.FormatterName = nameof(PlainConsoleFormatter));
logging.AddFile(loggingSection, options =>
{
options.FormatLogFileName = fileName =>
string.Format(CultureInfo.InvariantCulture, fileName, DateTime.Now);
options.FormatLogEntry = (msg) =>
{
var sb = new System.Text.StringBuilder();
var sw = new StringWriter(sb);
var jsonWriter = new Newtonsoft.Json.JsonTextWriter(sw);
jsonWriter.WriteStartArray();
jsonWriter.WriteValue(DateTime.Now.ToString("o"));
jsonWriter.WriteValue(msg.LogLevel.ToString().ToUpper(CultureInfo.CurrentCulture));
jsonWriter.WriteValue(msg.LogName);
jsonWriter.WriteValue(msg.EventId.Id);
jsonWriter.WriteValue(msg.Message);
jsonWriter.WriteValue(msg.Exception?.ToString());
jsonWriter.WriteEndArray();
return sb.ToString();
};
});
});
}
else
{
return Host.CreateDefaultBuilder(args)
.ConfigureCmsDefaults()
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
Ethan, glad your problem got resolved but more importantly for the forum, thanks for taking the time to write the solution you found!
I am trying to get my first Optimizely 12 site deployed to the DXP and am having a great deal of difficulty:
https://docs.developers.optimizely.com/digital-experience-platform/v1.2.0-dxp-cloud-services/docs/deploying-an-existing-cms-site
So, my package is called sitename.cms.app.buildnumber.nukpg
:( Application Error
And looking at the Azure logs:
I need to find some more detail about why it wont start? How do I get the logs for the actual site? As opposed to just Docker logs.