Highlighted
Aayush56 Honored Contributor.
Honored Contributor.
634 views

Inventory Scanner Issue

Hi 

FOr some of the servers i am getting the below error in INVENTORY DISCOVERY BY SCANNER

  • Failed to execute step Upgrade Scanner. Reason:com.mindbright.ssh2.SSH2SFTP$SFTPFailureException: Failure
  • Failed to execute step Upgrade Scanner. Reason:An error occurred while executing command. Output: bash: awk: command not found
  • << Progress message, Severity: Error>>
    Scan file is not ready yet. Agent option DISCOVERY_SCANFILENAME value is Empty

    << Progress message, Severity: Error>>
    Scanner failed, Completion: Failed: Exception occurred, Status: Fatal program failure, code #11. Please write down the above information and contact your supplier. (Cannot create temporary external storage file)

Could any one face the same problem or does anyone know how to resolve this?

Tags (2)
0 Likes
7 Replies
johnc3 Acclaimed Contributor.
Acclaimed Contributor.

Re: Inventory Scanner Issue

During the scanner upgrade we will use a lot of Linux commands like cp, mv, ls or awk.

The error is quite simple Output: bash: awk: command not found 

This means that the user under which UDA runs doesn't find a valid path for awk command.

Kind regards,
Bogdan Mureșan

EMEA Technical Success
0 Likes
Aayush56 Honored Contributor.
Honored Contributor.

Re: Inventory Scanner Issue

Thanks

However there are other two error. Could you please tell me where i can look for that.

0 Likes
johnc3 Acclaimed Contributor.
Acclaimed Contributor.

Re: Inventory Scanner Issue

I would fix the awk issue first and check the local logs.

Kind regards,
Bogdan Mureșan

EMEA Technical Success
0 Likes
Aayush56 Honored Contributor.
Honored Contributor.

Re: Inventory Scanner Issue

Hi 

I checked for the awk command. They are all failing in HMC Below is the error that i get from the com log.

<log start="23:26:26" severity="debug">UnixFileSystem created successfully, backend: file_info_discoverers.LinuxFileInfoDiscovererByLsAwk</log>
<EXEC start="23:26:26" duration="63">
<CMD>[CDATA: ls -la /home/ucmdbdis/.discagnt/sca_tmp|awk -v base_dir=/home/ucmdbdis/.discagnt/sca_tmp ' BEGIN { isFile = 1; IS_DIR=0; FIRST_LINE_NEED_SKIP=0; BASE_DIR = base_dir; last_ch=substr(BASE_DIR, length(BASE_DIR), length(BASE_DIR)); if(last_ch == "/"){ BASE_DIR = substr(BASE_DIR, 1, length(BASE_DIR)-1); } } { dir_and_perms=$1; owner=$3; size=$5; month=$6; day=$7; y_or_t=$8; name=$9; path = name; if($1=="total"){ IS_DIR = 1; FIRST_LINE_NEED_SKIP = 1; } if (FIRST_LINE_NEED_SKIP == 1){ FIRST_LINE_NEED_SKIP = 0; next; } if(isFile == 1 &amp;&amp; IS_DIR == 1){ if(name != "."){ next; }else{ name = BASE_DIR; path = name; } } if(IS_DIR==1 &amp;&amp; isFile==0){ if(name =="." || name == ".."){ next; } } if(IS_DIR==1 &amp;&amp; isFile==0){ path = BASE_DIR "/" path; }else{ len=split(name, name_array,"/"); name=name_array[len]; } file_type = substr(dir_and_perms, 1, 1); if(file_type !="d" &amp;&amp; file_type !="l" &amp;&amp; file_type !="-"){ next; } is_dir = 0; if(file_type == "d"){ is_dir = 1; } perms = substr(dir_and_perms, 2, length(dir_and_perms)); printf ("&lt;==&gt;\n"); printf("%s &lt;=&gt;\n", size);printf("%s &lt;=&gt;\n", name); } END { if (!NR) { printf("Path not found\n"); exit 1; } }' ; echo ERROR_CODE:$?]</CMD>
<RESULT>[CDATA: bash: awk: command not found
ERROR_CODE:127]</RESULT>
</EXEC>

0 Likes
johnc3 Acclaimed Contributor.
Acclaimed Contributor.

Re: Inventory Scanner Issue

 file_info_discoverers.LinuxFileInfoDiscovererByLsAwk

In globalSettings.xml (adapter management) you have 2 options

<!--The file system discovery method. Valid values are perl and lsawk.
perl(default). Run Perl scripts to discover file systems.
lsawk. Run ls + awk commands to discover file systems.
If Perl is not installed on the target host, the lsawk discovery method is used.
-->
<property name="fs_discovery_method">perl</property>

The default one is perl, try this one and see if you have a different error message. Otherwise, try to login on that host with the discovery credentials and see if awk is available or if it can be called just by awk, maybe you need the full path.

Kind regards,
Bogdan Mureșan

EMEA Technical Success
0 Likes
Aayush56 Honored Contributor.
Honored Contributor.

Re: Inventory Scanner Issue

Hi ,

Thanks Bogdan. I just talked to the team as the error you are getting is on HMC so i can ignore this because only restricted privileges i had for this. but for the second error that i am getting i looked for that one. but i only got the below 

log start="14:15:10" severity="debug">Trying to lock node with value:HPUCMDBPROBE2\\\___\\\0\\\___\\\MZ_XXX Infrastructure Discovery_XXX VCentre Discovery_InventoryDiscoveryWizard_Inventory Discovery by Scanner\\\___\\\1526645710513\\\___\\\1526732110513</log>
<EXEC start="14:15:10" duration="0">
<CMD>[CDATA: cat /export/home/ucmdbdis/.discagnt/aioptionrc; echo ERRORCODE:$?]</CMD>
<RESULT>[CDATA: DISCOVERY_SCANLOGFILENAME=/export/home/ucmdbdis/.discagnt/../.discagnt/local.log
STATE_PROPERTY_EXECUTION_STARTED=1518737763428
DISCOVERY_SCAN_STAGE=Exit
SCANNER_EXCLUSIVE_LOCK=HPUCMDBDEVPROBE\\\___\\\0\\\___\\\MZ_XXX INventory Discovery_XXX Vcenter Discovery_InventoryDiscoveryWizard_Inventory Discovery by Scanner\\\___\\\1526641064050\\\___\\\1526727464050
DISCOVERY_SCAN_STATUS=exit: rc = 0 (SUCCESS)
DISCOVERY_SCAN_UPTIME=109
DISCOVERY_SCAN_EXITCODE=0
DISCOVERY_SCANFILENAME=/export/home/ucmdbdis/.discagnt/../.discagnt/local.xsf
DISCOVERY_SCAN_PID=63373808
DISCOVERY_ASSETTAG=af27004_D2A1E3A5B907
ERRORCODE:0]</RESULT>

0 Likes
johnc3 Acclaimed Contributor.
Acclaimed Contributor.

Re: Inventory Scanner Issue

That is normal, the lock is in place because on  Saturday, May 19, 2018 1:57:44.050 the scanner started to run and it put a lock so no other scanners will run until it will finish.

Kind regards,
Bogdan Mureșan

EMEA Technical Success
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.