Eric Monjoin
Staff Consulting Architect but also pilot, spending time in front of my computer or flying in the air...

App Volumes 4.5 – Error “Failed to connect Manager Service..” when registering additional App Volume Manager servers

During the installation of App Volume 2111 (4.5), if you try to register additional App Volumes Managers, you would certainly failed with the following error message :

And if you look at in the nginx.log, you would see the following error :

2021/12/06 22:15:08 [info] 5200#5264: *72 client sent plain HTTP request to HTTPS port while reading client request headers, client: 192.168.0.67, server: 0.0.0.0, request: "POST /cv_api/sessions HTTP/1.1", host: "appvol4mgr01.domain.dom:443"

The issue seems to be due to an http request instead of an https, so to solve this it will depend of where you are in the installation process:

Case #1 – You didn’t install any App Volumes server

Then during the installation of the first App Volumes Manager, check you want also http connection and when you register the additional App Volumes Manager server then specify : http://<appvol_fqdn:80 as target

Case #2 – You already installed the first App Volumes Server

In this case, edit the nginx.conf file, add the following lines and restart App Volumes Service:

 server {
       server_name  0.0.0.0;
        listen       80;
        listen       [::]:80;
        root   ../public;
        rewrite ^/(.*)/$ /$1 permanent;
        access_log  logs/access_http.log  main;
        error_log   logs/error_http.log  info;
        charset utf-8;
        override_charset on;
        gzip on;
        gzip_types application/json application/javascript;
        error_page  404              /404.html;
        error_page  502              /502.html;
        #error_page   500 502 503 504  /500.html;
        # updated by clock.rb
        location ~* ^.+\.(jpg|jpeg|gif|png|ico|zip|woff|woff2|eot|svg|ttf)$ {
            expires max;
            break;
        }
        location ~* ^.+\.(css|js|htm|html|json)$ {
            #expires 0; # expire immediately
            expires 5m;
            break;
        }
        include location/api_redirect_location.conf;
        location / {
          try_files /index.html @manager;
        }
        location @manager {
            proxy_connect_timeout 10;
            #proxy_next_upstream off;
            proxy_next_upstream timeout;
            proxy_read_timeout 600;
            proxy_send_timeout 30;
            send_timeout 30;
            proxy_redirect off;
            server_name_in_redirect off;
            proxy_pass_header Cookie;
            proxy_pass_header Set-Cookie;
            proxy_pass_header X-Accel-Redirect;
            proxy_set_header Host $host:80;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            add_header X-Backend $upstream_addr;
            add_header X-Frame-Options SAMEORIGIN;
            add_header X-Content-Type-Options nosniff;
            add_header X-XSS-Protection "1; mode=block";
            proxy_pass http://manager;
        }
    }

Once the service is restarted, register the additional App Volumes Manager server then specify : http://<appvol_fqdn:80 as target

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *