Error when starting octopus manager - Windows PowerShell 2.0 or above

image

Hi @tabrahams1,

Thanks for reaching out.

I’ve responded to you via email, please let me know if you’d prefer we work the ticket there or here.

Best,
Jeremy

Hi @jeremy.miller

I appreciate you reaching out.

I would prefer chatting here

regards
T

Sounds good to me!

Carrying on from our email chain I have some further questions:

When you said “I’ve also been trying to follow the manual install prompts. However, I can’t execute the MSIEXEC cmd either.”

Is the screenshot you copied from running the manual powershell commands to install the server?

Can you please send me the list of commands you ran in CMD/PowerShell and the resulting error? (you can censor anything secret or DM me the screenshots/logs/commands)

Please let me know.

Best,
Jeremy

Hi @jeremy.miller

The error I sent was from running the normal install via wizard

regards
T

Hi @tabrahams1,

Thanks for clarifying.

Can you please send me the list of commands you ran in CMD/PowerShell and the resulting error? (you can censor anything secret or DM me the screenshots/logs/commands)

Please let me know.

Best,
Jeremy

this is the PS script im running
msiexec /i C:\Users\tabrahams1admin\Downloads\Octopus.2021.1.7665-x64.msi /quiet /qn INSTALLLOCATION=“C:\Program Files”

getting this is the popup

image

Hi,

Thanks for the information.

Just to make sure we’re on the same page, is Octopus Server getting installed and you are getting errors when trying to create your instance from inside the wizard after it has been installed? (e.g. you cant open Octopus Manager) You can check and see if the files are in place at C:\Program Files\Octopus Deploy\Octopus

Or is this happening when just trying to initially install the application and there are no files in place?

If Octopus Server is installed and you have the files available to you, we should be able to try installing the server with the commands that the manager would run.

"[INSTALLLOCATION]\Octopus.Server.exe" create-instance --instance "<instance name>" --config "<new instance config path>" --serverNodeName "<machine name>"
"[INSTALLLOCATION]\Octopus.Server.exe" database --instance "<instance name>" --connectionString "<database connection string>" --create
"[INSTALLLOCATION]\Octopus.Server.exe" configure --instance "<instance name>" --upgradeCheck "True" --upgradeCheckWithStatistics "True" --usernamePasswordIsEnabled "True" --webForceSSL "False" --webListenPrefixes "<url to expose>" --commsListenPort "10943"
"[INSTALLLOCATION]\Octopus.Server.exe" service --instance "<instance name>" --stop
"[INSTALLLOCATION]\Octopus.Server.exe" admin --instance "<instance name>" --username "<admin username>" --email "<admin email>" --password "<admin password>"
"[INSTALLLOCATION]\Octopus.Server.exe" license --instance "<instance name>" --licenseBase64 "<a very long license string>"
"[INSTALLLOCATION]\Octopus.Server.exe" service --instance "<instance name>" --install --reconfigure --start --dependOn "MSSQLSERVER"

Can you please substitute the [INSTALLLOCATION] with where Octopus.Server.exe is on the machine? (it is likely in the default location C:\Program Files\Octopus Deploy\Octopus)

You will also need to fill in the other parameters. You can make the instance name whatever you choose.

Please let me know how it goes, or if it’s not the case that it’s installed but the wizard is failing.

Best,
Jeremy

Hi @jeremy.miller

When installing via wizard, once it has completed/successful…octopus manager opens and runs the PS check, then only do I get the error.

The only reason I’m trying to install it manually as it was recommended by support team.

regards
T

Hi @tabrahams1,

Just stepping in for Jeremy while he’s signed off for the day.

I noticed from the earlier ticket chain that the output for the command:
powershell.exe -NonInteractive -NoProfile -Command "Write-Output $PSVersionTable.PSVersion" was empty. I believe finding the reason for this will allow for us to understand what’s required for Octopus to run successfully.

From your earlier message:

Could you please test if running the command explicitly defining the PATH for powershell produces an output?
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -NoProfile -Command "Write-Output $PSVersionTable.PSVersion"

It is very strange that it’s working fine for Jenkins, perhaps Jenkins is using the entire path of where Powershell resides instead of checking the PATH for the location.

You also mentioned previously that McAfee is running on this machine but that you have whitelisted the Octopus folder. Would you be able to completely disable this temporarily so we can rule out whether it’s interferring here?

I’ll keep investigating on my end and will keep you posted with any updates.

Best Regards,

Hi @finnian.dempsey

I’ve run the query above, still no output(image attached)

Unfortunately I don’t have the ability to disable mcafee on the server, in saying this my VM machine runs the same mcafee and octopus installed successfull.

However I cant have octopus running on my VM, it needs to run on our deployment servers.

Hi team, any additional information required from me?

Hi @tabrahams1,

I’m stepping in for Finnian and Jeremy, due to them being offline currently!
I was wondering if you would be able to test something for me, please?

The standard command to display the PowerShell version appears to be returning no result whatsoever. Would you be able to try this inside PowerShell to see what the result is, please?

powershell.exe -NonInteractive -NoProfile -Command Write-Output $PSVersionTable.PSVersion.Major

The main difference being, I’ve added ‘.Major’ to the object to reference an exact end-point and removed the quotes after the ‘-Command’ section.

Hopefully, this provides a different result to allow us to troubleshoot further.
Thanks a lot for your patience so far regarding this issue.

Kind Regards,
Adam

Hi @adam.hollow

No difference based on different PS cmd.

Thanks for trying that!

Another option that may be valid is this one:
powershell -command "(Get-Variable PSVersionTable -ValueOnly).PSVersion"

It’s strange that the previous commands show no result on this machine.

I wonder, on the machine where you have successfully installed Octopus previously, does it behave similarly when using these commands within PowerShell?

Kind Regards,
Adam

Hi @adam.hollow

The new cmd is not returning anything either, however I have run a $PSVersionTable cmd and it returns information - as per image.

Does the octopus cmd being run, what does it represent? if there is no return is it fundamental to octopus functioning?

wrt to my VM environment where I installed Octopus successfully. the PS cmd check does return a value of - System.Collections.Hashtable.PSVersion.

on our deployment servers it returns none

Hi @tabrahams1,

Seeing as the installer finishes and the wizard part is failing, you should be able to install this manually using the commands I listed above.

The easiest way to get the commands you need would be to use the wizard on a working machine, then at the end there is a “Show Script” button. If you click this, you will be able to copy paste the commands to run on the machine giving you issues.


You would then take these commands to your non-working machine (along with the config file shown in the first command[place it in the location shown in the command or change the location in the command]), and run the commands. You may need to modify some of the parameters like the machine name, etc.

This should bypass whatever check the wizard is failing on and get Octopus up and running.

Please let me know if that works for you or if it also errors.

Best,
Jeremy

Hi @jeremy.miller

Thanks for the above. unfortunately even get to this point before the PS error.

Below represents how far I get.

  1. Run the install file…

image

  1. Octopus folder path
    image

  2. Install
    image

  3. Wizard has completed the install…as soon as I hit finish the PS error will occur.
    image

  4. PS error
    image

So the instructions above I cant do unfortunately

Is there another way that you can possible advise?

regards
T

Hi Team

Any other recommendation I can try?

regards
T