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:
“NotSpecified:”
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 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.
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:
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.
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.
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.
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'
I have this error message when trying to upload a new file: “Access has expired, please contact support@octopus.com”.
Can you please provide a new link?
We will take this into consideration.
There were no changes done on our scripts. These issues appeated right after we did Windows server upgrade.