...
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 | ||||
---|---|---|---|---|
| ||||
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.
...
Code Block | ||||
---|---|---|---|---|
| ||||
cd /usr/local/FlashphonerWebCallServer/bin sudo ./webcallserver start standalone |
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:
...
Code Block | ||||
---|---|---|---|---|
| ||||
./webcallserver start standalone |
JVM parameters
Parameters are set in the wcs-core.properties file.
Additional launching options can be set in bin/setenv.sh file using the following varaibles:
WCS_JAVA_OPTS - the list of options for WCS Core
...
Launching build 5.2.976 and newer
Since build 5.2.976, , the permissions to launch WSC are defined by the following parameter in /usr/local/FlashphonerWebCallServer/
logsbin/
startup.log file according to error message returned by Java if JVM cannot start with parameters specified.
Java version automatic detection and JVM parameters correction
Since build 5.2.972, Java version is detected automatically, and JVM parameters are corrected when WCS is starting after JDK update. JVM launch parameters may also be corrected by the following command
setenv.sh
file only:
On this value (default)
Code Block | ||||
---|---|---|---|---|
| ||||
cd /usr/local/FlashphonerWebCallServer/bin
sudo ./webcallserver set-java-opts |
In this case, the parameters are corrected in the wcs-core.properties file, the previous settings are copied to a file with .backup extension and a sequence number, for example
Code Block | |
---|---|
language | WCS_NON_ROOT=true |
WCS is starting from flashphoner user
On this value
Code Block | ||||
---|---|---|---|---|
| ||||
WCS_NON_ROOT=false |
WCS is starting from root user
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.1255 the following command is available to switch launch mode:
- switching to
root
mode
Code Block | ||||
---|---|---|---|---|
| ||||
[root@localhost ~]# ls -l /usr/local/FlashphonerWebCallServer/conf/wcs-core.properties.backup.* -rw-r--r--. 1 flashphoner flashphoner 1614 Jun 23 10:15 sudo ./webcallserver set-root-mode enable |
- switching to
flashphoner
mode
Code Block | ||||
---|---|---|---|---|
| ||||
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
Since build 5.2.976, write permissions to the server folders including custom folder are checked while starting WCS from flashphoner user. If permissions are not enough, WCS will not start with the following message in /usr/local/FlashphonerWebCallServer/
...
logs/
...
Note that garbage collector (GC) is not changing automatically in this case, but its parameters can be changed (command line key names for example).startup.log
file
Code Block | ||
---|---|---|
| ||
FlashphonerWebCallServer cannot be started from user flashphoner, please fix the permissions to the folders or run 'webcallserver set-permissions'! |
In this case, the following command should be executed
Code Block | ||||
---|---|---|---|---|
| ||||
sudo ./webcallserver set-permissions |
JVM parameters
Parameters are set in the wcs-core.properties file.
Additional launching options can be set in bin/setenv.sh file using the following varaibles:
WCS_JAVA_OPTS - the list of options for WCS Core
JVM parameters are checked for compatibility with current Java version on startup. The error messages are written to /usr/local/FlashphonerWebCallServer/logs/startup.log file according to error message returned by Java if JVM cannot start with parameters specified.
Java version automatic detection and JVM parameters correction
Since build 5.2.972, Java version is detected automatically, and JVM parameters are corrected when WCS is starting after JDK update. JVM launch parameters may also be corrected by the following command
Code Block | ||||
---|---|---|---|---|
| ||||
cd /usr/local/FlashphonerWebCallServer/bin
sudo ./webcallserver set-java-opts |
In this case, the parameters are corrected in the wcs-core.properties file, the previous settings are copied to a file with .backup extension and a sequence number, for example
Code Block | ||||
---|---|---|---|---|
| ||||
[root@localhost ~]# ls -l /usr/local/FlashphonerWebCallServer/conf/wcs-core.properties.backup.*
-rw-r--r--. 1 flashphoner flashphoner 1614 Jun 23 10:15 /usr/local/FlashphonerWebCallServer/conf/wcs-core.properties.backup.0
-rw-r--r--. 1 flashphoner flashphoner 1543 Jun 23 10:17 /usr/local/FlashphonerWebCallServer/conf/wcs-core.properties.backup.1 |
Note that garbage collector (GC) is not changing automatically in this case, but its parameters can be changed (command line key names for example).
Automatic WCS health checking after launch
When WCS process is launched, webcallserver
script cheks if it is healthy waiting for 200 OK response to a special query
Code Block | ||
---|---|---|
| ||
GET http://localhost:8081/health-check HTTP/1.1 |
Since build 5.2.1084 it is possible to set a maximum number of health checking tries using the following command line key
Code Block | ||||
---|---|---|---|---|
| ||||
sudo ./webcallserver start --health-timeout 10 |
By default, 10 tries will be done with 1 second timeout between them. The script waits 1 second for response on every try. Therefore, a maximum waiting time may reach up to 20 seconds by default (10 * (1+1)
).
If WCS process is not responding to all the queries, or the response is not 200 OK, the following message will be written to launch log startup.log
and to console
Code Block | ||
---|---|---|
| ||
FlashphonerWebCallServer started, but is not healthy, please try to restart |
This health checking may be disabled if necessary by setting a zero tries
Code Block | ||||
---|---|---|---|---|
| ||||
sudo ./webcallserver start --health-timeout 0 |