I installed Homebrew successfully and also verified that i can install a package ( google chrome ) on the local agent by running brew install --cask google-chrome on the terminal.
When i try to RESCAN HOST on the automate agent console i am getting the following error:
The Script(6055) failed in the Then section at step 7. The reason: Script String Manipulation Failed. I tested this on two different machines and the out come is the same.
Am i missing something? Can you please assist to troubleshoot.
Thank you
Agent OS: MaCOS 11.1
Automate Version: 21.0.27
Habitat 1.0.0.59
Apple Brew Manager - Rescan Host Error
Re: Apple Brew Manager - Rescan Host Error
sure can,
Please send us the command logs you have for agent during the install. Also the script logs for that install.
Screenshots will be fine. We need to see where it is failing and what the return was.
Please send us the command logs you have for agent during the install. Also the script logs for that install.
Screenshots will be fine. We need to see where it is failing and what the return was.
Re: Apple Brew Manager - Rescan Host Error
SCRIPT LOG:
The Script(6055) failed in the Then section at step 7. The reason: Script String Manipulation Failed
Script: Maintenance\Habitat Apple Brew Manager- Starting at Server Time: Wednesday, February 10, 2021 4:35:49 PM
IF Variable CheckValueOne (P1): CMD Comparer (P2): 2 ValueTwo (P3): SCAN T: 0.7594238
L1 IF Console Logged OnUser (P1): T: 0.7594238
L4 Script NoteNote (P1): :ONCONSOLE T: 0.7594238
L5 Console ShellCommand (P1): '/usr/local/bin/brew leaves | awk '{ print "(1007,||" $1 "||)...' ConsoleNumber (P2): 0 T: 0.7594238
L6 Script String FunctionsValueOne (P1): 8 Operator (P2): OK ValueTwo (P3): , Variable (P4): T: 207.6786686
L7 Script String FunctionsValueOne (P1): 0 Operator (P2): OK ValueTwo (P3): -1 Variable (P4): 0 T: 207.6786686
COMMAND LOG:
*%2fusr%2flocal%2fbin%2fbrew+leaves+%7c+awk+%27%7b+print+%22(1007%2c%7c%7c%22+%241+%22%7c%7c)%2c%22%7d%27|0-OK
The Script(6055) failed in the Then section at step 7. The reason: Script String Manipulation Failed
Script: Maintenance\Habitat Apple Brew Manager- Starting at Server Time: Wednesday, February 10, 2021 4:35:49 PM
IF Variable CheckValueOne (P1): CMD Comparer (P2): 2 ValueTwo (P3): SCAN T: 0.7594238
L1 IF Console Logged OnUser (P1): T: 0.7594238
L4 Script NoteNote (P1): :ONCONSOLE T: 0.7594238
L5 Console ShellCommand (P1): '/usr/local/bin/brew leaves | awk '{ print "(1007,||" $1 "||)...' ConsoleNumber (P2): 0 T: 0.7594238
L6 Script String FunctionsValueOne (P1): 8 Operator (P2): OK ValueTwo (P3): , Variable (P4): T: 207.6786686
L7 Script String FunctionsValueOne (P1): 0 Operator (P2): OK ValueTwo (P3): -1 Variable (P4): 0 T: 207.6786686
COMMAND LOG:
*%2fusr%2flocal%2fbin%2fbrew+leaves+%7c+awk+%27%7b+print+%22(1007%2c%7c%7c%22+%241+%22%7c%7c)%2c%22%7d%27|0-OK
Re: Apple Brew Manager - Rescan Host Error
What it looks like is that when you execute the return is just an "OK" so the string manipulation function failed to parse any usable data from "OK".
The second odd thing I see that I've not see before is the special characters being converted like so
Try running this manually at the command prompt or in a terminal on the Apple agent and see if it executes as desired. If not try running just "/usr/local/bin/brew leaves" as it is.
Does that return any data? If so have a look at the command log again to see if it converted "/usr/local/bin/brew leaves" before execution or did it execute like "/usr/local/bin/brew leaves"
Code: Select all
'/usr/local/bin/brew leaves
The second odd thing I see that I've not see before is the special characters being converted like so
Code: Select all
*%2fusr%2flocal%2fbin%2fbrew+leaves+%7c+awk+%27%7b+print+%22(1007%2c%7c%7c%22+%241+%22%7c%7c)%2c%22%7d%27|0
Try running this manually at the command prompt or in a terminal on the Apple agent and see if it executes as desired.
Code: Select all
%2fusr%2flocal%2fbin%2fbrew+leaves+%7c+awk+%27%7b+print+%22(1007%2c%7c%7c%22+%241+%22%7c%7c)%2c%22%7d%27
Does that return any data? If so have a look at the command log again to see if it converted "/usr/local/bin/brew leaves" before execution or did it execute like "/usr/local/bin/brew leaves"
Re: Apple Brew Manager - Rescan Host Error
Running on Mac terminal:
Running %2fusr%2flocal%2fbin%2fbrew+leaves+%7c+awk+%27%7b+print+%22(1007%2c%7c%7c%22+%241+%22%7c%7c)%2c%22%7d%27 gives and error " Command not found"
Running /usr/local/bin/brew leaves see picture below Running on Automate:
I first run %2fusr%2flocal%2fbin%2fbrew+leaves+%7c+awk+%27%7b+print+%22(1007%2c%7c%7c%22+%241+%22%7c%7c)%2c%22%7d%27
and then
/usr/local/bin/brew leaves
Let me know if you need more info and thank you for the quick response!!
Running %2fusr%2flocal%2fbin%2fbrew+leaves+%7c+awk+%27%7b+print+%22(1007%2c%7c%7c%22+%241+%22%7c%7c)%2c%22%7d%27 gives and error " Command not found"
Running /usr/local/bin/brew leaves see picture below Running on Automate:
I first run %2fusr%2flocal%2fbin%2fbrew+leaves+%7c+awk+%27%7b+print+%22(1007%2c%7c%7c%22+%241+%22%7c%7c)%2c%22%7d%27
and then
/usr/local/bin/brew leaves
Let me know if you need more info and thank you for the quick response!!
Re: Apple Brew Manager - Rescan Host Error
Is there an update on this or any other troubleshooting steps i should do?