Reputation: 1
"systemctl enable openresty"
What I get
Synchronizing state of openresty.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable openresty
Failed to reload daemon: Access denied
Failed to reload daemon: Access denied
Failed to enable unit: Access denied
This the the screenshot
systemctl status openresty
openresty.service - The NGINX HTTP and reverse proxy server
Loaded: loaded (/lib/systemd/system/openresty.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-08-11 17:01:13 UTC; 2h 37min ago
Process: 8875 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=203/EXEC)
Aug 11 17:01:13 instance-2 systemd{1]: Starting The NGINX HTTP and reverse proxy server...
Aug 11 17:01:13 instance-2 systemd[8875]: openresty.service: Failed to execute command: No such file or directory
Aug 11 17:01:13 instance-2 systemd[8875]: openresty.service: Failed at step EXEC spawning /usr/sbin/nginx: No such file or directory
Aug 11 17:01:13 instance-2 systemd(1]: openresty.service: Control process exited, code=exited, status=203/EXEC
Aug 11 17:01:13 instance-2 systemd(1]: openresty.service: Failed with result 'exit-code'.
Aug 11 17:01:13 instance-2 systemd(1]: Failed to start The NGINX HTTP and reverse proxy server.
journalctl -u openresty
-- Logs begin at Tue 2021-08-10 17:42:07 UTC, end at Wed 2021-08-11 19:20:05 UTC. --
Aug 10 19:14:22 instance-2 systemd(1]: Starting The OpenResty Application Platform...
Aug 10 19:14:22 instance-2 systemd(1]: Started The OpenResty Application Platform.
Aug 10 22:00:10 instance-2 systemd(1]: Stopping The OpenResty Application Platform...
Aug 10 22:00:10 instance-2 systemd(1]: openresty.service: Succeeded.
Aug 10 22:00:10 instance-2 systemd(1]: Stopped The OpenResty Application Platform.
Aug 10 22:00:10 instance-2 systemd(1]: Starting The OpenResty Application Platform...
Aug 10 22:00:10 instance-2 nginx[4012]: nginx: [emerg] directive "server_name" is not terminated by ";" in /etc/openresty/sites-enabled/m.facebook.com.conf:7
Aug 10 22:00:10 instance-2 nginx[4012]: nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test failed
Aug 10 22:00:10 instance-2 systemd(1]: openresty.service: Control process exited, code=exited, status=1/FAILURE
Aug 10 22:00:10 instance-2 systemd(1]: openresty.service: Failed with result 'exit-code'.
Aug 10 22:00:10 instance-2 systemd(1]: Failed to start The OpenResty Application Platform.
Aug 10 22:01:15 instance-2 systemd(1]: Starting The OpenResty Application Platform...
Aug 10 22:01:15 instance-2 nginx[4034]: nginx: [emerg] directive "server_name" is not terminated by ";" in /etc/openresty/sites-enabled/m.facebook.com.conf:7
Aug 10 22:01:15 instance-2 nginx[4034]: nginx: configuration file /usr/local/openresty/nginx/conf/nginx. conf test failed
Aug 10 22:01:15 instance-2 systemd(1]: openresty. service: Control process exited, code=exited, status=1/FAILURE
Aug 10 22:01:15 instance-2 systemd(1]: openresty.service: Failed with result 'exit-code'.
Aug 10 22:01:15 instance-2 systemd(1]: Failed to start The OpenResty Application Platform.
Aug 11 17:01:13 instance-2 systemd(1]: Starting The NGINX HTTP and reverse proxy server...
Aug 11 17:01:13 instance-2 systemd[8875]: openresty.service: Failed to execute command: No such file or directory
Aug 11 17:01:13 instance-2 systemd[8875]: openresty.service: Failed at step EXEC spawning / usr /sbin / nginx : No such file or directory
Aug 11 17:01:13 instance-2 systemd(1]: openresty.service: Control process exited, code=exited, status=203/EXEC
Aug 11 17:01:13 instance-2 systemd(1]: openresty.service: Failed with result 'exit-code'.
Aug 11 17:01:13 instance-2 systemd(1]: Failed to start The NGINX HTTP and reverse proxy server.
Upvotes: 0
Views: 3668
Reputation: 5032
Sounds like you are trying to enable a service, from an account that is not privileged.
You may be able to use sudo, if the system is configured to allow this:
sudo systemctl enable openresty
If not, you would have to login as root:
su
[enter your root password]
systemctl enable openresty
Upvotes: 0