CentOS vs Oracle Ent Linux

Hi All,
I wanted to see if anyone may be seeing the same issue with their endpoints. I have two flavors of Linux running in my environment. CentOS Linux and Oracle Enterprise Linux (OEL). When I kick off any actions via BF console my OEL servers seem to pick up the action(s) right away. My CentOS systems seem to take a very long time to receive the actions. Many times I have to restart the besagent on my CentOS systems to “wake them up” so to speak.
Has anyone else seen this behavior?

We are running besagent 9.5.4.38 on both systems.

Thanks in advance

Check if there is an active firewall on the CentOS. Actions are notified using UDP that could be blocked by the local CentOS firewall. The Bigfix agent log (/var/opt/BESClient/__BESData/__Global/Logs/xxxxx.log) should log the the following message just after the action is submitted:

GatherHashMV command received.

Thanks for the reply. Below is what i see in the log:

[root@hostname Logs]# grep Gather 20191204.log
GatherHashMV command received.
Gather::SyncSiteByFile merging files - count: 1
GatherHashMV command received.
Gather::SyncSiteByFile adding files - count: 1
GatherHashMV command received.
Gather::SyncSiteByFile merging files - count: 1
Gather::SyncSiteByFile adding files - count: 1
GatherHashMV command received.
Gather::SyncSiteByFile adding files - count: 1
GatherHashMV command received.
Gather::SyncSiteByFile merging files - count: 2
GatherHashMV command received.
Gather::SyncSiteByFile adding files - count: 2
GatherHashMV command received.
Gather::SyncSiteByFile deleting files - count: 4
Gather::SyncSiteByFile adding files - count: 1
GatherHashMV command received.
Gather::SyncSiteByFile adding files - count: 1
GatherHashMV command received.
Gather::SyncSiteByFile deleting files - count: 1
Gather::SyncSiteByFile merging files - count: 3

The above log suggests that the UDP notification is working correctly. From the BES console create an “empty” custom action (Tools -> Take Custom Action) and submit it to the affected CentOS machine. Collect the related agent log and attach it.

Anything specific to be put in the custom action?

ran the action and the below was received:
At 10:50:04 -0700 -
Report posted successfully
At 11:06:56 -0700 -
Report posted successfully
At 11:23:41 -0700 -
Report posted successfully
At 11:31:03 -0700 -
PollForCommands: Requesting commands
PollForCommands: commands to process: 1
At 11:31:04 -0700 -
GatherHashMV command received.
At 11:31:05 -0700 - mailboxsite (http://hostname.corp:52311/cgi-bin/bfgather.exe/mailboxsite2208929)
Downloaded ‘http://hostname.corp:52311/mailbox/files/9d/7f/9d7f96abfde0b73adbc9dbce735db0c5134a979e’ as 'Action 2187809.fxf’
Gather::SyncSiteByFile adding files - count: 1
At 11:31:05 -0700 -
Successful Synchronization with site ‘mailboxsite’ (version 40) - 'http://hostname.corp:52311/cgi-bin/bfgather.exe/mailboxsite2208929
Processing action site.
At 11:31:05 -0700 - mailboxsite (http://hostname.corp:52311/cgi-bin/bfgather.exe/mailboxsite2208929)
Relevant - Custom Action (fixlet:2187809)
At 11:31:05 -0700 -
ActionLogMessage: (action:2187809) Action signature verified for Execution
ActionLogMessage: (action:2187809) starting action
ActionLogMessage: (action:2187809) ending action
At 11:31:06 -0700 - mailboxsite (http://hostnam.corp:52311/cgi-bin/bfgather.exe/mailboxsite2208929)
Not Relevant - Custom Action (fixlet:2187809)
At 11:31:10 -0700 -
Report posted successfully

it took a while for the it to run but it finally did. i kicked it off at 12:48 EST but the actual start time of it was 1331 EST
*note the server is in MST

It’s telling that the GatherHashMV message only came as the result of a Command Poll. It indicates your client is probably actually not receiving the notifications that the Relay is sending it on udp-52311. You should still look at a firewall, host-based firewall, or NAT preventing the UDP notifications from going through.

its odd that it takes over an hour for the action to be taken but if i restart the besagent it takes it fine. So how would FW or port be an issue?

That could simply be the client isn’t receiving new action notifications until it reaches out and checks for them. It does that based on the CommandPollInterval you have defined, or when you restart the client.

If UDP were not blocked, the relay would be notifying the client when there is a new action and it would respond quickly.

what would be the process to unblock UDP and it should be port 53211 correct?

It’s port 52311. On CentOS 6, I believe it’s in firewall-cmd, I’ll try to find some more details in a bit.

I’m a bit more familiar with the commands on RHEL, but I think the same will apply to CentOS

firewall-cmd --state
running
[root@host bin]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: enp0s3
sources:
services: ssh dhcpv6-client
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:

iptables -A INPUT -p udp --dport 52311 -j ACCEPT

firewall-cmd --zone=public --add-port=52311/udp --permanent

Sorry for not replying sooner. I agrre with Jason, the log (with time) shows that the agent did not receive the UDP notification. Please investigate that, the firewall command on CentOS depend on the version, if you google “disable firewall CentoOS” you will find the command for your OS version. Try to disable the firewall for a while, and test the action again. The agent should receive the “GatherHashMV command” right after the action is submitted.

Thanks so much for your help. I don’t think i can disable the FW in the event its being used for a reason by applications or services on my servers. I will add the suggestion n the iptables and see where that gets me. I may even try to do it via a bigfix action so i don’t have to touch every server once i get the logic down.

1 Like

Sounds like a good plan. Once you test that on a machine and determine whether that fixes your issue, I’ll be happy to help with the fixlet logic to mass-deploy.

test works great and now just need a way to roll it out and ensure the command is permanent post a reboot.

1 Like

May I also ask for help to determine first if the firewall is indeed running before i run any changes to iptables? I dont want to interject any issues to my servers that are not needed.

1 Like

Yes, I think we can help.

Also, did you use ‘iptables’ or ‘firewall-cmd’? And which version of CentOS are you on, I don’t recall where it changed. I built myself a CentOS 6.0 machine yesterday to look at this but I’m afraid I got interrupted.

We have default content in the BES Support site to add an exception for BESClient to the iptables firewall for RHEL, I’m pretty sure I can adapt that to CentOS.

Actually, even better than adapting the fixlet to CentOS, is finding that someone else has already done it… Have a look at https://bigfix.me/fixlet/details/3984 , test it out, and let us know whether that works for you.

Thanks to @rexit1982