Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All the ways to start WCS

...

Launch as service 

Use the following command to launch WCS as service:

Code Block
languagebash
themeRDark
sudo systemctl start webcallserver

Since build 5.2.801, WCS is starting as service from flashphoner user for better security

Besides, you can start the server using:

Code Block
languagebash
themeRDark
cd /usr/local/FlashphonerWebCallServer/bin
sudo ./webcallserver start

In builds 5.2.840 - 5.2.863 this command starts WCS also from flashphoner user.

Environment variables setup

Environment variables and parameters of the start are set in the setenv.sh script. In this script you can se additional parameters for WCS Core and WCS Manager. Also, here you can set the parameter that prevent memory leaks on multi-CPU systems:

Code Block
languagebash
themeRDark
MALLOC_ARENA_MAX=4

Starting with stdout output

In some cases, for example, if the server won't start and does not produce any errors, you may need to start the server with direct logging to the 'stdout' console. Direct output to stdout cannot be used in production, because the server will be stopped if the console is closed or the SSH connection is lost. That is why we recommend using stdout output only for debug purposes.

To start the server in this mode, use the following command:This is the preferrable way to start WCS. In this case, the service will start from root user, and the main WCS process will start from flashphoner or root user depending on launch mode configuration.

Since build 5.2.1537 the service type is changed from simple to forking. Also the file permissions containing the main WCS process PID are set according to systemd requirements. The service is marked as active (running), and systemd may send a signaldirectly to the main WCS process to stop it if necessary

Image Added

Automatic service restart on failure

Since build 5.2.1562 the service unit webcallserver.service will be restarted automatically if the service becomes failed for some reason. Up to 5 relaunch tries will be done if no more than 2 minutes passed between them.

The service still may be stopped or started manually. If service is stopped manually, it will not be relaunched.

Automatic service restart n=may be disabled with the following command

Code Block
languagebash
themeRDark
cd /usr/local/FlashphonerWebCallServer/bin
sudo ./webcallserver set-service-restart disable

Launch from command line

WCS can be started from command line if necessary:

Code Block
languagebash
themeRDark
cd /usr/local/FlashphonerWebCallServer/bin
sudo ./webcallserver start

This way to start is useful for testing and debugging purposes.

Environment variables setup

Environment variables and parameters of the start are set in the setenv.sh script. In this script you can use additional parameters for WCS Core and WCS Manager. Also, here you can set the parameter that prevent memory leaks on multi-CPU systems:

Code Block
languagebash
themeRDark
MALLOC_ARENA_MAX=4

Starting with stdout output

In some cases, for example, if the server won't start and does not produce any errors, you may need to start the server with direct logging to the stdout console. Direct output to stdout cannot be used in production, because the server will be stopped if the console is closed or the SSH connection is lost. That is why we recommend using stdout output only for debug purposes.

To start the server in this mode, use the following command:

Code Block
languagebash
themeRDark
cd /usr/local/FlashphonerWebCallServer/bin
sudo ./webcallserver start standalone

Starting with JVM output redirection to a log file

Since build 5.2.1562 WCS may be launched with JVM output redirected to a file like direct stdout logging

Code Block
languagebash
themeRDark
cd /usr/local/FlashphonerWebCallServer/bin
sudo ./webcallserver start --java-log

In this case, all Java output will be redirected to the /usr/local/FlashphonerWebCallServer/logs/java.log file. The feature should be used for debugging purposes only but not in production, because the resulting file size may be too large.

Launching with different user permissions

Launching builds 5.2.864-5.2.972

Since build 5.2.864, the permissions to launch WSC are defined as follows:

1. The command

Code Block
languagebash
themeRDark
sudo systemctl start webcallserver

starts WCS always from flashphoner user, if the user exists in system

2. The command

Code Block
languagebash
themeRDark
./webcallserver start

starts WCS from root when executing from root

Code Block
languagebash
themeRDark
sudo ./webcallserver start

or from flashphoner user, when executing from other non-root user

This affects the stanadlone mode too

Code Block
languagebash
themeRDark
cd /usr/local/FlashphonerWebCallServer/bin
sudo ./webcallserver start standalone

...

Launching

...

build 5.2.

...

976 and newer

Since build 5.2.864976, , the permissions to launch WSC are defined as follows:

1. The command

Code Block
languagebash
themeRDark
sudo systemctl start webcallserver

starts WCS always from flashphoner user, if the user exists in system

2. The command

Code Block
languagebash
themeRDark
./webcallserver start

starts WCS from root when executing from rootby the following parameter in /usr/local/FlashphonerWebCallServer/bin/setenv.sh file only:

On this value (default)

Code Block
languagebash
themeRDark
sudo ./webcallserver start

or from flashphoner user, when executing from other non-root user

...

WCS_NON_ROOT=true

WCS is starting from flashphoner user

On this value

Code Block
languagebash
themeRDark
WCS_NON_ROOT=false

WCS is starting from root user

...

./webcallserver start standalone

Launching build 5.2.976 and newer

Since build In this case, service can be started from root, user permissions to launch Java will be changed automatically.

Switching launch mode

Since build 5.2.976, , the permissions to launch WSC are defined by the following parameter in /usr/local/FlashphonerWebCallServer/bin/setenv.sh file only:On this value (default)1255 the following command is available to switch launch mode:

  • switching to root mode
Code Block
languagebash
themeRDark
WCS_NON_ROOT=true

WCS is starting from flashphoner user

...

sudo ./webcallserver set-root-mode enable
  • switching to flashphoner mode
Code Block
languagebash
themeRDark
WCS_NON_ROOT=false

WCS is starting from root user

...

sudo ./webcallserver set-root-mode disable

WCS will be stopped before settings changing and will be automatically started after settings changing to apply them.

Folder permissions setting when starting from flashphoner user

...