Customers
User information
 Loading ...
Show article in Knowledge Base

 Migrate chat to websockets Export knowledge base Export     SubscribeSubscribe      Show article info

I you are running the chat/push component and are upgrading to a VisionFlow version equal to or newer than 15.6.1 you need to do some simple configuration changes for Tigase and Nginx. Follow the instructions below.

Requirements

VisionFlow version >= 15.6.1.

You need to have nginx version 1.3.13 or later to be able to configure websockets proxying.

 

Tigase configuration

Open tigase_home/etc/init.properties file and add the following lines:

ws2s/max-inactivity-time[L]=120
ws2s/watchdog_timeout[L]=50000
ws2s/watchdog_delay[L]=20000
ws2s/watchdog_ping_type[S]=xmpp

 

Nginx configuration

  • Add the following lines to the file nodes_normal.conf and change ip address and port to the values that you tigase uses if necessary (5290 is tigase port for unsecured websockets, 5291 is port for secured web sockets)

upstream websockets{

    server 127.0.0.1:5290;

}

  • Add the following lines to the file locations_443.conf for https or locations_80.conf for http

location /ws/ {

    proxy_read_timeout 120s;
    proxy_pass http://websockets;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
}
  • Add the following lines into the file nginx_root/conf/nginx.conf
    map $http_upgrade $connection_upgrade {
        default upgrade;
        '' close;
    }
  • Note:  in case of changing timeouts for tigase or nginx make sure the rules are followed
    nginx.proxy_read_timeout < tigase.max-inactivity-time

 

 

 

Now restart tigase and nginx.

 

 

 

For more info see the links:
https://nginx.org/en/docs/http/websocket.html
https://docs.tigase.net/tigase-server/7.1.3/Administration_Guide/html_chunk/watchdog.html

https://docs.tigase.net/tigase-server/7.1.3/Administration_Guide/webhelp/_websocket.html


User comments
 Loading ...