Ad Widget

Collapse

Unable to proceed with initial setup

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jiri
    Junior Member
    • Mar 2020
    • 5

    #1

    Unable to proceed with initial setup

    Hello,

    I am trying clean install of 4.4 version and after starting zabbix-server and nginx the setup.php is stuck at the welcome screen. Hitting "Next step" button adds 304 HTTP code to nginx access log. No errors. Anyone encountered this issue?
  • sirovstrukelj
    Junior Member
    • Feb 2020
    • 9

    #2
    what was your install procedure? did you follow the install procedure on the documentation?

    Comment

    • jiri
      Junior Member
      • Mar 2020
      • 5

      #3
      I am installing on Amazon Linux, so I used https://www.zabbix.com/download?zabb...mysql&ws=nginx as a base procedure (though not exactly copy&paste step by step):

      PHP packages installed:

      php56-xml-5.6.40-1.143.amzn1.x86_64
      php56-mbstring-5.6.40-1.143.amzn1.x86_64
      php56-cli-5.6.40-1.143.amzn1.x86_64
      php56-jsonc-1.3.10-1.20.amzn1.x86_64
      php56-pdo-5.6.40-1.143.amzn1.x86_64
      php56-mysqlnd-5.6.40-1.143.amzn1.x86_64
      php56-fpm-5.6.40-1.143.amzn1.x86_64
      php56-process-5.6.40-1.143.amzn1.x86_64
      php56-common-5.6.40-1.143.amzn1.x86_64
      php56-gd-5.6.40-1.143.amzn1.x86_64
      php56-bcmath-5.6.40-1.143.amzn1.x86_64


      nginx related packages installed:

      nginx-1.16.1-1.37.amzn1.x86_64
      zabbix-nginx-conf-4.4.6-1.el7.noarch


      Zabbix packages installed:

      zabbix-web-mysql-4.4.6-1.el6.noarch
      zabbix-server-mysql-4.4.6-1.el6.x86_64
      zabbix-web-4.4.6-1.el6.noarch
      zabbix-agent-4.4.6-1.el6.x86_64
      zabbix-nginx-conf-4.4.6-1.el7.noarch
      zabbix-sender-4.4.6-1.el6.x86_64


      Changed ownership of /etc/zabbix/web to nginx:nginx

      Configuration files are almost defaults with the only changes in red:

      Updated /etc/php-fpm-5.6.d/zabbix.conf:
      Code:
      [zabbix]
      user = [COLOR=#FF0000][B]nginx[/B][/COLOR]
      group = [COLOR=#FF0000][B]nginx[/B][/COLOR]
      
      listen = [COLOR=#FF0000][B]/var[/B][/COLOR]/run/php-fpm/zabbix.sock
      listen.owner = nginx
      listen.allowed_clients = 127.0.0.1
      
      pm = dynamic
      pm.max_children = 50
      pm.start_servers = 5
      pm.min_spare_servers = 5
      pm.max_spare_servers = 35
      
      php_value[session.save_handler] = files
      php_value[session.save_path]    = /var/lib/php/session
      
      php_value[max_execution_time] = 300
      php_value[memory_limit] = 128M
      php_value[post_max_size] = 16M
      php_value[upload_max_filesize] = 2M
      php_value[max_input_time] = 300
      php_value[max_input_vars] = 10000
      [COLOR=#FF0000][B]php_value[date.timezone] = UTC[/B][/COLOR]
      
      [COLOR=#FF0000][B]php_value[session.auto_start] = 0
      php_value[mbstring.func_overload] = 0
      php_value[always_populate_raw_post_data] = -1[/B][/COLOR]

      /etc/nginx/nginx.conf:
      Code:
      # 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 /var/run/nginx.pid;
      
      # Load dynamic modules. See /usr/share/doc/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;
      
          index   index.html index.htm;
      
          server {
              listen       80 default_server;
              listen       [::]:80 default_server;
              server_name  localhost;
              root         /usr/share/nginx/html;
      
              # Load configuration files for the default server block.
              include /etc/nginx/default.d/*.conf;
      
              location / {
              }
      
              # redirect server error pages to the static page /40x.html
              #
              error_page 404 /404.html;
                  location = /40x.html {
              }
      
              # redirect server error pages to the static page /50x.html
              #
              error_page 500 502 503 504 /50x.html;
                  location = /50x.html {
              }
      
              # proxy the PHP scripts to Apache listening on 127.0.0.1:80
              #
              #location ~ \.php$ {
              #    proxy_pass   http://127.0.0.1;
              #}
      
              # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
              #
              #location ~ \.php$ {
              #    root           html;
              #    fastcgi_pass   127.0.0.1:9000;
              #    fastcgi_index  index.php;
              #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
              #    include        fastcgi_params;
              #}
      
              # deny access to .htaccess files, if Apache's document root
              # concurs with nginx's one
              #
              #location ~ /\.ht {
              #    deny  all;
              #}
          }
      
      # 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";
      #        # It is *strongly* recommended to generate unique DH parameters
      #        # Generate them with: openssl dhparam -out /etc/pki/nginx/dhparams.pem 2048
      #        #ssl_dhparam "/etc/pki/nginx/dhparams.pem";
      #        ssl_session_cache shared:SSL:1m;
      #        ssl_session_timeout  10m;
      #        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      #        ssl_ciphers HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP;
      #        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 {
      #        }
      #    }
      
      }

      /etc/nginx/conf.d/zabbix.conf:
      Code:
      server {
      [COLOR=#FF0000][B]listen[/B][/COLOR]          [COLOR=#FF0000][B]8080[/B][/COLOR];
      [COLOR=#FF0000][B]server_name[/B][/COLOR]     [COLOR=#FF0000][B]localhost[/B][/COLOR];
      
              root    /usr/share/zabbix;
      
              index   index.php;
      
              location = /favicon.ico {
                      log_not_found   off;
              }
      
              location / {
                      try_files       $uri $uri/ =404;
              }
      
              location /assets {
                      access_log      off;
                      expires         10d;
              }
      
              location ~ /\.ht {
                      deny            all;
              }
      
              location ~ /(api\/|conf[^\.]|include|locale) {
                      deny            all;
                      return          404;
              }
      
              location ~ [^/]\.php(/|$) {
                      fastcgi_pass    unix:[COLOR=#FF0000][B]/var[/B][/COLOR]/run/php-fpm/zabbix.sock;
                      fastcgi_split_path_info ^(.+\.php)(/.+)$;
                      fastcgi_index   index.php;
      
                      fastcgi_param   DOCUMENT_ROOT   /usr/share/zabbix;
                      fastcgi_param   SCRIPT_FILENAME /usr/share/zabbix$fastcgi_script_name;
                      fastcgi_param   PATH_TRANSLATED /usr/share/zabbix$fastcgi_script_name;
      
                      include fastcgi_params;
                      fastcgi_param   QUERY_STRING    $query_string;
                      fastcgi_param   REQUEST_METHOD  $request_method;
                      fastcgi_param   CONTENT_TYPE    $content_type;
                      fastcgi_param   CONTENT_LENGTH  $content_length;
      
                      fastcgi_intercept_errors        on;
                      fastcgi_ignore_client_abort     off;
                      fastcgi_connect_timeout         60;
                      fastcgi_send_timeout            180;
                      fastcgi_read_timeout            180;
                      fastcgi_buffer_size             128k;
                      fastcgi_buffers                 4 256k;
                      fastcgi_busy_buffers_size       256k;
                      fastcgi_temp_file_write_size    256k;
              }
      }
      /etc/zabbix/zabbix_server.conf is the default one with updated DBPassword and DBSocket settings.

      Now I don't see any errors since the last startup in

      /var/log/php-fpm/5.6/error.log
      /var/log/nginx/error.log
      /var/log/zabbix/zabbix_server.log

      yet I cannot get past the welcome screen (/setup.php) as I described ("GET /jsLoader.php?ver=4.4.6&lang=en_gb HTTP/1.1" 304 0).

      Comment

      • jiri
        Junior Member
        • Mar 2020
        • 5

        #4
        I found it!

        In /etc/php-fpm.d/zabbix.conf I had
        Code:
        php_value[session.save_path]    = /var/lib/php/session
        but the correct path is
        Code:
        php_value[session.save_path]    = /var/lib/php/5.6/session
        Miserable logging of PHP-FPM that it didn't complain......

        Comment

        Working...