Error messages are no longer displayed


We started to have an issue with Octopus after we did an inplace update to Windows Server 2019 Datacenter. Since then when an error is triggered we can only see this:
and the rest of the error message is eaten by something. While trying to fix that we found this post:

So we understood the fact that there was a problem because we had Windows Server 2019 and .NET 4.7.2 and we updated it to .NET 4.8, but this didn’t changed anything in the behaviour of Octopus.

Current config that we have is:
Windows Server 2019 Datacenter;
Octopus 2023.1.9781;
.NET 4.8;
Powershell 5.1;

We were wondering what else can we do in order to resolve this.

Thank you.

Best Regards,

Hi @mihai,

Thanks for reaching out and sorry to hear you’re experiencing issues.

Would you be able to elaborate more on what errors you’re experiencing and during which type of deployment?

Do you have any raw task logs that you’d be willing to share for deployments where you’ve experienced this error?

Any additional information you can provide would be appreciated and go a long way to assisting you troubleshoot the issue.

Kind Regards,

Hello @adam.hollow ,

Thank you for looking into this.
For the moment I can provide only this piece of the raw log:

13:25:40 Error | NotSpecified:
13:25:40 Error | At E:\OctopusHome\Work\20230526132528-496740-1482\Script.ps1:24 char:9
13:25:40 Error | + $temp | kubectl apply -f - 2>&1
13:25:40 Error | + ~~~~~~~~~~~~~~~~~~~~~~~
13:25:40 Error | at , E:\OctopusHome\Work\20230526132528-496740-1482\Script.ps1: line 24
13:25:40 Error | at , : line 1
13:25:40 Error | at , E:\OctopusHome\Work\20230526132528-496740-1482\Octopus.FunctionAppenderContext.ps1: line 211
13:25:40 Error | at , E:\OctopusHome\Work\20230526132528-496740-1482\Bootstrap.Octopus.FunctionAppenderContext.ps1: line 4331
13:25:40 Error | at , : line 1
13:25:40 Error | at , : line 1
13:25:40 Verbose | Process C:\WINDOWS\system32\WindowsPowershell\v1.0\PowerShell.exe in E:\OctopusHome\Work\20230526132528-496740-1482 exited with code 1
13:25:40 Verbose | Updating manifest with output variables
13:25:40 Verbose | Updating manifest with action evaluated variables
13:25:40 Fatal | The remote script failed with exit code 1

As you can see, at the beginning is an error saying “13:25:40 Error | NotSpecified:” but there isn’t any error output next to it, so we can’t understand what’s happening and where the problem is.
These kind of behaviour with “NotSpecified” appeared after we did an update from Windows Server 2012 to Windows Server 2019, we didn’t experienced such a thing before.

Do you know how we can solve this?
Thank you.

Best Regards,

Hi Mihal,
Thanks for sending through that log snippet.

On first glance it appears that $temp is not being set correctly and therefore not being evaluated, giving an error. Has anything changed with the script since it last ran successfully?

To dig a bit deeper, could you send us the process JSON and the raw task log for the task? You can upload them here securely:

JSON: Get the raw output from a deployment process - Octopus Deploy
Raw: Get the Raw Output From a Task - Octopus Deploy

Do let us know when they have uploaded as we don’t get notification when new files arrive.

Kind regards,

Hello @paraic.oceallaigh ,

I’ve just uploaded the raw output and Json file, as requested. These 2 files are from a diferent project but the behaviour is the same, we can not see the error messages.

Thank you.

Best Regards,

Hi Mihai,
Thanks for uploading those files.

At this stage since it doesn’t seem related to the script or the variables its setting, we need to do some more analysis.

Could you run the following from the above Github issue to see if we can clarify exactly what is the environment? We may have a regression that we need to address.

If the workarounds don’t work, please run the following powershell commands and send the output to support referencing this issue:

Get-ItemProperty “HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion”
Get-ItemProperty “HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full”
Also please retrieve and build GitHub - droyad/PSProcessTerminateDemo: Demo app to demonstrate a powershell/process execution problem and run the exe on the server and let us know what the output is. (We get you to build it so you can see what is going to be run).

Include deployment logs if possible.

That would be very helpful and give us more exact info.

Kind regards,

Hi Mihai,
Just to keep this one moving, in the case its not a regression on that GH issue, could you do the following for us?

  • Can you run the AWS command outside of Octopus and see if the Paths are correct and variables are set correctly? the same for the kubectl command on the other script.
  • Are you able to upload the original task log for the first error? We can compare both logs to see if there are correlating issues.
  • a long shot but perhaps using a later PS would help. You can specify the PS version here:
    PowerShell Core - Octopus Deploy
  • there is a line showing some potential variable substitution on the k8s secrets script - was anything changed in the script right before it executed?
    Performing variable substitution on 'E:\OctopusHome\Work\20230523190214-495850-240\kubernetes\k8s-secrets.ps1'

Let us know how get on with the above.

Kind regards,

Hello Paraic,

My apologizes for the deplayed answer. Please find below the output:

Get-ItemProperty “HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion”

SystemRoot : C:\WINDOWS
BuildBranch : rs5_release
BuildGUID : ffffffff-ffff-ffff-ffff-ffffffffffff
BuildLab : 17763.rs5_release.180914-1434
BuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
CompositionEditionID : ServerDatacenter
CurrentBuild : 17763
CurrentBuildNumber : 17763
CurrentMajorVersionNumber : 10
CurrentMinorVersionNumber : 0
CurrentType : Multiprocessor Free
CurrentVersion : 6.3
EditionID : ServerDatacenter
EditionSubManufacturer :
EditionSubstring :
EditionSubVersion :
InstallationType : Server
InstallDate : 1684077044
ProductName : Windows Server 2019 Datacenter
ReleaseId : 1809
SoftwareType : System
UBR : 1
PathName : C:\WINDOWS
ProductId : 00430-00000-00000-AA500
DigitalProductId : {164, 0, 0, 0…}
DigitalProductId4 : {248, 4, 0, 0…}
RegisteredOrganization : Ubisoft
RegisteredOwner : Ubisoft
InstallTime : 133285506441310192
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT
PSChildName : CurrentVersion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

Get-ItemProperty “HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full”
CBS : 1
Install : 1
InstallPath : C:\Windows\Microsoft.NET\Framework64\v4.0.30319
Release : 528049
Servicing : 0
TargetVersion : 4.0.0
Version : 4.8.03761
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4
PSChildName : Full
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry

Best Regards,

Hi @mihai,

Thanks for sending over the results of that command.

Were you able to try the other suggestions/requests that Paraic suggested here?

The results of those should hopefully help us get closer to what’s going on.

Kind Regards,

Hello Paraic,

Please find requested info below:

aws secretsmanager list-secrets --filter Key=“name”,Values=“$_variablesPath”
“SecretList”: []

$temp | kubectl apply -f - 2>&1
pod/pstest created
(contents of $temp:
write-host $temp
apiVersion: v1
kind: Pod
name: pstest

  • name: pstest
    image: [REDACTED]
    • name: pstest
      mountPath: “/etc/pstest”
      readOnly: true
  • name: pstest
    secretName: mysecret
    optional: true)
  1. I have this error message when trying to upload a new file: “Access has expired, please contact”.
    Can you please provide a new link?

  2. We will take this into consideration.

  3. There were no changes done on our scripts. These issues appeated right after we did Windows server upgrade.

Thank you.

Best Regards,

Hey @mihai,

Apologies, you can upload to this new link here: Support Files | Mihai.

Kind Regards,

Hey @adam.hollow, @paraic.oceallaigh,

I’ve just attached the file. (ServerTasks-496740.log.txt)
Thank you.

Best Regards,