Highlighted
Absent Member.. Absent Member..
Absent Member..
503 views

Discovery can not run nbtstat command

Hello,

 

We have written a custom discovery pattern to get NetBIOS information with nbtstat from remote hosts.

We have successfully tested the pattern on multiple Probes but there are some probes failed with the following error.

 

Nbtstat I located in C:\Windows\System32\

The path seems to be o.k.

 

The Probe is running on Windows 2008 R2.

 

 

Error:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

<EXEC start="14:31:11" duration="1">

                                <CMD>[CDATA&colon; nbtstat -A 10.10.10.10</CMD>

                                <RESULT>[CDATA&colon; 'nbtstat' is not recognized as an internal or external command, operable program or batch file.]</RESULT>

</EXEC>

<EXEC start="14:31:11" duration="0">

                                <CMD>[CDATA&colon; path]</CMD>

                                <RESULT>[CDATA&colon; PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32;C:\Program Files (x86)\Nmap]</RESULT>

</EXEC>

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

UCMDB System:

9.05 CUP14.412

CP 11.10.828

 

DFProbe:

version=9.05.CUP14

build=412

 

BR

Jochen 

0 Likes
8 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Discovery can not run nbtstat command

Make sure that the nbtstat command can be run or specify the complete path.

 

Keith Paschal

HP UCMDB Support

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Discovery can not run nbtstat command

The problem not related to UCMDB.

Every command in Python script perform in separate CMD.

Please either try to specify absolute path in script (C:\Windows\system32\nbstat.exe  -A 10.10.10.10) or define the PATH variable in global windows environment.

Hope this helps.

Regards
-Dmitry Gomel, PMP
Click the Like button at the bottom to say 'Thanks'.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Discovery can not run nbtstat command

The job failed also with the full path.

The result of the path command is attached for troubleshooting.

 

<EXEC start="15:13:44" duration="1">

<CMD>[CDATA&colon; C:\Windows\system32\nbtstat -A 10.10.10.10]</CMD>

<RESULT>[CDATA&colon; 'C:\Windows\system32\nbtstat' is not recognized as an internal or external command, operable program or batch file.]</RESULT>

</EXEC>

<EXEC start="15:13:44" duration="0">

<CMD>[CDATA&colon; path]</CMD>

<RESULT>[CDATA&colon; PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32;C:\Program Files (x86)\Nmap]</RESULT>

</EXEC>

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Discovery can not run nbtstat command

do you have to \ escape characters in the script?  e.g.:  c:\\windows\\test.bat   or such things?  It is clearly not finding it (just as if you typed it from the command line)... make sure you can execute it on that probe.

 

Keith

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Discovery can not run nbtstat command

Could you please check that user that running Probe service has an access to C:\Windows\system32?

Could you try to move the file to C:\?

 

Regards
-Dmitry Gomel, PMP
Click the Like button at the bottom to say 'Thanks'.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Discovery can not run nbtstat command

I copied the exe to the probe resources.

And also to C:\

 

Same issue

<EXEC start="16:11:13" duration="1">

<CMD>[CDATA&colon; nbtstat -A 10.10.10.10]</CMD>

<RESULT>[CDATA&colon; 'nbtstat' is not recognized as an internal or external command, operable program or batch file.]</RESULT>

</EXEC>

<EXEC start="16:11:13" duration="0">

<CMD>[CDATA&colon; path]</CMD>

<RESULT>[CDATA&colon; PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32;C:\Program Files (x86)\Nmap]</RESULT>

</EXEC>

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Discovery can not run nbtstat command

yes I used C:\\Windows\\system32\\nbtstat -A

Commandline is o.k. locally on the probe
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Discovery can not run nbtstat command

Perhaps the binary has no execution permissions?  You can use cacls to validate this... log in on the probe and run:

 

c:\nbtstat -rr

c:\windows\system32\nbtstat -rr

 

It could be the binary is corrupted on that server as well.

 

Keith Paschal

HP UCMDB Support

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
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.