Release Automation

  • 1.  Agent not able to found the sshpass

    Posted Jul 17, 2017 12:29 PM

    Hello All,

     

    I am using the run command line action running the following command 

    sshpass -p '*****' sftp -o StrictHostKeyChecking=no saoap01@dropbox.arcot.com:/ops/home/ops/aokops/targetdir </tmp/folder.txt

    In one of environment where the agent is running as user velfac7 the command is running fine giving the expected result. But in the other environment the same command is failing with the output as 

    sshpass:Failed to run command:No such file or directory

    in the above environment the agent is running as root .

     

    Any clue what could be the reason for not finding the sshpass command in the second environment ???

     

    -Regards

      Mohit



  • 2.  Re: Agent not able to found the sshpass

    Posted Jul 18, 2017 06:20 PM

    Hey Mohit,

     

    What is the absolute path to the sshpass command in the second environment('whereis sshpass' .. or 'which sshpass') should reveal this.

     

    I would imagine it is likely in the $PATH env variable set by root(or global) profile, however the agent may not inherit all these.  If you could do the following test real quick in the second/non-working environment:

     

    1. Create another process with a run command line action

    2. set the command to run as:  echo $PATH

     

    If you compare the output from both agents do you get different results(one with sshpass in the environment PATH var)?

     

     

    Let me know if you have any questions, thanks.

     

    Jeremy



  • 3.  Re: Agent not able to found the sshpass

    Posted Jul 18, 2017 06:23 PM

    I forgot to add as well -- if you provide the second agent the full path to sshpass in the run command line action, eg;

     

    /usr/bin/sshpass -p '*****' sftp -o StrictHostKeyChecking=no saoap01@dropbox.arcot.com:/ops/home/ops/aokops/targetdir </tmp/folder.txt

     

    assuming the above is the correct path, does it exec properly?

     

     



  • 4.  Re: Agent not able to found the sshpass

    Posted Jul 19, 2017 05:13 AM

    Hello Nelson,

     

    I have added the absolute path to the sshpass binary. i.e. The command is

    /usr/bin/sshpass -p '*****' sftp -o StrictHostKeyChecking=no saoap01@dropbox.arcot.com:/ops/home/ops/aokops/targetdir </tmp/folder.txt

     

    But it is still giving the same error

    Std Err Outputsshpass: Failed to run command: No such file or directory

     

    -Regards

      Mohit



  • 5.  Re: Agent not able to found the sshpass

    Broadcom Employee
    Posted Jul 19, 2017 07:07 AM

    Hi Mohit,

    To find out if the problem is RA related, try running the command manually (outside RA). Does it give you the same error while being logged on as the user under which it fails within RA context?

    regards,

    Leo



  • 6.  Re: Agent not able to found the sshpass

    Posted Jul 19, 2017 08:12 AM

    Hello Leo,

     

    I have already tried that, when we run manually everything works fine.We have run the command with the same user with which the Nolio agent is running.

     

    -Regards

      Mohit



  • 7.  Re: Agent not able to found the sshpass

    Broadcom Employee
    Posted Jul 19, 2017 09:42 AM

    Maybe you need to do a 'which sftp' and provide the path to it in your command too. I did some google searches on this message and it seems like it can be related to either not finding the sshpass binary or ssh, sftp, rsync, etc.. 

     

    Regards,

    Gregg



  • 8.  Re: Agent not able to found the sshpass
    Best Answer

    Posted Jul 31, 2017 03:18 AM

    Hello All,

     

    I am able to resolve the issue by restarting the Agent service.  After the SSHPASS is installed , the agent service was not restarted so it was not able to locate the sshpass.

     

    -Regards

      Mohit



  • 9.  Re: Agent not able to found the sshpass

    Broadcom Employee
    Posted Jul 31, 2017 09:23 AM

    Thanks for coming back and letting us know. I've marked your answer as the correct answer.