NOTICE: Significant community changes coming soon
The header menu and the home page on our community will be changing soon. Get more information HERE.
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
493 views

Inventory by Scanner error "Failed to upload"

I'm getting the following error on some Linux VM's that I'm trying to scan.  Has anyone seen this before and know how to fix?

Failed to upload C:\hp\UCMDB\DataFlowProbe\bin\..\runtime\probeManager\discoveryResources\ud_scanners\scanlinux-x64 to ~/.discagnt/sca_tmp

Detail from Comm Log

/EXEC>
 <log start="15:46:09" severity="debug">Parameter isUpgradeAllowed:True</log>
 <log start="15:46:09" severity="debug">Parameter IsDowngradeAllowed:False</log>
 <log start="15:46:09" severity="debug">Remote scanner version is unavailable, going to execute scanner upgrade</log>
 <log start="15:46:09" severity="debug">Executing pre upgrade commands</log>
 <log start="15:46:09" severity="debug">Running mkdir ~/.discagnt/</log>
 <EXEC start="15:46:09" duration="15">
  <CMD>[CDATA: mkdir ~/.discagnt/ ; echo ERROR_CODE:$?]</CMD>
  <RESULT>[CDATA: mkdir: cannot create directory ΓÇÿ~/.discagnt/ΓÇÖ: No such file or directory
ERROR_CODE:1]</RESULT>
  <encoded_result>[CDATA: \109\107\100\105\114\58\32\99\97\110\110\111\116\32\99\114\101\97\116\101\32\100\105\114\101\99\116\111\114\121\32\915\199\255\126\47\46\100\105\115\99\97\103\110\116\47\915\199\214\58\32\78\111\32\115\117\99\104\32\102\105\108\101\32\111\114\32\100\105\114\101\99\116\111\114\121\10\69\82\82\79\82\95\67\79\68\69\58\49]</encoded_result>
 </EXEC>
 <log start="15:46:09" severity="debug">Installing scanner</log>
 <log start="15:46:09" severity="debug">Scanner executable to be used:scanlinux-x64</log>
 <log start="15:46:09" severity="debug">Scanner executable local path:C:\hp\UCMDB\DataFlowProbe\bin\..\runtime\probeManager\discoveryResources\ud_scanners\scanlinux-x64</log>
 <log start="15:46:09" severity="debug">Copy local C:\hp\UCMDB\DataFlowProbe\bin\..\runtime\probeManager\discoveryResources\ud_scanners\scanlinux-x64 to remote ~/.discagnt/scan</log>
 <EXEC start="15:46:09" duration="47">
  <CMD>[CDATA: uploadFile [C:\hp\UCMDB\DataFlowProbe\bin\..\runtime\probeManager\discoveryResources\ud_scanners\scanlinux-x64]]</CMD>
  <RESULT>[CDATA: 3]</RESULT>
 </EXEC>
 <log start="15:46:09" severity="debug">Failed to upload C:\hp\UCMDB\DataFlowProbe\bin\..\runtime\probeManager\discoveryResources\ud_scanners\scanlinux-x64 to remote ~/.discagnt/sca_tmp</log>
 <log start="15:46:09" severity="debug">Upload cannot proceed due to scanner process, terminate it.</log>
 <EXEC start="15:46:09" duration="31">
  <CMD>[CDATA: ps -e | grep scan ; echo ERROR_CODE:$?]</CMD>
  <RESULT>[CDATA: ERROR_CODE:1]</RESULT>

0 Likes
3 Replies
Highlighted
Valued Contributor.
Valued Contributor.

Hello RRose.

I hope you are doing well.

 

regarding to your query we suggest you to open a case with support since this type of issues could be cause by several reasons so the best way to approach is by troubleshooting with support and find out the root of the problem by doing a deeper investigation.

 

If you have any question or comment, please do not hesitate to contact us.

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

I had a similar issue back in 2016 and I modified the ScannersConfigurationByPlatform.xml to change the ~/.discagnt path to /root/.discagnt.

<platform name="all">
		<scanner-deployment>
			<basedir-name>
				<dir>discagnt</dir>
			</basedir-name>
			<file-separator>
				<separator>/</separator>
			</file-separator>
			<!-- Agents option which specifies where to place scanner and scanner configuration file. Used for UD Agent compatibility-->
			<basedir>
				<dir>/root/.VAR{basedir-name}VAR{file-separator}</dir>
			</basedir>

The technical details as provided by our UNIX admin is as follows:

They ran a trace on the specific UD Agent process on a system.

Trace was collected using this command;

$ strace –fp 1666 –o discagent.trace

Where process id 1666 is the ‘discagnt’ running process.  The ‘-fp’ flags tell strace to follow any child processes so each line in the trace file begins with a process id number.  The problem process id number is 25123 and starts at line number 8631 in the trace file.  The mkdir is called twice, first with an ‘execve’ system call at line 11230 which is successful and then second with a ‘mkdir’ system call at line 11315.  Read ‘man 2 mkdir’ for a description of the mkdir system call and ‘man 1 mkdir’ for the mkdir shell command (not the same things).

Tldr: the command mkdir as a system call does not have the same behavior as mkdir as a shell command.

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Thanks for the info.  I will do more investigation based on your feedback. 

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.