Showing posts with label LCS. Show all posts
Showing posts with label LCS. Show all posts

Thursday, May 23, 2024

D365FO - Step 57: GlobalUpdate script for service model: RetailServer on machine / Step 59: Update script for service model: RetailCloudPos on machine: Failing

 

I recently ran into an interesting issue when it comes to applying a platform update to a CHE environment for D365. I have seen retail errors before but is it usually based on the retail server and step 57

 

Example:

Step 57: GlobalUpdate script for service model: RetailServer on machine: [CHE name]

 

Which can be fixed by simply going to the service volume (usually K) / Deployable packages/ Runbook Id / RetailServer / Scripts / DropAllRetailChannelDbObjects.sql and running it against the AxDB and then hitting resume.

IE. K:\DeployablePackages\{guide}\RetailServer\Scripts\DropAllRetailChannelDbObjects.sql

 

How this time around I am getting an odd error around step 59 which isnt documented anywhere.

 

Step 59: Update script for service model: RetailCloudPos on machine: CAM-DEV-CMMH-1

 

The step 59 failed with the following error:

The step execution time exceed the timeout value specified: 10min

 

Which is quite odd, because this was a brand new box with no data or custom code loaded.

 

In order to resolve this issue what need to do is go into the same deployable packages as the dropallretail objects fix but this time we will go to

service volume (usually K) / Deployable packages/ Runbook Id / RetailCloudPos\Scripts\Upgrade\Core\ UpdateCloudPos.ps1  and clear all data from the file UpdateCloudPos.ps1 so it is empty but the file is still ran. Restart the server and then hit resume inside of LCS.

IE: K:\DeployablePackages\{guid}\RetailCloudPos\Scripts\Upgrade\Core\UpdateCloudPos.ps1  

 

 

When this occurs and just hitting resume still fails on a generic message it may be worth while to check out

service volume (usually K) / Deployable packages/ Runbook Id / DefaultServiceModelData.xml

 

IE: K:\DeployablePackages\{guid}\ DefaultServiceModelData.xml

 

Which will give you a list of all the powershell scripts involved with the update process.

 

Wednesday, December 5, 2018

D365FO / Azure - Create website redirect in azure to handle supplemental environment url changes

Currently while dealing with D365FO supplemental environments within LCS that are all hosted on a single machine anytime we update them and there is an error microsoft's recommended fix is to stand up a new environment. Because of this the url will change and you need to notify your users. In order to handle this scenario so our users do not need to worry about a new url you can create a redirect website in azure that you can point to whatever url you want and if your users bookmark these urls instead of the direct ones then you don't need to worry about who has what book marked.

Azure portal 

Step 1. In the Azure portal you need to create a webapp. You do this by going to "Create a resource" and then choose a web app.




Step 2. In the newly created webapp go to Advanced tools (Kudu)


Step 3. In Kudu go to Debug console > cmd


Step 4. Browse to /site/wwwroot and click on the add ("+") button and choose to create a new file and name it web.config

Step 5. Click on the edit button for the web.config file and add in the following and hit save.


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Redirect test enviornment" stopProcessing="true">
                    <match url="^test" />
                    <action type="Redirect" url="https://testurl.cloudax.dynamics.com" redirectType="Permanent" />
                </rule>   
                <rule name="Redirect stage enviornment" stopProcessing="true">
                    <match url="^stage" />
                    <action type="Redirect" url="https://stageurl.cloudax.dynamics.com" redirectType="Permanent" />
                </rule>
                <rule name="Redirect dm enviornment" stopProcessing="true">
                    <match url="^dm" />
                    <action type="Redirect" url="https://datamigrationurl.cloudax.dynamics.com" redirectType="Permanent" />
                </rule>
                <rule name="Redirect qa enviornment" stopProcessing="true">
                    <match url="^qa" />
                    <action type="Redirect" url="https://qaurl.operations.dynamics.com/" redirectType="Permanent" />
                </rule>
                <rule name="Redirect header" stopProcessing="true">
                    <match url=".*" />
                <action type="Redirect" url="https://www.google.com" redirectType="Permanent" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>    


Step 6. After hitting save you should now be able to access your azure web app in the following manner

https://yourwebappurl.com/test
https://yourwebappurl.com/qa
https://yourwebappurl.com/stage
https://yourwebappurl.com/dm

and they should now forward to their respective website.

If you do not include a /* tag and just put https://yourwebappurl.com then it should forward you to google.com as well