Certbot kill nginx


#1

Hi! I setup nginx bythis instruction and it works.

Then i setup certbot using sudo apt-get install python-certbot-nginx and it setup it’s oun nginx.

I ran this command: sudo apt-get remove --auto-remove certbot
and get result: Failed to start nginx.service: Unit nginx.service is masked.

I make file /lib/systemd/system/nginx.service again and unmask it.

Then try to start nginx get this output:
nginx.service - The NGINX HTTP and reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Drop-In: /etc/systemd/system/nginx.service.d
└─override.conf
Active: failed (Result: exit-code) since Fri 2018-07-06 20:28:14 MSK; 17min a
Process: 1239 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=203/EXEC)

journalctl -xe
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 20:22:07 shiva systemd[947]: Reached target Default.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 20:22:07 shiva systemd[947]: Startup finished in 84ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The user manager instance for user 1000 has been started. All services queued
-- for starting have been started. Note that other services might still be start
-- up or be started at any later time.
--
-- Startup of the manager took 84222 microseconds.
Jul 06 20:26:59 shiva polkit-agent-helper-1[1115]: pam_unix(polkit-1:auth): auth
lines 788-810/810 (END)
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 20:22:07 shiva systemd[947]: Reached target Default.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 20:22:07 shiva systemd[947]: Startup finished in 84ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The user manager instance for user 1000 has been started. All services queued
-- for starting have been started. Note that other services might still be starting
-- up or be started at any later time.
--
-- Startup of the manager took 84222 microseconds.
Jul 06 20:26:59 shiva polkit-agent-helper-1[1115]: pam_unix(polkit-1:auth): authentication failure; logname= uid=1000 euid=0 tty= ruser=shiva rhost=  user=shiva
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
-- Logs begin at Fri 2018-07-06 13:58:25 MSK, end at Fri 2018-07-06 20:26:59 MSK. --
Jul 06 13:58:25 shiva systemd[757]: Reached target Paths.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Listening on GnuPG cryptographic agent and passphrase cache.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Listening on GnuPG network certificate management daemon.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Reached target Timers.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Reached target Sockets.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Reached target Basic System.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Reached target Default.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 13:58:25 shiva systemd[757]: Startup finished in 100ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The user manager instance for user 1000 has been started. All services queued
-- for starting have been started. Note that other services might still be starting
-- up or be started at any later time.
--
-- Startup of the manager took 100732 microseconds.
Jul 06 14:34:07 shiva systemd[759]: pam_unix(systemd-user:session): session closed for user shiva
Jul 06 14:34:07 shiva systemd[757]: Stopped target Default.
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Stopped target Basic System.
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Stopped target Paths.
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Stopped target Sockets.
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Closed GnuPG cryptographic agent (ssh-agent emulation).
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Closed GnuPG cryptographic agent and passphrase cache.
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Closed GnuPG network certificate management daemon.
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Stopped target Timers.
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished shutting down.
Jul 06 14:34:07 shiva systemd[757]: Reached target Shutdown.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 14:34:07 shiva systemd[757]: Starting Exit the Session...
-- Subject: Unit UNIT has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has begun starting up.
Jul 06 14:34:07 shiva systemd[757]: Received SIGRTMIN+24 from PID 2840 (kill).
-- Reboot --
Jul 06 14:38:48 shiva systemd[984]: Failed to open directory /home/shiva/.config/systemd/user, ignoring: Permission denied
Jul 06 14:38:48 shiva systemd[984]: Failed to open directory /home/shiva/.local/share/systemd/user, ignoring: Permission denied
Jul 06 14:38:48 shiva systemd[984]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 14:38:48 shiva systemd[984]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 14:38:48 shiva systemd[984]: Listening on GnuPG network certificate management daemon.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 14:38:48 shiva systemd[984]: Listening on GnuPG cryptographic agent and passphrase cache.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
Jul 06 14:38:48 shiva systemd[984]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is RESULT.
log file: ystemd[984]: Failed to open directory /home/shiva/.config/systemd/user, ignoring: Permission denied

My web server is (include version): nginx 1.15.1

The operating system my web server runs on is (include version): ubuntu 18.04 LTS

My hosting provider, if applicable, is: linode

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

How to roll back nginx to work and how install sertificates (and auto-renew) if it’s possible? Thanx


Letsencrypt not working with cron, manually it ok
#2

I rebuild nginx…
What is better way install letsencrypt in that case


#3

answer is https://www.linode.com/docs/security/ssl/install-lets-encrypt-to-create-ssl-certificates/


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.