Skip to content

Instantly share code, notes, and snippets.

@MohamedElashri
Last active June 23, 2021 17:12
Show Gist options
  • Save MohamedElashri/c50faeb89b431dcfbd618fa4899fcd98 to your computer and use it in GitHub Desktop.
Save MohamedElashri/c50faeb89b431dcfbd618fa4899fcd98 to your computer and use it in GitHub Desktop.
NPM another instance bug

To renew or add new ssl certificates for now I have to do the following

  1. Run ps -ef | grep certb
  2. Identify the looping process
  3. Kill it using kill <process id>

Hint: In my case, usually it is the second process

root     25614 24813  0 17:54 ?        00:00:00 /bin/sh -c /opt/certbot/bin/certbot renew --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-16" --preferred-challenges "dns,http" --disable-hook-validation 
root     25615 25614  0 17:54 ?        00:00:00 /opt/certbot/bin/python3 /opt/certbot/bin/certbot renew --non-interactive --config /etc/letsencrypt.ini --cert-name npm-16 --preferred-challenges dns,http --disable-hook-validation
root     27196 14519  0 17:57 pts/0    00:00:00 grep --color=auto certb

So I want to kill 25615 only. Otherwise, I'm killing NPM process itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment