ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How To Install Elasticsearch, Logstash, and Kibana 4 on CentOS 7

    IT Discussion
    4
    50
    7.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stacksofplatesS
      stacksofplates
      last edited by

      Type sudo systemctl status nginx and tell us what you get.

      JoyJ 1 Reply Last reply Reply Quote 0
      • JoyJ
        Joy @stacksofplates
        last edited by

        @johnhooks said:

        Type sudo systemctl status nginx and tell us what you get.

        nginx.service - The nginx HTTP and reverse proxy server
        Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
        Active: failed (Result: exit-code) since Thu 2015-10-22 05:13:26 EDT; 1h 4min ago
        Process: 10993 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE)
        Process: 11343 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)

        Oct 22 05:13:26 localhost.localdomain systemd[1]: Starting The nginx HTTP and reverse proxy server...
        Oct 22 05:13:26 localhost.localdomain nginx[11343]: nginx: [emerg] unexpected end of file, expecting "}" in /etc/nginx...nf:41
        Oct 22 05:13:26 localhost.localdomain nginx[11343]: nginx: configuration file /etc/nginx/nginx.conf test failed
        Oct 22 05:13:26 localhost.localdomain systemd[1]: nginx.service: control process exited, code=exited status=1
        Oct 22 05:13:26 localhost.localdomain systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
        Oct 22 05:13:26 localhost.localdomain systemd[1]: Unit nginx.service entered failed state.
        Hint: Some lines were ellipsized, use -l to show in full.

        1 Reply Last reply Reply Quote 0
        • stacksofplatesS
          stacksofplates
          last edited by

          Can you paste the contents your /etc/nginx.conf file?

          JoyJ 1 Reply Last reply Reply Quote 0
          • JoyJ
            Joy @stacksofplates
            last edited by Joy

            @johnhooks said:

            Can you paste the contents your /etc/nginx.conf file?

            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;

            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 {
                 
                include /etc/nginx/default.d/*.conf;
            

            }

            stacksofplatesS 1 Reply Last reply Reply Quote 0
            • stacksofplatesS
              stacksofplates
              last edited by stacksofplates

              Looks like you missed the last }. Put one after the curly brace at the bottom of your config file.

              JoyJ 1 Reply Last reply Reply Quote 0
              • stacksofplatesS
                stacksofplates
                last edited by stacksofplates

                That's what this line is saying, I just wanted to double check.

                Oct 22 05:13:26 localhost.localdomain nginx[11343]: nginx: [emerg] unexpected end of file, expecting "}" in /etc/nginx...nf:41
                
                1 Reply Last reply Reply Quote 0
                • stacksofplatesS
                  stacksofplates
                  last edited by stacksofplates

                  Once you put the brace in, then type

                  sudo systemctl reload nginx
                  sudo systemctl start nginx
                  
                  JoyJ 1 Reply Last reply Reply Quote 0
                  • JoyJ
                    Joy @stacksofplates
                    last edited by

                    @johnhooks said:

                    Once you put the bracket in, then type

                    sudo systemctl reload nginx
                    sudo systemctl start nginx
                    

                    I will double check my config, I'll get back

                    1 Reply Last reply Reply Quote 1
                    • JoyJ
                      Joy @stacksofplates
                      last edited by

                      @johnhooks said:

                      Looks like you missed the last }. Put one after the curly brace at the bottom of your config file.

                      I already did and i got the same error

                      stacksofplatesS 1 Reply Last reply Reply Quote 0
                      • stacksofplatesS
                        stacksofplates @Joy
                        last edited by

                        @Joy said:

                        @johnhooks said:

                        Looks like you missed the last }. Put one after the curly brace at the bottom of your config file.

                        I already did and i got the same error

                        Ok what's the ouput of sudo systemctl status nginx again? Does it still say expecting "}" in /etc/nginx.conf:41?

                        JoyJ 1 Reply Last reply Reply Quote 0
                        • stacksofplatesS
                          stacksofplates @Joy
                          last edited by stacksofplates

                          @Joy said:

                          @johnhooks said:

                          Can you paste the contents your /etc/nginx.conf file?

                          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;

                          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 {
                               
                              include /etc/nginx/default.d/*.conf;
                          

                          }

                          If you made a config file in /etc/nginx/conf.d/ then take out

                          server {
                              include /etc/nginx/default.d/*.conf;
                          }
                          

                          Then do

                          sudo systemctl reload nginx
                          sudo systemctl restart nginx
                          

                          I apologize, I should have caught that in the beginning.

                          1 Reply Last reply Reply Quote 0
                          • JoyJ
                            Joy @stacksofplates
                            last edited by

                            @johnhooks said:

                            @Joy said:

                            @johnhooks said:

                            Looks like you missed the last }. Put one after the curly brace at the bottom of your config file.

                            I already did and i got the same error

                            Ok what's the ouput of sudo systemctl status nginx again? Does it still say expecting "}" in /etc/nginx.conf:41?

                            expecting "}" in /etc/nginx.conf:37

                            1 Reply Last reply Reply Quote 0
                            • stacksofplatesS
                              stacksofplates
                              last edited by

                              Did you create a .conf file in /etc/nginx/conf.d/?

                              JoyJ 2 Replies Last reply Reply Quote 0
                              • JoyJ
                                Joy @stacksofplates
                                last edited by

                                @johnhooks said:

                                Did you create a .conf file in /etc/nginx/conf.d/?

                                yes, i did. I will check the file and will post it here

                                1 Reply Last reply Reply Quote 0
                                • JoyJ
                                  Joy @stacksofplates
                                  last edited by

                                  @johnhooks said:

                                  Did you create a .conf file in /etc/nginx/conf.d/?

                                  server {
                                  listen 80;

                                  server_name 104.167.112.241;
                                  
                                  auth_basic "Restricted Access";
                                  auth_basic_user_file /etc/nginx/htpasswd.users;
                                  
                                  location / {
                                      proxy_pass http://localhost:5601;
                                      proxy_http_version 1.1;
                                      proxy_set_header Upgrade $http_upgrade;
                                      proxy_set_header Connection 'upgrade';
                                      proxy_set_header Host $host;
                                      proxy_cache_bypass $http_upgrade;        
                                  }
                                  

                                  }

                                  stacksofplatesS 1 Reply Last reply Reply Quote 0
                                  • stacksofplatesS
                                    stacksofplates @Joy
                                    last edited by stacksofplates

                                    @Joy said:

                                    @johnhooks said:

                                    Did you create a .conf file in /etc/nginx/conf.d/?

                                    server {
                                    listen 80;

                                    server_name 104.167.112.241;
                                    
                                    auth_basic "Restricted Access";
                                    auth_basic_user_file /etc/nginx/htpasswd.users;
                                    
                                    location / {
                                        proxy_pass http://localhost:5601;
                                        proxy_http_version 1.1;
                                        proxy_set_header Upgrade $http_upgrade;
                                        proxy_set_header Connection 'upgrade';
                                        proxy_set_header Host $host;
                                        proxy_cache_bypass $http_upgrade;        
                                    }
                                    

                                    }

                                    Ok. You will want to remove

                                    server {
                                        include /etc/nginx/default.d/*.conf;
                                    }
                                    

                                    from the /etc/nginx/nginx.conf file.

                                    Then type:

                                    sudo systemctl reload nginx
                                    sudo systemctl restart nginx
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • JoyJ
                                      Joy
                                      last edited by

                                      I removed the
                                      server {
                                      include /etc/nginx/default.d/*.conf;
                                      }

                                      but when i run the command "nginx -t -c /etc/nginx/nginx.conf" it says
                                      nginx: [emerg] unexpected end of file, expecting "}" in /etc/nginx/nginx.conf:35

                                      stacksofplatesS 1 Reply Last reply Reply Quote 0
                                      • stacksofplatesS
                                        stacksofplates @Joy
                                        last edited by

                                        @Joy said:

                                        I removed the
                                        server {
                                        include /etc/nginx/default.d/*.conf;
                                        }

                                        but when i run the command "nginx -t -c /etc/nginx/nginx.conf" it says
                                        nginx: [emerg] unexpected end of file, expecting "}" in /etc/nginx/nginx.conf:35

                                        ok paste your nginx.conf file again

                                        JoyJ 1 Reply Last reply Reply Quote 0
                                        • JoyJ
                                          Joy @stacksofplates
                                          last edited by

                                          @johnhooks said:

                                          @Joy said:

                                          I removed the
                                          server {
                                          include /etc/nginx/default.d/*.conf;
                                          }

                                          but when i run the command "nginx -t -c /etc/nginx/nginx.conf" it says
                                          nginx: [emerg] unexpected end of file, expecting "}" in /etc/nginx/nginx.conf:35

                                          ok paste your nginx.conf file again

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

                                          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.
                                          

                                          "}"

                                          1 Reply Last reply Reply Quote 0
                                          • stacksofplatesS
                                            stacksofplates
                                            last edited by stacksofplates

                                            Are there quotes around the last curly brace?

                                            Also, you still need the include /etc/nginx/conf.d/*.conf;

                                            Here's my nginx.conf file, you can use it.

                                            # 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;
                                            
                                            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;
                                            
                                            }
                                            
                                            JoyJ 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post