Issue Running Commands on Amazon Linux 2023 t3.small EC2 Instance

0

I've recently launched an Amazon Linux 2023 EC2 instance of type t3.small. However, when I attempt to run any command, I encounter the message "Waiting for process with pid to finish," and the command never completes.

Strangely, I only face this issue on the t3.small instance. I also created a t2 instance, and everything runs smoothly; I can install packages and execute jobs without any problems.

Has anyone else experienced a similar issue with t3.small instances on Amazon Linux 2023? Any insights or suggestions on what might be causing this problem would be greatly appreciated. I am certain it is from AWS itself.

Thanks in advance for your help!

Vahid
asked 3 months ago196 views
2 Answers
0

Hello.

It may depend on the command you executed, but does the answer at the URL below solve the problem?
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/thread/XQLTADPT4TLNCL2GZUAOLMBEACOGOKYP/

Check for lock files.
ls /var/cache/dnf/*pid
If you have any remove them and try running dnf again.

profile picture
EXPERT
answered 3 months ago
  • Thank you. When I run ls /var/cahes/dnf/*pid I got this error: No such file or directory.

  • However to get around this 1- I used the EC2 t2.small and installed every thing on it. 2- created AMI of the t2 and finally 3- Lunched a t3.small with the AMI. Everything seems to be working fine now.

0

when I attempt to run any command, I encounter the message "Waiting for process with pid to finish,"

Any command? So if you run date or whoami or echo Hello you get this error?

As @Riku_Kobayashi also identified in his answer, the error message is consistent with dnf (or yum in the old days) trying to be run while there's a dnf/yum process already running. But it can also happen if a previous dnf/yum process doesn't exit cleanly and leaves a lock file.

In your three-stage solution that you outline, when you have a t2.small and installed every thing on it do you do a dnf update -y as part of step 1? This would mean the RPMs are already at their latest versions, so in step 3 when you deply the new AMI on the t3.small, a dnf update -y will complete more-or-less immediately because there's nothing to do. And once dnf has completed you will not get Waiting for process with pid 12345 to finish.

profile picture
EXPERT
Steve_M
answered 3 months 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