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

    nginx not running

    Scheduled Pinned Locked Moved Official API - Evok
    5 Posts 2 Posters 1.7k Views
    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.
    • J
      juntiedt
      last edited by

      I installed evok on rpi4 with buster. One wire, websocket runs ok but I am unable to run the control panel due to nginx problems.

      ● nginx.service - A high performance web server and a reverse proxy server
         Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
         Active: failed (Result: exit-code) since Thu 2020-02-27 10:18:03 CET; 46s ago
           Docs: man:nginx(8)
        Process: 11233 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
      
      Feb 27 10:18:03 raspberrypi systemd[1]: Starting A high performance web server and a reverse proxy server...
      Feb 27 10:18:03 raspberrypi nginx[11233]: nginx: [emerg] invalid port in upstream "localhost:" in /etc/nginx/sites-enabled/evok:2
      Feb 27 10:18:03 raspberrypi nginx[11233]: nginx: configuration file /etc/nginx/nginx.conf test failed
      Feb 27 10:18:03 raspberrypi systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
      Feb 27 10:18:03 raspberrypi systemd[1]: nginx.service: Failed with result 'exit-code'.
      Feb 27 10:18:03 raspberrypi systemd[1]: Failed to start A high performance web server and a reverse proxy server.
      

      Any idea how to fix it without reinstalling evok?

      1 Reply Last reply
      Reply Quote 0
      • M
        martin_triska
        last edited by

        Hello @juntiedt,

        it seems that the evok site configuration file has not a valid content.

        1. What version of Evok are you running?
        2. Did you follow the installation guide on Evok github page (section Legacy installation process using a shell script)? Note that the .deb package installation is not available for Unipi1.1[lite].
        3. Can you send us the content of your /etc/nginx/sites-enabled/evok file?
        1 Reply Last reply
        Reply Quote 0
        • J
          juntiedt
          last edited by juntiedt

          requested file /etc/nginx/sites-enabled/evok file:

          installation legacy with script as on git hub

          installation 2 weeks ago

          upstream evok {
                  server localhost:;
          }
          
          server {
          	listen  default_server;
          	server_name  _;
          
          	#ssl on;
          	#ssl_certificate      /etc/nginx/democert.pem;
          	#ssl_certificate_key  /etc/nginx/democert.key;
          
          	#access_log  /var/log/evok.access.log;
          	access_log  off;
          	root /var/www/evok;
          
          	location / {
          	    index index.html;	    
          	}
          	
          	location /favicon.ico {
          		alias /var/www/evok/favicon.ico;
          	}
          
          	location /ws {
          		proxy_pass http://evok;
          		proxy_set_header Host $host:$server_port;
          		proxy_http_version 1.1;
          		proxy_set_header Upgrade $http_upgrade;
          		proxy_set_header Connection "upgrade";
          		proxy_buffering off;
          		proxy_cache off;
          		proxy_read_timeout 180;
          	}
          
          	location /rest {
          		proxy_pass http://evok;
          		proxy_set_header Host      $host:$server_port;
          	}
          	
          	location /json {
          		proxy_pass http://evok;
          		proxy_set_header Host      $host:$server_port;
          	}
          	location /bulk {
          		proxy_pass http://evok;
          		proxy_set_header Host	$host:$server_port;
          	}
          	location /rpc {
          		proxy_pass http://evok;
          		proxy_set_header Host	$host:$server_port;
          	}
          	
          }
          
          1 Reply Last reply
          Reply Quote 0
          • M
            martin_triska
            last edited by

            OK, now it is a bit clearer. You probably did not insert TCP port while you have been asked for it during the installation process. Default values within the file are:

            upstream evok {
                    server localhost:8080;
            }
            
            server {
            	listen 80 default_server;
            	server_name  _;
            
            	#ssl on;
            	#ssl_certificate      /etc/nginx/democert.pem;
            	#ssl_certificate_key  /etc/nginx/democert.key;
            
            	#access_log  /var/log/evok.access.log;
            	access_log  off;
            	root /var/www/evok;
            
            	location / {
            	    index index.html;	    
            	}
            	
            	location /favicon.ico {
            		alias /var/www/evok/favicon.ico;
            	}
            
            	location /ws {
            		proxy_pass http://evok;
            		proxy_set_header Host $host:$server_port;
            		proxy_http_version 1.1;
            		proxy_set_header Upgrade $http_upgrade;
            		proxy_set_header Connection "upgrade";
            		proxy_buffering off;
            		proxy_cache off;
            		proxy_read_timeout 180;
            	}
            
            	location /rest {
            		proxy_pass http://evok;
            		proxy_set_header Host      $host:$server_port;
            	}
            	
            	location /json {
            		proxy_pass http://evok;
            		proxy_set_header Host      $host:$server_port;
            	}
            	location /bulk {
            		proxy_pass http://evok;
            		proxy_set_header Host	$host:$server_port;
            	}
            	location /rpc {
            		proxy_pass http://evok;
            		proxy_set_header Host	$host:$server_port;
            	}
            	
            }
            
            
            1 Reply Last reply
            Reply Quote 1
            • J
              juntiedt
              last edited by

              Hi Martin,

              thanks for your help and support.
              All running again!

              regards Hannes

              1 Reply Last reply
              Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post