> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pmo/how-to/host-convergence-failure-due-to-inability-to-acquire-dpkg-front.md).

# Host Convergence Failure Due to Inability to Acquire DPKG Frontend Lock

## Problem

When a command or an application is updating the system, it locks the *dpkg* file (Debian package manager) to ensure that two processes don’t change the content at the same time thereby resulting into an unwarranted situation. When such a condition occurs, the service script in this case for ***pf9-kube*** fails to execute followed by a host convergence failure.

{% tabs %}
{% tab title="None" %}

```none
All Certs generated successfullyE: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? stderr=681 - pf9_app.py WARNING - Failed to set service pf9-kube to state True810 - session.py INFO - Converge failed
```

{% endtab %}
{% endtabs %}

## Environment

* Platform9 Managed OpenStack - All Versions
* Hostagent

## Cause

We can see that an ***apt-get purge docker-ce*** process runs limiting the ***pf9-kube*** to acquire a lock on the docker installation procedure as a part of the ***pf9-kube*** script service execution.

{% tabs %}
{% tab title="None" %}

```none
pf9@worker01$ ps aux | grep -i aptroot 9270 0.0 2.0 125412 81368 pts/0 T 12:20 0:00 apt-get -y purge docker-cepf9 24231 0.0 0.0 14220 936 pts/2 S+ 12:54 0:00 grep --color=auto -i apt
```

{% endtab %}
{% endtabs %}

## Resolution

1. Force kill the process with SIGKILL signal.

{% tabs %}
{% tab title="None" %}

```none
$ sudo kill -9 [process_id]
```

{% endtab %}
{% endtabs %}

2. On removal of the process, the ***pf9-kube*** service completes its execution and the host converges successfully.

{% tabs %}
{% tab title="None" %}

```none
007 - session.py INFO - --- Converging ---884 - amqp.py WARNING - Connection closed due to Not specified, retrying in 10 seconds885 - pf9_app.py INFO - Setting the desired service state885 - pf9_app.py INFO - Setting service state pf9-kube.3.11.0-7457. Command: sudo /etc/init.d/pf9-kube start768 - session.py INFO - Converge succeeded
```

{% endtab %}
{% endtabs %}

## Additional Information

[Lock Error Fix](https://itsfoss.com/could-not-get-lock-error/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://platform9.com/kb/pmo/how-to/host-convergence-failure-due-to-inability-to-acquire-dpkg-front.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
