netdata / msi-installer

Netdata installer for Windows using WSL2
GNU General Public License v3.0
21 stars 2 forks source link

Installation log #12

Closed hugovalente-pm closed 1 year ago

hugovalente-pm commented 1 year ago

When installing from the command line (with the command below) it would be nice to see some output of the installation on the window you triggered it or leave the last one open pending a user "enter" or something to see some output.

msiexec.exe /i netdata.msi TOKEN=jyx4ymCG5goYv96cG4cZuMx9kT371_bIj8nmqW-HCN267fVfT8no8geHnq30H4SumIhQrDiwCrc5-iJrSj31SLmTV3fNxrJJ1gZMBmjAhCvLNslYtetAsj6zleaKXBvHRH_ofSc URL=https://app.netdata.cloud/
dfpr commented 1 year ago

Leaving a terminal open would interfere with unattended installations, I'll add a logging output file to the installer.

cakrit commented 1 year ago

Please update here and document in the README when the logging output file is there.

cakrit commented 1 year ago

@dfpr reminder that we still need the logfile. Installer didn't work and I don't know why.

dfpr commented 1 year ago

@cakrit I'm working on this right now, I'll finish soon

cakrit commented 1 year ago

noob question, isn't it possible to add our log (debug) messages to the output of msiexec /i netdata.msi /L*vx "C:\folder\ExampleLogFilename.txt"

cakrit commented 1 year ago

I mean, instead of doing our own thing...

dfpr commented 1 year ago

noob question, isn't it possible to add our log (debug) messages to the output of

msiexec /i netdata.msi /L*vx "C:\folder\ExampleLogFilename.txt"

Usual msi logs include file operations and return codes of actions, output for scripts won't appear there so there's a need for saving a log file outside Windows Installer.

cakrit commented 1 year ago

Ok, thanks.

dfpr commented 1 year ago

Installation log now saved to c:\netdata.log, README has been updated.

cakrit commented 1 year ago

I see garbage in netdata.log. The following is from notepad++, MS Word doesn't know what to do with it.

image
dfpr commented 1 year ago

I see garbage in netdata.log. The following is from notepad++, MS Word doesn't know what to do with it.

image

Might be that wsl.exe outputs double byte characters when ansi is expected. Send me the log please.

cakrit commented 1 year ago

Here it is cleaned up (installation failed): netdata.log

Here is the original: netdata.log

I see that Wordpad is able to open both, actually, those nulls (\x00) show up as extra spaces.

dfpr commented 1 year ago

wsl.exe is outputting unicode, check https://github.com/microsoft/WSL/issues/4607 .The fix shown there didn't work for me thou. For now the null character can be removed for readability. I'll work on the installation failed issue first before fixing this.

cakrit commented 1 year ago

As mentioned in #10 the log also includes some errors that aren't really errors.

dfpr commented 1 year ago

I've improved the log file to show the least of errors, what might remain are faux error messages unrelated to the installation and caused by incorrect return codes plus unexpected unicode output from wsl.exe

cakrit commented 1 year ago

Are the following "faux error messages"? Any suggestions on how to get rid of them?

SUCCESS: Specified value was saved.
ADDING SCRIPTS TO PATH
cmd.exe : ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
At C:\Netdata\install.ps1:166 char:2
+     cmd.exe /c setx /m PATH "%PATH%;C:\Netdata"
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (ERROR: Invalid ...an '2' time(s).:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Type "SETX /?" for usage.
STARTING AGENT
cmd.exe : 2022-11-21 14:39:54: netdata INFO  : MAIN : CONFIG: cannot load cloud config 
'/var/lib/netdata/cloud.d/cloud.conf'. Running with internal defaults.
At C:\Netdata\install.ps1:193 char:1
+ cmd.exe /c wsl -d netdata netdata
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (2022-11-21 14:3...ernal defaults.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
dfpr commented 1 year ago

Are the following "faux error messages"? Any suggestions on how to get rid of them?

SUCCESS: Specified value was saved.
ADDING SCRIPTS TO PATH
cmd.exe : ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
At C:\Netdata\install.ps1:166 char:2
+     cmd.exe /c setx /m PATH "%PATH%;C:\Netdata"
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (ERROR: Invalid ...an '2' time(s).:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Type "SETX /?" for usage.
STARTING AGENT
cmd.exe : 2022-11-21 14:39:54: netdata INFO  : MAIN : CONFIG: cannot load cloud config 
'/var/lib/netdata/cloud.d/cloud.conf'. Running with internal defaults.
At C:\Netdata\install.ps1:193 char:1
+ cmd.exe /c wsl -d netdata netdata
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (2022-11-21 14:3...ernal defaults.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

I don't experience this issue but it should be fixed now for the setx command . Also, installation script window doesn't show misleading red text now.

cakrit commented 1 year ago

Yesterday's build had the following:

ADDING SCRIPTS TO PATH
cmd.exe : ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
At C:\Netdata\install.ps1:167 char:2
+     cmd.exe /c setx /m PATH "%PATH%;C:\Netdata" | Out-Null
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (ERROR: Invalid ...an '2' time(s).:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Type "SETX /?" for usage.
dfpr commented 1 year ago

I need the full log

dfpr commented 1 year ago

Path is added now through Windows Installer, uninstaller can fix old leftover entries.

cakrit commented 1 year ago

I'm closing this and will create a new one if I see any new weird things.