Ngnix starting error dns.service_action_error

NethServer Version: 7.9
Module: ngnix

After installing webtop group ware application the ngnix service will not start if I manually try to start it in the server manager I get the following " Error
dns.service_action_error
The following command has failed:
system-services/update

If I click “copy command” and past it I get the following “echo ‘{“action”:“start”,“name”:“nginx”}’ | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/system-services/update | jq”

Any help with this matter will be greatly appreciated.

run that command from CLI.
Also check status of nginx service to get more details on the error:

systemctl -l status nginx

Thank you for the quick response below is the out put from systemctl -l status nginx

[root@dag-server ~]# systemctl -l status nginx
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2023-09-26 07:24:18 EDT; 57min ago
  Process: 2624 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
  Process: 2621 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)

Sep 26 07:24:18 xxx.xxx systemd[1]: Starting The nginx HTTP and reverse proxy server...
Sep 26 07:24:18 xxx.xxx nginx[2624]: nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
Sep 26 07:24:18 xxx.xxx.com nginx[2624]: nginx: [emerg] unknown "the_prefix" variable
Sep 26 07:24:18 xxx.xxx.com nginx[2624]: nginx: configuration file /etc/nginx/nginx.conf test failed
Sep 26 07:24:18 xxx.xxx.com systemd[1]: nginx.service: control process exited, code=exited status=1
Sep 26 07:24:18 xxx.xxx.com systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Sep 26 07:24:18 xxx.xxx.com systemd[1]: Unit nginx.service entered failed state.
Sep 26 07:24:18 xxx.xxx.com systemd[1]: nginx.service failed.

[root@dag-server ~]#  echo '{"action":"start","name":"nginx"}' | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/system-services/update | jq
{
  "id": "1695731774",
  "type": "EventFailed",
  "message": "Action failed"
}
[root@dag-server ~]# 

From where does it come the_prefix variable?
Any manual change to nginx config?
/etc/nginx/nginx.conf

I have not changed the conf file, I have looked through the entire /etc/nginx/nginx.conf file can’t find any mention of “[emerg] unknown “the_prefix” variable”

# ================= DO NOT MODIFY THIS FILE =================
# 
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
# 
# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

#    server {
#        listen       80 default_server;
#        listen       [::]:80 default_server;
#        server_name  _;
#        root         /usr/share/nginx/html;

#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;

#        location / {
#        }

#        error_page 404 /404.html;
#            location = /40x.html {
#        }

#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }

# Settings for a TLS enabled server.
#
#    server {
#        listen       443 ssl http2 default_server;
#        listen       [::]:443 ssl http2 default_server;
#        server_name  _;
#        root         /usr/share/nginx/html;
#
#        ssl_certificate "/etc/pki/nginx/server.crt";
#        ssl_certificate_key "/etc/pki/nginx/private/server.key";
#        ssl_session_cache shared:SSL:1m;
#        ssl_session_timeout  10m;
#        ssl_ciphers HIGH:!aNULL:!MD5;
#        ssl_prefer_server_ciphers on;
#
#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;
#
#        location / {
#        }
#
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
#
#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }

}

Here are the results from cat /var/log/nginx/error.log

cat /var/log/nginx/error.log
2023/09/26 07:07:00 [warn] 21187#21187: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 07:07:00 [emerg] 21187#21187: unknown "the_prefix" variable
2023/09/26 07:08:23 [warn] 22623#22623: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 07:08:23 [emerg] 22623#22623: unknown "the_prefix" variable
2023/09/26 07:12:15 [warn] 24602#24602: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 07:12:15 [emerg] 24602#24602: unknown "the_prefix" variable
2023/09/26 07:15:25 [warn] 30100#30100: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 07:15:25 [emerg] 30100#30100: unknown "the_prefix" variable
2023/09/26 07:15:25 [warn] 30110#30110: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 07:15:25 [emerg] 30110#30110: unknown "the_prefix" variable
2023/09/26 07:16:24 [warn] 32702#32702: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 07:16:24 [emerg] 32702#32702: unknown "the_prefix" variable
2023/09/26 07:24:18 [warn] 2624#2624: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 07:24:18 [emerg] 2624#2624: unknown "the_prefix" variable
2023/09/26 08:26:02 [warn] 14927#14927: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 08:26:02 [emerg] 14927#14927: unknown "the_prefix" variable
2023/09/26 08:36:03 [warn] 16570#16570: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 08:36:03 [emerg] 16570#16570: unknown "the_prefix" variable
2023/09/26 08:36:14 [warn] 16607#16607: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 08:36:14 [emerg] 16607#16607: unknown "the_prefix" variable
2023/09/26 16:09:15 [emerg] 29659#29659: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
2023/09/26 16:09:15 [emerg] 29670#29670: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
2023/09/26 16:10:13 [warn] 31905#31905: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 16:10:13 [emerg] 31905#31905: unknown "the_prefix" variable
2023/09/26 16:10:13 [warn] 31914#31914: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 16:10:13 [emerg] 31914#31914: unknown "the_prefix" variable
2023/09/26 16:10:42 [warn] 32371#32371: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/conf.d/ds.conf:21
2023/09/26 16:10:42 [emerg] 32371#32371: unknown "the_prefix" variable
2023/09/26 16:23:35 [emerg] 4132#4132: unknown "the_prefix" variable
2023/09/26 16:32:24 [emerg] 6564#6564: unknown "the_prefix" variable
2023/09/26 16:33:56 [emerg] 25590#25590: unknown "the_prefix" variable
2023/09/26 16:37:04 [emerg] 27590#27590: unknown "the_prefix" variable
2023/09/26 16:39:36 [emerg] 12726#12726: unknown "the_prefix" variable
2023/09/26 16:41:15 [emerg] 26591#26591: unknown "the_prefix" variable
[root@dag-server ~]# 

Anything from nginx include files?

grep -i prefix /etc/nginx/conf.d/*.conf
grep -i prefix /etc/nginx/default.d/*.conf
grep -i prefix /usr/share/nginx/modules/*.conf

The error is similar to the one reported more than a year ago and related to onlyoffice and a file named ds-docservice.conf:

1 Like

This worked I removed onlyoffice and nginx and reinstalled onlyoffice using “yum -y install https://mrmarkuz.dynu.net/mirror/devtest/nethserver-onlyoffice-0.0.3-1.ns7.noarch.rpm” that was provided in thread above. Thank you very much for all your help.