Forum Discussion

b_kodan_313047's avatar
b_kodan_313047
Icon for Nimbostratus rankNimbostratus
Nov 10, 2017

SFT external monitor is failing wiht 'OSError: [Errno 2] No such file or directory'

Hi,

I have created new external monitor for SFTP and it is working when i am executing same from cli. But monitor is failing. Monitor details

!/bin/bash

IP=

echo ${1} | sed 's/::ffff://'
PORT=${2}

sftp -o PubkeyAuthentication=yes -o IdentityFile=/root/.ssh/id_rsa -b /home/sftpmonitor.input -o Port=${PORT} sfglb@{IP} | grep 'test' 2>&1 > /dev/null

mark node UP if expected response was received

if [ $? -eq 0 ] then echo "UP" fi

run util test-monitor ext-sfg-monitor3 address 172.23.176.67 port 20022

--- environment: NODE_IP='::ffff:172.23.176.67' NODE_NAME='' PATH='/sbin:/bin:/usr/sbin:/usr/bin:/usr/contrib/bin:/usr/local/bin:/usr/contrib/sbin:/usr/local/sbin:/usr/libexec' NODE_PORT='20022' ARGS_I='' MON_TMPL_NAME='ext-sfg-monitor3' --- executing (timeout in 16s): /config/filestore/files_d/Common_d/external_monitor_d/:Common:sfg-ext-monitor3_46985_1 172.23.176.67 20022 Traceback (most recent call last): File "/usr/local/bin/test_monitor", line 186, in ? p = Popen(args, stderr=PIPE, stdout=PIPE, env=environ) File "/usr/lib/python2.4/subprocess.py", line 550, in init errread, errwrite) File "/usr/lib/python2.4/subprocess.py", line 996, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

It is failing with 'OSError: [Errno 2] No such file or directory'.Any idea

1 Reply

  • Could you please re-write the post correctly with pre-formatted code? That'd make it easier for people to read it and then of course, also help you.