Linux エージェントがしばらくするとオフラインになる
search cancel

Linux エージェントがしばらくするとオフラインになる

book

Article ID: 266520

calendar_today

Updated On:

Products

Endpoint Protection

Issue/Introduction

Symantec Endpoint Protection (SEP) for Linux エージェントをインストール後、もしくは /usr/lib/symantec/start.sh で SEP 関連デーモンを再起動後、Symantec Endpoint Protection Manager (SEPM) コンソールでオンラインと表示されているが、しばらくするとオフラインとなってしまう。ハートビート間隔が 1 分毎の場合、約 16 時間後にオフラインになる。

事象発生時のログ内容

  • /var/log/sdcss-caflog/cve.log (JST) : 以下のような出力でログ記録が停止している。
2023-03-03T05:51:07.322JST 140390921393920 INFO cve.sylinkcommunicator [2023-Mar-03 05:51:07.322505] [INFO ] Successful connection to server xxx.xxx.xxx.xxx [thread:7faf4effd700]
2023-03-03T05:51:07.323JST 140390921393920 INFO cve.sylinkcommunicator [2023-Mar-03 05:51:07.323545] [INFO ] Need to check against a reported [5DEEA0924B6A116C16E0DB30495521F7[ [thread:7faf4effd700]
2023-03-03T05:51:07.323JST 140390921393920 INFO cve.sylinkcommunicator [2023-Mar-03 05:51:07.323580] [INFO ]                          current [5DEEA0924B6A116C16E0DB30495521F7] [thread:7faf4effd700]
  • /var/log/sdcss-caflog/cafagent.log (UTC) : cve.log のログ記録が停止した時刻に "Sending request for OpState to AMD" のログ記録があるが、前回のハートビート通信 (以下ログでは 20:50:07) のような応答の記録がない。
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 : 140391150765824 : fetchOpState:585 | Sending request for OpState to AMD  # cve.log ログ記録が停止する前のハートビート通信時
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 : 140391150765824 : fetchOpState:599 | CommandName: 
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 : 140391150765824 : fetchOpState:600 | CommandID: 
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 : 140391150765824 : fetchOpState:601 | ResponseCode: 12
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 : 140391150765824 : fetchOpState:602 | ResponseString: {
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "autoprotect_state": 3,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "applied_policy": {
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :         "effective_date": 1677731227,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :         "uid": "6C13-12\/26\/2022 10:08:11 125",
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :         "version": 1
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     },
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "last_detection_time": 1677206636000,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "last_scan_time": 1677708000000,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "hasunresolvedthreats": false,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "contents": [
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :         {
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :             "sequence": 230228117,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :             "content_type_id": 2,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :             "version": "20230228.117",
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :             "content_last_download_time": 1677510000
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :         }
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     ],
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "advanced_malware_protection_state": 1,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "advanced_malware_protection_level": 200,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "download_insight_state": 2,
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 :     "licensing_state": "ENTITLED"
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 : }
[|] 2023-03-02 20:50:07 | adapter.SEPMAdapter | Information | 20376 : 140391150765824 : fetchOpState:603 | Optional: 0
[|] 2023-03-02 20:50:07 | cvehandler.SSAOpstateDataBuilder | Information | 20376 : 140390921393920 : SetSSAHostInfoFromCveSVMRegistration:193 | Replacing ProductVersion with the one we got from CAFConfig productVersion=[14.3.215.3000]
[|] 2023-03-02 20:51:07 | adapter.SEPMAdapter | Information | 20376 : 140391167551232 : fetchOpState:585 | Sending request for OpState to AMD # cve.log ログ記録の停止時
[|] 2023-03-02 22:00:04 | cvehandler.SylinkParser | Error | 20376 : 140391159158528 : GetCriticalEventImmediatelyUploadFlag:109 | Exception occured while parsing XML.Exception : /etc/symantec/sep/sylink.xml: cannot open file
  • /var/log/sdcsslog/amdlog/sisamd_X.log (UTC): cve.log が停止した時刻 (20:51:07 UTC) の 1 回前のハートビート通信時の応答記録があるが (以下ログでは 20:50:07)、cve.log ログ記録停止時の 20:51:07 のログ記録がない。
2023-03-02 20:50:07: <info> [AMDOPState::fetchAMDOpState]:140 OPState: {
    "autoprotect_state": 3,
    "applied_policy": {
        "effective_date": 1677731227,
        "uid": "6C13-12\/26\/2022 10:08:11 125",
        "version": 1
    },
    "last_detection_time": 1677206636000,
    "last_scan_time": 1677708000000,
    "hasunresolvedthreats": false,
    "contents": [
        {
            "sequence": 230228117,
            "content_type_id": 2,
            "version": "20230228.117",
            "content_last_download_time": 1677510000
        }
    ],
    "advanced_malware_protection_state": 1,
    "advanced_malware_protection_level": 200,
    "download_insight_state": 2,
    "licensing_state": "ENTITLED"
}

2023-03-02 22:00:00: <info> [AMDRunSchedule::run]:43 Trigger a Scheduled Scan
2023-03-02 22:00:00: <info> [AMDSefSetup::HasDefinitions]: 889 checking for SEF defs... 
  • 事象発生後、下記のコマンドを実行すると 1025 と返る
ls -l /proc/`pidof cafservicemain`/fd | wc -l
  • 環境によっては cafagent がクラッシュし、/usr/lib/symantec/status.sh の結果 "cafagent not running" となる。
May 17 09:14:23 <hostname> abrt-hook-ccpp[2319821]: Process 844947 (cafservicemain) of user 1002 killed by SIGABRT - dumping core
May 17 09:14:24 <hostname> systemd[1]: cafdaemon.service: Main process exited, code=killed, status=6/ABRT
May 17 09:14:24 <hostname> systemd[1]: cafdaemon.service: Failed with result 'signal'.
May 17 09:14:25 <hostname> abrt-server[2319823]: Package 'sdcss-caf' isn't signed with proper key

Environment

  • SEP for Linux 14.3 RU3

Cause

cafagent.service が使用するファイルディスクリプタ数が、Symantec Endpoint Protection Manager (SEPM) とのハートビート通信が発生する度に 1 ずつ増加し続け、OS で設定されている上限 1024 を使い切ってしまうため。

Resolution

この問題は Symantec Endpoint Protection 14.3 RU4 (14.3.xxxx.4000) で修正されました。最新の SEP バージョンの入手方法については、下記の技術文書を参照してください。

14.3 RU3 での回避策 :

ハートビート間隔に応じて cafagent (cafdaemon.service) デーモンを定期的に再起動するよう構成してください。

ハートビート間隔が 1 分の場合、ファイルディスクリプタ数の上限 (1024) に達するまで約 16 時間かかる計算になりますので、例えば 12 時間毎に cafagent を再起動することで事象を回避できます。

  • 毎日 00:00 と 12:00 (12 時間毎) に cafagent を再起動する crontab の例:

# crontab -l
0 0,12 * * * systemctl restart cafagent

ハートビート間隔を伸ばすことで、必要な再起動間隔を伸ばすことが可能です。ハートビート間隔が 5 分であれば、ファイルディスクリプタ数の上限に達するまで約 3.5 日かかる計算になります。

ハートビート間隔の変更手順につきましては、プッシュモードまたはプルモードを使用した、クライアントのポリシーとコンテンツの更新 の [グループに対してプッシュモードまたはプルモードを設定するには] の手順をご参照ください。

Additional Information

本技術文書の事象が発生する可能性があるかどうかを確認する方法

下記のコマンドをハートビート間隔毎 (ハートビートが 1 分に設定されている場合は 1 分毎) に実行し、数値が 1 ずつ増加するか確認してください。増加する場合、本事象が今後発生するものと判断できますので、回避策の適用をご検討ください。

ls -l /proc/`pidof cafservicemain`/fd | wc -l

上記コマンドの結果が 1025 と返る場合は、cafagent を一度再起動した上でコマンドを実行し、1 ずつ増加するかどうかご確認ください。

 

CRE-13889