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