> Source: [sk182757](https://support.checkpoint.com/results/sk/sk182757)

# sk182757 - "Lost connection with peer while doing command execution: peer disconnected" in /var/log/messages

| Property | Value |
|----------|-------|
| Solution ID | sk182757 |
| Date Created | 2024-10-29 |
| Last Modified | 2025-05-22 |
| Technical Level | General |
| Products | Scalable Platforms |
| Versions | R81.20, R81.10 (EOS) |
| OS | Gaia |

## Symptoms

- The `/var/log/messages` file on the Security Group contains these messages repeatedly:

`
GEXECD[XXX]: Lost connection with peer while doing command execution: peer disconnected.`  
`
GEXECD[XXX]: Failed during execution of command: ifconfig (client is 192.0.2.X).
`

## Cause

When an administrator or internal scripts run the "`ifconfig`" command on a Security Group, it calls the "`asg_if`" tool. The "`asg_if`" tool fails due to a short internal timeout.

## Solution

This problem was fixed. The fix is included starting from:

* [Check Point R82](https://support.checkpoint.com/results/sk/sk181127)

Check Point recommends to always upgrade to the [Recommended version](https://support.checkpoint.com/results/sk/sk95746).

<br />

If you choose not to upgrade, increase the timeout in the `$SMODIR/bin/asg_if` file:

1. Connect to the command line on the Security Group.

2. Log in to the Expert mode.

3. Edit the `$SMODIR/bin/asg_if`file.

   1. Back up the current `$SMODIR/bin/asg_if` file:

      `cp -v $SMODIR/bin/asg_if{,_BKP}`
   2. Edit the current `$SMODIR/bin/asg_if` file:

      `vi $SMODIR/bin/asg_if`
   3. In this file, locate this line:

      `while true ; do gexec -r -g0 -a -b chassis_remote -x 1 -c ifconfig ; done`
   4. Change the value

      from "`... chassis_remote -x 1 ...`"

      to "`... chassis_remote -x 3 ...`".
   5. Save the changes in the file and exit Vi editor.

   6. Copy the modified file to all Security Group Members:

      `asg_cp2blades $SMODIR/bin/asg_if`

Note - If the issue persists, change the value to "`chassis_remote -x 5`".

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
