Re: How can display a trap send from external node on Linux HPOM console. (330 Views)
Reply
HP Expert
Guciuciu
Posts: 132
Registered: ‎07-26-2011
Message 26 of 35 (379 Views)

Re: How can display a trap send from external node on Linux HPOM console.

Hello,

Please check if you have configured opctrapi to listen to a different port than the default one (162) with this command:

 

ovconfget eaagt | grep SNMP_TRAP_PORT

 

If you receive no output it is possible that opctrapi is trying to listen to port 162 where another process is listening to as well. You can verify this with:

 

netstat -an | grep 162

 

Otherwise if you have configured SNMP_TRAP_PORT please try the above command with your port to check if another process is listening to it.

If so, please select a different port for opctrapi and run these commands:

 

ovconfchg -ns eaagt -set SNMP_TRAP_PORT <custom_port>
ovc -restart opctrapi

 

Does this help you?

HP Support
If you find this or any post resolves your issue, please make sure to mark it as an "Accepted as Solution".
If you liked the reply then please show this with KUDOs.
Honored Contributor
Goran Koruga
Posts: 1,296
Registered: ‎12-05-2002
Message 27 of 35 (378 Views)

Re: How can display a trap send from external node on Linux HPOM console.

In this case my only suggestion would be to verify basic things - firewall, are you sending to the right node, do you see the trap if you use say 'nc' to receive it ...

 


     Goran

Frequent Advisor
Prak5192
Posts: 53
Registered: ‎10-30-2013
Message 28 of 35 (367 Views)

Re: How can display a trap send from external node on Linux HPOM console.

Hi Guciuciu/Goran,

 

Thank you for all your responses. 

 

@Guciuciu

This is the output of the command you suggested: 

 

[root@localhost ~]# /opt/OV/bin/ovconfget eaagt | grep SNMP_TRAP_PORT
SNMP_TRAP_PORT=162
[root@localhost ~]#

 

[root@localhost ~]# netstat -an | grep 162
udp       0        0  0.0.0.0:162                0.0.0.0:*

 

 

The SNMP trap port is configured for port 162 only and no application is using this port. 

 

 

@Goran,

I don't think there is any firewall issue. 

Yes I am sending the trap to correct node only. I used tcpdump command to check that the traps are received by the node where I am sending it. 

 

[root@localhost ~]# tcpdump -i eth0 port 162
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
11:36:09.746554 IP prakash_laptop.52230 > 10.94.145.53.snmptrap: Trap(20) .0.0 10.94.9.5 coldStart 0

 

I am sending the trap from prakash_laptop to 10.94.145.53 node ( This node is acting as management server ) which is shown in the above log.

But I am getting a critcle message whenever I am starting opctrapi application. 

 

"Can't connect the OV daemon 'pmd' to open SNMP session: connect() failed: Connection refused (OVEvent Server: localhost.localdomain (127.0.0.1)).
Trying to open session directly.
Operation not permitted (OpC30-208)" 

Why connection is failing even though the port is nopt getting used by any other application. 

 

This is the opctrapi trace message 

http://paste.ubuntu.com/6436068/

 

 

Please help,

 

Thank you for all you supports till far. 

 

 

 

 

 

 

Honored Contributor
Goran Koruga
Posts: 1,296
Registered: ‎12-05-2002
Message 29 of 35 (361 Views)

Re: How can display a trap send from external node on Linux HPOM console.

Hello.

 

You think there's no firewall but have you checked to be sure?  And I asked this already - can you receive the trap if you use 'nc'? Or snmptrapd from net-snmp?

 

You are getting the error because you have set SNMP_SESSION_MODE to "TRY_BOTH", which simply means it first tries to connect to 'pmd', and if that fails, listens by itself.  You can set it to "NO_TRAPD" and it should stop trying to connect to PMD first.

 

If I understood your posts from last week correctly then opctrapi is successfully listening on given port despite this error message ("netstat -nap" shows process name listening on the port).

 

Regards,

    Goran

HP Expert
Guciuciu
Posts: 132
Registered: ‎07-26-2011
Message 30 of 35 (354 Views)

Re: How can display a trap send from external node on Linux HPOM console.

Hello,

 

Can you please let us have the output of:

 

more /etc/services | grep snmp

 

Even it seems that there are no processes using 162, the error seems misleading as it suggests that the port 162 is occupied by some other process. Hence opctrapi is not able to listen on 162.

Does also the lsof utility show that port 162 is not used?

Also, which agent version are you running on your OML Server?

Please show us the output of

 

opcagt -version

ovdeploy -inv

 

 

HP Support
If you find this or any post resolves your issue, please make sure to mark it as an "Accepted as Solution".
If you liked the reply then please show this with KUDOs.
Frequent Advisor
Prak5192
Posts: 53
Registered: ‎10-30-2013
Message 31 of 35 (351 Views)

Re: How can display a trap send from external node on Linux HPOM console.

Hi Goran,

Thank You for you valuabale time and response. 

As you suggested I checked the firewall and it was dissabled. After that I set set SNMP_SESSION_MODE to NO_TRAPD.

using  

 

/opt/OV/bin/ovconfchg -ns eaagt -set SNMP_SESSION_MODE NO_TRAPD

 

After making these changes I restarted the opctrapi . and now it is processing the trap send from the external node. 

Here is the log where it is displaying the debug message that it is processed by opctrapi process. 

 

After that I checked this path for seeing that the message is reaching or not.

 

strings /var/opt/OV/tmp/OpC/msgagtq

It also displayed a log which shows that trap message is process by msgagtq

Here is the log. At the lat few line it shows that I have sent a cold start SNMP trap from prakash_laptop.

 

http://paste.ubuntu.com/6436610/

 

But this trap is not showing in OMU java GUI browser. 

How can i display this message on java GUI browser.. 

 

Please help.

 

Thank You 

 

 

HP Expert
Guciuciu
Posts: 132
Registered: ‎07-26-2011
Message 32 of 35 (345 Views)

Re: How can display a trap send from external node on Linux HPOM console.

Hello,

Do you have a SNMP Trap Interceptor policy deployed and enabled on your OML server with a rule that matches the trap you are sending?
Please check this and make sure that the rule matching your trap foresees the sending of a message to your active message browser.
Please check also the acknowledged message browser as it might be that the message is going there for some reason.

HTH
HP Support
If you find this or any post resolves your issue, please make sure to mark it as an "Accepted as Solution".
If you liked the reply then please show this with KUDOs.
Frequent Advisor
Prak5192
Posts: 53
Registered: ‎10-30-2013
Message 33 of 35 (345 Views)

Re: How can display a trap send from external node on Linux HPOM console.

Hi Goran,

 

Thank You for your all valuable time and support.

 

There was some policy problem  because of which it was not displaying on node. 

 

Now every thing is fine and working smoothing. 

 

 

Thank you once again... 

Honored Contributor
Goran Koruga
Posts: 1,296
Registered: ‎12-05-2002
Message 34 of 35 (339 Views)

Re: How can display a trap send from external node on Linux HPOM console.

1. Verify that it doesn't go directly into history browser.

 

2. Verify if message is discarded due to node not being known (OPC_LOG_DROPPED_MSGS config setting).

 

3. Verify responsibility matrix for the user.

 

I am assuming there's no outage config in place that would drop it.

 

     Goran

Frequent Advisor
Prak5192
Posts: 53
Registered: ‎10-30-2013
Message 35 of 35 (330 Views)

Re: How can display a trap send from external node on Linux HPOM console.

Hi Goran,
No everything is all right.. My SNMP policy was wrong created.. Its is perfectly displaying on the OMU java browser and not going to history browser directly.

Thank You once again for all your help.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.