Highlighted
Honored Contributor.
Honored Contributor.
382 views

Host Discovery by Shell use of lsof command

Hi,

For ASM discovery on Unix/linux servers at Host Discovery by Shell Job, when we have the root access to following 2 commands, then why there is a need of access to lsof  command. 

  1. netstat -nap 
  2. ps -ef 

Note, as per customer's security policy lsof is not allowed to be installed on all the servers but if we don't install the lsof package then ASM discovery fails with  following error:

The discovery job did not find any process listening on port: <port_number>

Can anyone suggest workaround to avoid lsof package installation but still discover the Weblogic on Web Server.

Thanks & Regards,

Rohit Sobhani

0 Likes
8 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Have you tried to disable the use of lsof?

lsof.PNG

Regards,

Petko Popadiyski

Freelance Microfocus CMS UCMDB Consulting

Likes are appreciated!
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Thanks @popadiyski  for the reply!!

Disabling use of LSOF on Host Application By Shell job seems to have no effect on Host Discovery by Shell job. 

Disabling the useLSOF :

Tried the disabling the use of LSOF  in the Host Application by Shell job(refer screenshot below) 

useLSOF_HostApplicationByShell.png

 

  • Deactivated(Stopped) Service Discovery Activity
  • Cleared Probe Cache Result
  • Activated(Started) 

 

Communication log of Host Discovery by Shell :

Even after disabling useLSOF option and stop/start of Service Discovery Activity, the service Discovery job (Host Discovery by Shell) is using LSOF. Attached reference screenshot from communication log.

useLSOF_communicationLog.png

 

Note, Host Discovery by Shell job is not available under Discovery Modules/Jobs section, therefore we can't disable the useLSOF  for Host Discovery by Shell job.

Is there any other way to disable useLSOF for ASM discovery activities ?

 

Thanks & Regards,

Rohit Sobhani

Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Go to Infrastructure Settings and search for "Enable display of jobs belonging to management zone". If you put true and relogin, you should see the hidden jobs for ASM.

 

Petko

Likes are appreciated!
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Hi @popadiyski ,

Even after setting value to True for Enable display of jobs belonging to managment zone option, Host Discovery by Shell job is not visible under Discovery Modules/Jobs

Enable display of jobs belonging to management zone.png

 

 

 

 

 

 

 

Figure: Enable display of jobs belonging to management zone

 

Management Jobs got visible.png

 

 

 

 

 

 

 

 

Figure: Management Job visible in Discovery Modules/Jobs

 

Discovery jobs starting with Host prefix.png

 

 

 

 

 

 

 

 

 

 

 

Figure: Discovery jobs starting with Host prefix but still Host Discovery by Shell job is not visible 

Are you able to see Host Discovery by Shell job under Discovery Modules/Jobs section in your uCMDB instance?

 

Thanks & Regards,

Rohit Sobhani

 

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

"Host Discovery by Shell" is just a hidden ASM job referring to the same adapter as the Host Application by Shell. It has some settings overwrites set but you have to try to change them either on the original adapter, whith "Host Discovery by Shell" is using, or by finding a way to display the hidden job through JMX. 

 

host_resources_screen.PNG

Likes are appreciated!
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Hi @popadiyski ,

I managed to disable the LSOF (useLSOF=false) for Host Discovery by Shell job in the Adapater ManagementHost_Discovery_By_Shell.png

 

useLSOF=false in the communication log 

useLSOF is False.png

 

ErrorMessage: The discovery job did not find any process listening on port:7005

ErrorMessage_The discovery job did not find any process listening on port_7005.png

 

But even after disabling use of LSOF, Host Discovery by Shell job is throwing Error (i.e. The discovery job did not find any process listening on port:7005).

Note, we already have process to ip_service_endpoint relationship and process to weblogic relationship discovered in uCMDB from Inventory Discovery job. All we need is the relationship from Load Balancing Cluster to weblogic CI using Host Discovery by Shell job, so that further ASM discovery job can be triggered. 

Thanks & Regards,

Rohit Sobhani

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

so the next question is can you discover the process listening on the port with the permissions given using netstat command.

This would require some Linux / sysadmin knowledge on your side.

 

Likes are appreciated!
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Hi @popadiyski 

UD Agent is running using root user. There is no permission error as discovery job is getting executed using root user. The only error which is coming in the execution of  Host Discovery by Shell job is The discovery job did not find any process listening on port:7005).

Thanks & Regards,

Rohit Sobhani

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.