Apple Brew Manager - Rescan Host Error

Support forums for the Habitat Automate plugin
Post Reply
argyris
Posts: 8
Joined: Wed Jan 27, 2021 4:14 pm
3

Apple Brew Manager - Rescan Host Error

Post by argyris »

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

User avatar
Cubert
Posts: 2582
Joined: Tue Dec 29, 2015 7:57 pm
9
Contact:

Re: Apple Brew Manager - Rescan Host Error

Post by Cubert »

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.

argyris
Posts: 8
Joined: Wed Jan 27, 2021 4:14 pm
3

Re: Apple Brew Manager - Rescan Host Error

Post by argyris »

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

User avatar
Cubert
Posts: 2582
Joined: Tue Dec 29, 2015 7:57 pm
9
Contact:

Re: Apple Brew Manager - Rescan Host Error

Post by Cubert »

What it looks like is that when you execute

Code: Select all

 '/usr/local/bin/brew leaves 
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

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
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"

argyris
Posts: 8
Joined: Wed Jan 27, 2021 4:14 pm
3

Re: Apple Brew Manager - Rescan Host Error

Post by argyris »

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
HBrew-Running on Mac Terminal.png
HBrew-Running on Mac Terminal.png (29.7 KiB) Viewed 4537 times
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
HBrew-Running on Automate.png
HBrew-Running on Automate.png (10.76 KiB) Viewed 4537 times
Let me know if you need more info and thank you for the quick response!!

argyris
Posts: 8
Joined: Wed Jan 27, 2021 4:14 pm
3

Re: Apple Brew Manager - Rescan Host Error

Post by argyris »

Is there an update on this or any other troubleshooting steps i should do?

Post Reply

Return to “Habitat”