Reactivating Centova Cast after update issue "duplicate "https" variable"

Read 9074 times
Stopping Centova Cast: cc-ftpd cc-web (not running) cc-appserver cc-control cc-imaged
Update successful
Reactivating Centova Cast ...
Starting Centova Cast: cc-control cc-appserver cc-web nginx: [emerg] the duplicate "https" variable in /usr/local/centovacast/etc/web.d/cc-interface.conf:44
- failed
Hi,

Have just updates my own installation and now have the exact same issue as above as shown below! Anyone know how to fix as now panel down.

[root@********* ~]# /usr/local/centovacast/sbin/update

Checking Centova Cast Common Files ...
Downloading Centova Cast Common Files ...

Verifying archive integrity ...
Unpacking archive ...

Installing Centova Cast Common Files ...

Installation successful

Checking Centova Cast Application Server ...
Downloading Centova Cast Application Server ...

Saving to: â/usr/local/centovacast/var/tmp/update/cc-app-latest.tar.gzâ         Verifying archive integrity ...
Unpacking archive ...

Installing Centova Cast Application Server ...

Stopping any existing Centova Cast web service ...
Attempting to stop web: cc-web
Stopping any existing Centova Cast application server service ...
Attempting to stop app: cc-appserver
Upgrading database ...
OK
Installation successful
Starting Centova Cast application server service...
Attempting to start app: cc-appserver
Re-starting Centova Cast web service ...
Attempting to start web: cc-web

Checking Centova Cast Image Daemon ...
Downloading Centova Cast Image Daemon ...

Verifying archive integrity ...
Unpacking archive ...

Installing Centova Cast Image Daemon ...

Stopping any existing Centova Cast image daemon ...
Attempting to stop img: cc-imaged
Installation successful
Starting Centova Cast image daemon...
Attempting to start img: cc-imaged

Checking Centova Cast Web Server ...
Downloading Centova Cast Web Server ...

Saving to: â/usr/local/centovacast/var/tmp/update/cc-web-latest.tar.gzâ         Verifying archive integrity ...
Unpacking archive ...

Installing Centova Cast Web Server ...

Stopping any existing Centova Cast web service ...
Attempting to stop web: cc-web
Installation successful
Starting Centova Cast web service...
Attempting to start web: cc-web nginx: [emerg] the duplicate "https" variable in /usr/local/centovacast/etc/web.d/cc-interface.conf:44
- failed

Checking Centova Cast Control Daemon ...
Downloading Centova Cast Control Daemon ...

Verifying archive integrity ...
Unpacking archive ...

Installing Centova Cast Control Daemon ...

Stopping Centova Cast: cc-ftpd (not running) cc-web (not running) cc-appserver cc-control cc-imaged
Update successful
Reactivating Centova Cast ...
Starting Centova Cast: cc-control cc-appserver cc-web nginx: [emerg] the duplicate "https" variable in /usr/local/centovacast/etc/web.d/cc-interface.conf:44
- failed
cc-control

Checking Centova Cast FTP Server ...
Not updated, skipping


Checking IceCast ...
Not updated, skipping


Checking ices-cc ...
Not updated, skipping


Checking sc_trans v2.x ...
Not updated, skipping


Checking shoutcast1 ...
Not updated, skipping


Checking shoutcast2 ...
Not updated, skipping




[root@********* ~]# /etc/init.d/centovacast status
cc-web: not running
cc-control: not running
cc-appserver: not running
cc-ftpd: not running
cc-imaged: not running
[root@********* ~]# /etc/init.d/centovacast restart
Stopping Centova Cast: cc-ftpd (not running) cc-web (not running) cc-appserver (not running) cc-control (not running) cc-imaged (not running)
Starting Centova Cast: cc-control cc-appserver cc-web nginx: [emerg] the duplicate "https" variable in /usr/local/centovacast/etc/web.d/cc-interface.conf:44
- failed
cc-control

Regards
Mark
Here is my servers /usr/local/centovacast/etc/web.d/cc-interface.conf file below.

# =============================================================================
#
# Centova Cast - Copyright 2010-2012, Centova Technologies Inc.
# Web Interface Configuration File
#
# =============================================================================
#
# WARNING:
# These settings normally should not need to be modified except as
# instructed by Centova Technologies.
#
# Problems caused as a result of modification of this file are not covered
# under your Centova Cast support agreement.  Should you require technical
# support as a result of modifying this file, it will be billed at Centova
# Technologies' hourly professional services rate.
#

# tune FastCGI caching here:
#   keys_zone=main:5M refers to a 5MB key cache size; increase for a larger keyspace
#   inactive=10m indicates that cached data should be removed if not used within 10 minutes of being stored
#   max_size=50M indicates a maximum total cache size of 50MB on disk; increase to allow more cache space
fastcgi_cache_path   /usr/local/centovacast/var/webcache levels=1:2 keys_zone=main:5M inactive=10m max_size=50M;

upstream ccappsrv {
   server unix:/usr/local/centovacast/var/run/cc-appserver.sock;
}

server {
   # if you prefer to use an alternate port for your Centova Cast web interface, change
   # the port number below, but make sure you update MASTER_PORT in etc/cc-control.conf too
   #
   # to bind to a specific interface, use ip:port (eg: listen 10.2.3.4:2199) and
   # update MASTER_ADDR in etc/cc-control.conf as well.
   listen               2199 default;


   # if you prefer to use SSL, comment out the above "listen 2199 default;" line, uncomment the
   # next three (3) lines, and save your SSL certificate and private key as certificate.pem and
   # private.key, respectively, under /usr/local/centovacst/etc/ssl/
   #listen               2199 default ssl;
   #ssl_certificate      /usr/local/centovacast/etc/ssl/certificate.pem
   #ssl_certificate_key   /usr/local/centovacast/etc/ssl/private.key

   set $https off;



   # you can specify the hostname for your web interface here, although it's usually not needed
   server_name            centovacast;

   # if you wish to use start page urls in the format http://username.yourdomain.com (instead of the
   # standard http://yourdomain.com/start/username) you can specify yourdomain.com here and configure
   # wildcard dns for *.yourdomain.com to point to your Centova Cast web interface server's IP address
   set $startpagedomain   centovacast;

   root               /usr/local/centovacast/web;

   # do not modify this; this is automatically overwritten (at startup) with the value
   # of UPLOAD_SIZE_LIMIT in etc/centovacast.conf
   client_max_body_size   116M;

   error_page            404   /notfound.html;
   error_page            500 502 503 504   /error.html;

   fastcgi_cache_key      $request_uri;
   fastcgi_cache_use_stale   updating error timeout invalid_header http_500;

   location /upload/ {
      proxy_set_header  X-Real-IP  $remote_addr;
      proxy_pass http://127.0.0.1:2197;
      proxy_redirect default;
   }

   location /internalcontentdist/ {
      root /usr/local/centovacast/var/contentdist/;
      rewrite ^/internalcontentdist/(.*)$ /$1 break;
      return 403;
   }

   location ~ ^/static/resellers/(.*)/logofile.(.*)$ {
      root /usr/local/centovacast/var/www/resellers/$1/;
      try_files /logofile.png /logofile.gif /logofile.jpg @mainlogo;
   }

   location @mainlogo {
      root /usr/local/centovacast/web;
      rewrite ^ /theme/images/logo.png;
   }

   location /static/ {
      expires 24h;
      alias /usr/local/centovacast/var/www/;
   }

   # configure caching for start pages
   location /start/ {
      # request that browsers retain in cache for 24hr
      expires 24h;

      include fastcgi.conf;
      fastcgi_param  SCRIPT_FILENAME   $document_root/start.php;
      fastcgi_param  SCRIPT_NAME   /start.php;
      fastcgi_param  HTTPS $https;

      fastcgi_cache main;

      # regenerate server-side every 5 minutes (5m)
      fastcgi_cache_valid   200 302 5m;
      fastcgi_cache_valid   301   1d;
      fastcgi_cache_valid   any   1m;
      fastcgi_cache_min_uses   1;
      fastcgi_pass ccappsrv;
   }

   # configure short tune-in links
   location ~ ^/tunein(\.php)?/ {
      # request that browsers retain in cache for 2min
      expires 2m;

      include fastcgi.conf;
      fastcgi_param  SCRIPT_FILENAME   $document_root/tunein.php;
      fastcgi_param  SCRIPT_NAME      /tunein.php;
      fastcgi_param  HTTPS $https;

      fastcgi_cache main;

      # regenerate server-side every 2 minutes (2m)
      fastcgi_cache_valid     200 302 2m;
      fastcgi_cache_valid     301     1d;
      fastcgi_cache_valid     any     1m;
      fastcgi_cache_min_uses  1;
      fastcgi_pass ccappsrv;
   }


   # configure other short links
   location ~ ^/(recentfeed|rpc)/ {
      # request that browsers retain in cache for 2min
      expires 2m;

      include fastcgi.conf;
      fastcgi_param  SCRIPT_FILENAME   $document_root/external.php;
      fastcgi_param  SCRIPT_NAME      /external.php;
      fastcgi_param  HTTPS $https;

      fastcgi_cache main;

      # regenerate server-side every 2 minutes (2m)
      fastcgi_cache_valid     200 302 2m;
      fastcgi_cache_valid     301     1d;
      fastcgi_cache_valid     any     1m;
      fastcgi_cache_min_uses  1;
      fastcgi_pass ccappsrv;
   }

   # configure caching for external AJAX content (code snippet widgets, etc.)
   # this content is mostly dynamic so we don't want to cache it for long, but
   # in the event of a DDoS or Slashdot effect, this can mean the difference
   # between regenerating only twice a minute, and regenerating dozens of times
   # per second, thereby bringing down the server
   location ~ ^/external/rpc.php$ {
      # request that browsers retain in cache for 30sec
      expires 15s;

      include fastcgi.conf;
      fastcgi_param  HTTPS $https;

      fastcgi_cache main;

      # regenerate server-side every 15 seconds (15)
      fastcgi_cache_valid     200 302 15s;
      fastcgi_cache_valid     301     1d;
      fastcgi_cache_valid     any     1m;
      fastcgi_cache_min_uses  1;
      fastcgi_pass ccappsrv;
   }

   # configure caching for mostly-static content
   location /login/ {
      expires 24h;

      try_files $uri @notfound;

      include fastcgi.conf;
      fastcgi_param  HTTPS $https;

      fastcgi_cache main;
      fastcgi_cache_valid     200 302 24h;
      fastcgi_cache_valid     301     1d;
      fastcgi_cache_valid     any     1m;
      fastcgi_cache_min_uses  1;
      fastcgi_pass ccappsrv;
   }

   # configure handling of all other locations (mostly JavaScript files, CSS stylesheets, images, etc.)
   location / {
      if ($http_host ~ ([^\.]+).([^:]+)(.*?)) {
         set $subdomain $1;
         set $basedomain $2;
      }
      if ($basedomain = $startpagedomain) {
         rewrite ^/?$ /start/$subdomain last;
      }

      # mobile UI
      rewrite ^/[mu](/.*)$ $1;
      # deprecated/unused
      rewrite ^/js.php.* /js.php last;

      #DEV_ENCODED (developer use only)
      #if (-f /usr/local/centovacast/dev/web/$uri) {
      #   rewrite ^ /dev/web/$uri last;
      #}

      # request that browsers retain in cache for 24hr
      expires 24h;

      index  index.html index.php;
   }

   #DEV_ENCODED (developer use only)
   #location /dev/web/ {
   #      root /usr/local/centovacast/;
   #}

   location @notfound {
      return 404;
   }

   # configure handling of application files
   location ~ \.php$ {
      # mobile UI
      rewrite ^/[mu](/.*)$ $1;

      # request that browsers do not cache pure-dynamic content
      expires -1;

      try_files $uri @notfound;

      include fastcgi.conf;
      fastcgi_param  HTTPS $https;
      fastcgi_pass ccappsrv;
   }

}
OK not sure what effect this is going to have on other parts of CentovaCast but I have now got it running by reming out line 44 which the error says about.

   #set $https off;


Example of where to look below, at bottom:


# =============================================================================
#
# Centova Cast - Copyright 2010-2012, Centova Technologies Inc.
# Web Interface Configuration File
#
# =============================================================================
#
# WARNING:
# These settings normally should not need to be modified except as
# instructed by Centova Technologies.
#
# Problems caused as a result of modification of this file are not covered
# under your Centova Cast support agreement.  Should you require technical
# support as a result of modifying this file, it will be billed at Centova
# Technologies' hourly professional services rate.
#

# tune FastCGI caching here:
#   keys_zone=main:5M refers to a 5MB key cache size; increase for a larger keyspace
#   inactive=10m indicates that cached data should be removed if not used within 10 minutes of being stored
#   max_size=50M indicates a maximum total cache size of 50MB on disk; increase to allow more cache space
fastcgi_cache_path   /usr/local/centovacast/var/webcache levels=1:2 keys_zone=main:5M inactive=10m max_size=50M;

upstream ccappsrv {
   server unix:/usr/local/centovacast/var/run/cc-appserver.sock;
}

server {
   # if you prefer to use an alternate port for your Centova Cast web interface, change
   # the port number below, but make sure you update MASTER_PORT in etc/cc-control.conf too
   #
   # to bind to a specific interface, use ip:port (eg: listen 10.2.3.4:2199) and
   # update MASTER_ADDR in etc/cc-control.conf as well.
   listen               2199 default;


   # if you prefer to use SSL, comment out the above "listen 2199 default;" line, uncomment the
   # next three (3) lines, and save your SSL certificate and private key as certificate.pem and
   # private.key, respectively, under /usr/local/centovacst/etc/ssl/
   #listen               2199 default ssl;
   #ssl_certificate      /usr/local/centovacast/etc/ssl/certificate.pem
   #ssl_certificate_key   /usr/local/centovacast/etc/ssl/private.key

   #set $https off;


Now do a restart and all should be good:

[root@********* ~]# /etc/init.d/centovacast restart
Stopping Centova Cast: cc-ftpd (not running) cc-web (not running) cc-appserver (not running) cc-control (not running) cc-imaged (not running)
Starting Centova Cast: cc-control cc-appserver cc-web cc-ftpd cc-imaged
[root@********* ~]# /etc/init.d/centovacast status
cc-web: running (pid 28669)
cc-control: running (pid 28647)
cc-appserver: running (pid 28664)
cc-ftpd: not running
cc-imaged: running (pid 28681)



NOTE: I do not have FTP via panel running on my server as I also have Parallels installed!
Hmm, cc-interface.conf should have been replaced as part of the upgrade process.  I'll need to look into why that didn't happen. 

The $https issue is due to the fact that the latest build is based on the nginx 1.2 code (previously it was 0.7) and some changes were needed in cc-interface.conf... but I'm looking at our reference copy here and those changes are correct.  Clearly it's not being overwritten though, which is rather odd.
Fixed.  Update once more (wait 10min if you're reading this post immediately -- the update is in transit) to resolve this issue.