This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Linux script execution error. There was an error processing the request.

This scream for help could actually have one of two different err messages, I'll try to explain:

I'm attempting to execute a python script in a SAM template deployed to an agent running on Raspbian(Stretch).

python ${SCRIPT}

print "Statistic.Pressure: 14"

print "Message.Pressure: Pressure"

When I test from within the template editing process, I get this:

Output Result:ND Get Output Failed:{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}

When viewing the application monitor after a poll attempt, the err on the component is shown as:
"Linux script execution error. No fields were recognized in the script output"

When I look at the debug log for the application on the agent, I see this:

pastedImage_4.png

Which leaves me confused.

I understand the err on the application page, because the outputs(Static.Pressure and Message.Pressure) are not defined.
But I can't define the output within the template if the output is not returned.
The script seems as though it is being interpreted absolutely perfectly because in the debug file, the output is shown as expected, without error.

I just can't figure out why that output isn't *seeming to be brought back when editing the template.

Any thoughts, ideas, or suggestions would be greatly appreciated.

  • I have the same issue running a bash script to an Ubuntu 16 box.

    Please could you share the logfile name and location above so I can check the contents on my system.

    Many Thanks

  • In your template do you have any #Outputs defined?

  • Hi Ian,

    Thank you for the prompt reply.

    I will check that in the morning.

    I assume you mean under Script Output #1

    Will let you know what I have configured there.

  • No, no outputs are defined in the template.  The only way I know how to create them via the script execution mechanism in the edit-template interface, which is where the error is being encountered.

  • The debug output for mine (polling via agent) was here:

    /opt/SolarWinds/Agent/bin/appdata/Logs/ApplicationLogs/Appidxxxxxx

  • So, I've made progress, moving past the "...error processing request...." and can execute the script, which utilizes some modules outdise of what is included in the base Raspbian(Stretch) image from raspberry.org, without error when I select "agentless" in the template.   It is when I switch the execution preference to "Agent" that I get the following err in the debug output:

    ImportError: No module named 'ruuvitag_sensor'

    from the Admin guide, I do gather that the agent has it's own "lightly provisioned" user used to run the services, but the guide also says:

    "....if you do not enter credentials or select Inherit from node, the monitor executes the script under the agent credentials(SWIAgent).   These credentials may not have the elevated permissions required for executing scripts."

    I found nothing else in the Admin PDF that goes into further detail than this in respect to the execution environment that SAM Unix/Linux scripts are executed within.

    For it to be specifically noted that scripts will be executed under the 'SWIAgent' credentials IF no other credentials are specified within the template/component, it seems as though I should clearly be able to expect that if credentials ARE specified for the template/component that the script would be executed under the specified credentials, which is why I am confused that I can execute, without error, the script using the credential going the Agentless execution route, but get errors when selecting the component be executed via the Agent, hence my search for an understanding of what actual, resulting differences there actually are between executing the script successfully locally or via SSH, compared to with the agent, credential being a constant.

    All of that said, I am admittedly a Windows/C#/.Net/PowerShell guy trying to find my way through this new Linux stuff. ...so go easy on me!

  • I am running into this exact same problem with the Orion GUI - however it strangely seems to be limited to a few pollers.

    Even odder, the same error appears in the Edit Template screen EVEN when the script was previously established and is currently polling fine!


  • Running into the same issue with AIX.  Some work just fine, but some nodes receive this error.  I can run the script manually through SSH to the node just fine.

  • I had this issue with AIX as well.  The issue was the file /opt/SolarWinds/Agent/bin/cert/SWI-Agent-SecureString-[RANDOMCHARS]

    I seen in the log it was looking for a cert with one name but the actual cert had another.  The only way I found that fixed it (copying the file did not work) was to create a symbolic link with the name SolarWinds was looking for to the cert.  For example

    ln -s /opt/SolarWinds/Agent/bin/cert/SWI-Agent-SecureString-76845d2a-1315-440e-ce81-261d7dbb89af.pem /opt/SolarWinds/Agent/bin/cert/SWI-Agent-SecureString-148e71dd-5421-320a-f1e1-1123f155a779.pem

  • I have also seen this issue on some Linux servers and even limiting the script in it's entirety to this:

    #!/bin/sh

    echo "Message: Test"

    echo "Statistic: 0"

    exit 0

    Still gives the same error message...