OpenVPN Ec2 instance crashes after update apt (error related to the PackageKit daemon on AWS EC2 instance)

0

Hey team,

we are using the following Ec2 instance: OpenVPN Access Server https://aws.amazon.com/marketplace/pp/prodview-y3m73u6jd5srk?applicationId=AWS-Marketplace-Console&ref_=beagle&sr=0-1

Our current LinuxVersion:

Linux_version

This instance seems to do automatic updates after some times:

APT_updates

But after this update process the system does not come back to normal, which results in a crash of our OpenVPN Server application:

DaemonError

Error releasing name org.freedesktop.packagekit timeout reached on this AWS ec2 instance. So, it seems like we are encountering an error related to the PackageKit daemon on our AWS EC2 instance. The error message "error releasing name org.freedesktop.packagekit timeout reached" indicates that the PackageKit daemon is unable to release its name on the D-Bus system bus.

Can somebody please help us here? We need a stable system automatically after such an update process.

Thanks for your support in advance!

Best regards

Mario

Mario
asked 13 days ago43 views
2 Answers
0

To address the issue you're encountering with the PackageKit daemon on your AWS EC2 instance, we can take a more streamlined approach to troubleshoot and stabilize the system after an update process.

The error message, "error releasing name org.freedesktop.packagekit timeout reached," often occurs due to the PackageKit service hanging during package management tasks or failing to release resources on the D-Bus system bus. To ensure a stable system after updates, here’s what we can do:

1. Disable the PackageKit Service

Suppose you're not actively relying on PackageKit for package management. In that case, it's a good idea to disable it, as it’s often unnecessary on EC2 instances where manual or script-based updates are preferred. Disabling this service prevents it from triggering these errors in the future:

sudo systemctl stop packagekit
sudo systemctl disable packagekit

Stopping and disabling PackageKit prevents potential conflicts or hangs during future update processes.

2. Check the Logs

Examine the logs to see if any underlying issues caused the timeout. Logs can give you deeper insight into what went wrong:

sudo cat /var/log/syslog | grep packagekit
sudo cat /var/log/syslog | grep dbus

You may also want to use journalctl for more detailed system log checks:

sudo journalctl -xe | grep packagekit
sudo journalctl -xe | grep dbus

By checking these logs, you can identify any recurring issues with D-Bus or PackageKit that need addressing.

3. Clear PackageKit’s Cache

If PackageKit is needed but occasionally hangs, clearing its cache might resolve temporary glitches. Running the following command can refresh the package management system and prevent future issues:

sudo pkcon refresh force

Once cleared, you can monitor the system to see if the problem persists during future updates.

4. Reboot if Necessary

Finally, if disabling PackageKit and checking the logs don’t immediately resolve the issue, you may want to reboot the instance to ensure everything resets properly:

sudo reboot

This reboot will ensure that any lingering issues from PackageKit or D-Bus are cleared and won't affect future operations.

This flow should help in resolving the issue and maintaining a stable environment after the update processes on your EC2 instance.

profile picture
answered 13 days ago
  • Hey Praveen,

    thanks a lot for your response! 👍

    Since we currently do not know whether we need this package kit service for any important case in our application - we run an OpenVPN server on this instance for remote communication - we followed your advice and deactivated the service.

    Unfortunately we did not get any feedback from those commands (see first two lines in the picture of the next answer in this question). And we also can't find this service in the service list.

    Do you know if this behaviour is normal?

    Best regards

    Mario

0

Addition to the comment on Praveen's answer

Current Services

Mario
answered 12 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions