IIS app pool ID and IIS service account problem?

We have our dashboard running with a separate application pool ID ( separate User ).
This user has sufficient rights to execute the endpoints etc. from our dashboard.

Unfortunately we get really often the annoying message http error 502.5 from IIS.

If we login to the IIS server with the application pool ID and start once the dashboard everyone could work.

How can we debug UD to see the user context any endpoint or other powershell item is excuting ?

Hi @quax

Check IIS logs and see which request crashes the site
Are you able to replicate the issue from a certain part of your site?
Intermittent or after each reboot / restart of the app pool?

The same behaviour after restarting apppool and same behaviour after restart iis service

The last entry inside iis log is the request for the https url .

After removing any modules and cmdlets of VMware it is running fine and smooth

Any known issues regarding vmware module integration ?

Hi again @quax

The VMware module should work fine, as far as i know.
Are you importing the module into your endpointinitization?

Hi again,

inside dashboard.ps1 we first initialize the vmware Module set-powercliconfiguration and then initialize new-UDEndpointInitialization -Variable $some -Module $module
with some variables and the vmware module.

If I restart the server and attempt the first connect from a browser to the dashboard there are two entries inside event log:
Protokollname: Application

Quelle: Universal Dashboard

Datum: 28.08.2019 12:21:54

Ereignis-ID: 0

Aufgabenkategorie:Keine

Ebene: Informationen

Schlüsselwörter:Klassisch

Benutzer: Nicht zutreffend

Computer: computer

Beschreibung:

Starting Universal Dashboard service.

Dashboard Script: D: \wwwroot\net472…\dashboard.ps1

Assembly Base Path: D:\ wwwroot\net472…\dashboard.ps1

Protokollname: Application

Quelle: IIS AspNetCore Module

Datum: 28.08.2019 12:21:54

Ereignis-ID: 1000

Aufgabenkategorie:Keine

Ebene: Fehler

Schlüsselwörter:Klassisch

Benutzer: Nicht zutreffend

Computer: computer

Beschreibung:

Application ‘MACHINE/WEBROOT/APPHOST/applicationname’ with physical root ‘D:\ wwwroot’ created process with commandline 'D:\wwwroot\net472\universaldashboard.server.exe ’ but failed to listen on the given port '2023’

It kinda sounds like it might be throwing an error before it’s even trying to start UD. Can you try this?

try {
  # Setup everything in here
} catch {
   $_.Exception.MEssage | Out-FIle -Path .\SomePath\log.txt 
}

I want to see if it’s throwing an exception in the script that is somehow going unhandled.

You will find the requested information below. Unfortunately no exception caught but still some error.

Correspondig EVENT Log Entries
Protokollname: Application

Quelle: IIS AspNetCore Module

Datum: 30.08.2019 08:30:28

Ereignis-ID: 1000

Aufgabenkategorie:Keine

Ebene: Fehler

Schlüsselwörter:Klassisch

Benutzer: Nicht zutreffend

Computer: computer

Beschreibung:

Application ‘MACHINE/WEBROOT/APPHOST/apppool’ with physical root ‘D:\wwwroot’ created process with commandline 'D:\wwwroot\net472\universaldashboard.server.exe ’ but failed to listen on the given port ‘36721’

Protokollname: Application

Quelle: Universal Dashboard

Datum: 30.08.2019 08:28:28

Ereignis-ID: 0

Aufgabenkategorie:Keine

Ebene: Informationen

Schlüsselwörter:Klassisch

Benutzer: Nicht zutreffend

Computer: computer

Beschreibung:

Starting Universal Dashboard service.

Dashboard Script: D:\wwwroot\net472…\dashboard.ps1

Assembly Base Path: D:\ wwwroot\net472…\dashboard.ps1

Dashboard Skript throws NO exception

Try {

$dev = $false

$null = Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Scope User -Confirm:$false

New-UDEndpointInitialization -Variable $EiVariables -Module $EiModules

……

Start-UDDashboard -Port $port -Wait -Dashboard $Dashboard -Endpoint $Endpoints -Certificate $cert -PublishedFolder $DownFolder

}

Catch {

$_.Exception.Message | Out-File -FilePath "D:\Temp\automation.txt"

}

Hi @quax

Try and remove the “-port $port” param on your “Start-UDDashboard” and try to let IIS handle the binding.

Old Setting $port=443 and binding in app pool to port 443 Start-UDDashboard … -port $port Wait ==> Error 502.5

New Setting binding in app pool to port 443 Start-UDDashboard -Wait ==> Running without problem .

I will monitor this until Monday and give a feedback on this topic

Thank you for your support

1 Like

Sorry, I didn’t manage to give my feedback at today.

Unfortunately we have not a 100% solution but it looks like a stable workaround.

Currently we have a 502.5 every morning for the first user access. We have a workaround by interactive login of the same user who runs the application pool and access the same page which succeeds and all other users could work.

We are looking for the differences between ‘app-Pool Login’ and interactive login to find a new idea to fix this issue.