B4J Question [ABMaterial] Websocket losing connection

Peachy

New Member
Hello, having an issue with our ABMaterial service, we have it set up behind an nginx reverse proxy which connects through ssl to cloudflare for our URL. For some reason recently the pages websocket has started to drop connection and reload itself, this happens on any page. if you would like to test, the URL is salesapp2.groupsrus.co.za, put some text in the login fields and give it about 2-3 minutes and it reloads. This does not happen when you connect directly with it's IP.
Have spent a substantial amount of time going over the reverse proxy settings, over the cloudflare settings, but i'm at a loss as to what could be causing it, my only guess it doesn't like the headers that nginx sends it? I am not sure, i didn't write the website but i set up the proxy and DNS. Maybe something to do with the ssl as well? Any input would be greatly appreciated.

the nginx config for nginx and the salesapp2.groupsrus.co.za proxy is as follows

groupsrus2.co.za:
upstream groups2 {
                server 192.168.193.1:51095; #This is the main server's IP on the vpn between them
                keepalive 64;
                keepalive_timeout 86400;
 }

server {
        listen 443 ssl;
        server_name salesapp2.groupsrus.co.za;
        ssl_certificate     /etc/nginx/certs/www.groupsrus.co.za.cert;
        ssl_certificate_key /etc/nginx/certs/www.groupsrus.co.za.key;
        ssl_session_cache builtin:1000  shared:SSL:10m;
        ssl_prefer_server_ciphers on;
        ssl_session_timeout 50m;

        location / {
                proxy_pass http://groups2;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_http_version 1.1;
                proxy_set_header Connection $connection_upgrade;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Host $host;
                proxy_read_timeout 86400;
                proxy_connect_timeout 86400;
                }
}

nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65000;
        types_hash_max_size 2048;
        # server_tokens off;

        server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        map $http_upgrade $connection_upgrade {
                default upgrade;
        '' Upgrade ;
        }

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;


        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;

}
 

Peachy

New Member
Yeah, i did see your post, but its for apache and we use nginx, but i might just try set up apache instead and see if that works, but i still wish i could work out why exactly nginx just randomly stopped working :/
 
Upvote 0

Peachy

New Member
In the end, i just set up the reverse proxy by itself and removed cloudflare from the equation, looks like the sites are no longer auto-refreshing, so that issue is sorted
 
Upvote 0
Top