Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pairing service provides not working PowerShell script #12

Closed
jhd85 opened this issue Oct 29, 2023 · 13 comments
Closed

Pairing service provides not working PowerShell script #12

jhd85 opened this issue Oct 29, 2023 · 13 comments

Comments

@jhd85
Copy link

jhd85 commented Oct 29, 2023

Hi

Just installed openrport version 0.9.13 and added the new pairing service URL https://pairing.openrport.io. When I try to install a Win 10 Pro client in PowerShell run as administrator I get this output:

* Testing connection to https://rport.<redacted>/ws has succeeded.

#
# -------------!!   ERROR  !!-------------
#
# Installation or updare of rport finished with errors.
#

Try the following to investigate:
1) sc query rport

2) open C:\Program Files\rport\rport.log

3) READ THE DOCS on https://kb.rport.io

4) Request support on https://github.com/cloudradar-monitoring/rport-pairing/discussions/categories/help-needed

New-Object : Exception calling ".ctor" with "3" argument(s): "End of Central Directory record could not be found."
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1:934 char:23
+ ... ipArchive = New-Object -TypeName System.IO.Compression.ZipArchive -Ar ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

I see there are quite a few changes with the old script. Any idea what is going on?

Thanks!

@jhd85
Copy link
Author

jhd85 commented Oct 30, 2023

Found the issue it seems. In the downloaded PS script the client URL from rport.io is still used which provides an msi file. It gets saved as a zip and then the Expand-Archive borks when trying to extract.

@HiFiPhile
Copy link

HiFiPhile commented Nov 13, 2023

Yep, can confirm download URL is not updated:

if ($v)
{
    # Set a specific version for the download url
    $url = "https://github.com/cloudradar-monitoring/rport/releases/download/$( $v )/rport_$( $v )_Windows_x86_64.zip"
    Write-Output "* Downloading  $( $url ) ."
}
else
{
    $url = "https://downloads.rport.io/rport/$( $release )/?arch=Windows_x86_64&gt=$currentVersion"
}

I saw URL has been updated in functions.ps1, maybe the latest version is not deployed ?

@alhdo
Copy link

alhdo commented Nov 13, 2023

The update is coming for Windows. I created the msi package but not signed yet. I will update you when the windows installer is ready. Meanwhile you can use manual install. The last release of openrport includes msi and zip for windows.

@alhdo
Copy link

alhdo commented Nov 14, 2023

The pairing has been updated and now support windows installer. I ll go an close the issue, feel free to reopen it if you get any more issue.
Thanks

@alhdo alhdo closed this as completed Nov 14, 2023
@jhd85
Copy link
Author

jhd85 commented Nov 14, 2023

Thanks!

@HiFiPhile
Copy link

I think there is a missing comma at line 19.

At C:\Windows\TEMP\rport-update.ps1:19 char:15
+     [Switch]$r
+               ~
Missing ')' in function parameter list.
At C:\Windows\TEMP\rport-update.ps1:22 char:1
+ )
+ ~
Unexpected token ')' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingEndParenthesisInFunctionParameterList

@alhdo
Copy link

alhdo commented Nov 14, 2023

You are right i will push an update to fix it. Thanks for the report

@HiFiPhile
Copy link

Another issue is when tacoscript is installed, when updating:

* Downloading  https://downloads.openrport.io/rport/stable/latest.php?filter=Windows_x86_64.msi&gt=1.0.1.
* Download finished and stored to C:\Windows\temp\rport_stable_Windows_x86_64.msi .
* Migrating to MSI installation
* Scripts are already configured. Not changing.
* Tacoscript already installed to C:\Program Files\tacoscript\bin\tacoscript.exe

#
# -------------!!   ERROR  !!-------------
#
# Installation or updare of rport finished with errors.
#

Error in line 934
    Exception calling ".ctor" with "3" argument(s): "End of Central Directory record could not be found."

Seem the URL in Install-Tacoupdate isn't managed yet.

@gusman21
Copy link

similar issue with windows upgrade script. Script previously worked with rport.io url.

script contents:
cd $env:temp [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $url="https://pairing.openrport.io/update" Invoke-WebRequest -Uri $url -OutFile "rport-update.ps1" powershell -ExecutionPolicy Bypass -File .\rport-update.ps1 rm .\rport-update.ps1 -Force

output:

-------------!! ERROR !!-------------

Installation or updare of rport finished with errors.

Error in line 933
Exception calling ".ctor" with "3" argument(s): "End of Central Directory record could not be found."

Try the following to investigate:

  1. sc query rport

  2. open C:\Program Files\rport\rport.log

  3. READ THE DOCS on https://kb.openrport.io

  4. Request support on https://github.com/openrport/rport-pairing/discussions/categories/help-needed

@JamieMcH
Copy link

I am having the same issue as @gusman21
I have tracked the issue to the tacoupdate.zip and tacoinstall.zip archives being empty when downloaded.
This throws an error when trying to extract.

Current workarrount is to run the powershell script with -m to not install/update tacoscript.

cd $env:temp
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$url="https://pairing.openrport.io/update"
Invoke-WebRequest -Uri $url -OutFile "rport-update.ps1"
powershell -ExecutionPolicy Bypass -File .\rport-update.ps1 -m
rm .\rport-update.ps1 -Force

@gusman21
Copy link

Current workarrount is to run the powershell script with -m to not install/update tacoscript.

Tried the -m and got the below.

Downloading  https://downloads.openrport.io/rport/stable/latest.php?filter=Windows_x86_64.msi&gt=0.9.12.
* Download finished and stored to C:\Windows\temp\rport_stable_Windows_x86_64.msi .
* Migrating to MSI installation
* Scripts are already configured. Not changing.
* Monitoring section already present in configuration file.
* Monitoring already enabled.
* Looking for script interpreters.
* 1 script interpreters found.
: powershell7 already present in configuration.
: Getting list of Network adapters with 'Get-NetIPAddress' failed. Notwork monitoring not activated.
* File reception has been disabled.
* Watchdog Integration already present in configuration file.
[SC] ChangeServiceConfig SUCCESS
[SC] ChangeServiceConfig2 SUCCESS

#
# -------------!!   ERROR  !!-------------
#
# Installation or updare of rport finished with errors.
#

Error in line 1070
    Cannot find path 'C:\windows\temp\rport-update\rport.exe' because it does not exist.

@gusman21
Copy link

gusman21 commented Nov 28, 2023

Current workarrount is to run the powershell script with -m to not install/update tacoscript.

Tried the -m and got the below.

seems that error was only on my first alphabetical client which was windows 7. windows 10 clients look good. thanks for the -m.

@alhdo
Copy link

alhdo commented Nov 28, 2023

I will push an update in the script soon to solved this issue.
Thanks for reporting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants