After upgrading flashphoner can't get it to work

Dani

Member
I've used the automatic update for WebCallServer -
try to start with systemctl start get me these errors:

● webcallserver.service - Flashphoner WebCallServer
Loaded: loaded (/etc/systemd/system/webcallserver.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2022-05-27 00:01:08 EDT; 5s ago
Process: 27635 ExecStart=/bin/bash webcallserver start (code=exited, status=1/FAILURE)
Main PID: 27635 (code=exited, status=1/FAILURE)

May 27 00:01:00 systemd[1]: Started Flashphoner WebCallServer.
May 27 00:01:08 bash[27635]: FlashphonerWebCallServer: startingsudo: sorry, you must have a tty to run sudo
May 27 00:01:08 bash[27635]: sudo: sorry, you must have a tty to run sudo
May 27 00:01:08 systemd[1]: webcallserver.service: main process exited, code=exited, status=1/FAILURE
May 27 00:01:08 systemd[1]: Unit webcallserver.service entered failed state.
May 27 00:01:08 systemd[1]: webcallserver.service failed.

starting manually starts the server - but looks like it is ignoring configuration as I see no one listen on 443 and our app can't connect to the server.


After changing sudo settings - I get another error:

● webcallserver.service - Flashphoner WebCallServer
Loaded: loaded (/etc/systemd/system/webcallserver.service; enabled; vendor preset: disabled)
Active: active (exited) since Fri 2022-05-27 00:09:24 EDT; 4min 4s ago
Process: 1229 ExecStart=/bin/bash webcallserver start (code=exited, status=0/SUCCESS)
Main PID: 1229 (code=exited, status=0/SUCCESS)
Tasks: 0
CGroup: /system.slice/webcallserver.service

May 27 00:09:32 sudo[2274]: root : TTY=unknown ; PWD=/usr/local/FlashphonerWebCallServer-5.2.1227/bin ; USER=flashphoner ; COMMAND=/bin/env LD_LIBRARY_PATH=/usr/local/FlashphonerWebCallServer/lib/so java -Xmx16G -Xms16G -XX:+UseConcMarkSweepGC -XX:NewSize=1024m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=50999 -Djava.rmi.server.hostname=localhost -XX:ErrorFile=/usr/local/FlashphonerWebCallServer/logs/error%p.log -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:/usr/local/FlashphonerWebCallServer/logs/gc-core-2022-05-27_00-09.log -XX:+ExplicitGCInvokesConcurrent -Dsun.rmi.dgc.client.gcInterval=36000000000 -Dsun.rmi.dgc.server.gcInterval=36000000000
May 27 00:09:32 sudo[2274]: root : (command continued) -Dcom.flashphoner.fms.AppHome=/usr/local/FlashphonerWebCallServer -cp /usr/local/FlashphonerWebCallServer/lib/* com.flashphoner.server.license.ExpiredUpdates
May 27 00:09:33 sudo[2374]: root : TTY=unknown ; PWD=/usr/local/FlashphonerWebCallServer-5.2.1227/bin ; USER=flashphoner ; COMMAND=/bin/echo -e [2022-05-27 00:09:33] INFO startWithSudo - Starting FlashphonerWebCallServer as user flashphoner
May 27 00:09:33 sudo[2381]: root : TTY=unknown ; PWD=/usr/local/FlashphonerWebCallServer-5.2.1227/bin ; USER=flashphoner ; COMMAND=/bin/env LD_LIBRARY_PATH=/usr/local/FlashphonerWebCallServer/lib/so java -Xmx16G -Xms16G -XX:+UseConcMarkSweepGC -XX:NewSize=1024m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=50999 -Djava.rmi.server.hostname=localhost -XX:ErrorFile=/usr/local/FlashphonerWebCallServer/logs/error%p.log -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:/usr/local/FlashphonerWebCallServer/logs/gc-core-2022-05-27_00-09.log -XX:+ExplicitGCInvokesConcurrent -Dsun.rmi.dgc.client.gcInterval=36000000000 -Dsun.rmi.dgc.server.gcInterval=36000000000
May 27 00:09:33 sudo[2381]: root : (command continued) -Dcom.flashphoner.fms.AppHome=/usr/local/FlashphonerWebCallServer -Djava.library.path=/usr/local/FlashphonerWebCallServer/lib/so:/usr/local/FlashphonerWebCallServer/lib -DWCS_NON_ROOT=true -DsessionDebugEnabled=false -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" -cp /usr/local/FlashphonerWebCallServer/lib/* com.flashphoner.server.Server
May 27 00:09:35 sudo[2544]: root : TTY=unknown ; PWD=/usr/local/FlashphonerWebCallServer-5.2.1227/bin ; USER=flashphoner ; COMMAND=/bin/touch /usr/local/FlashphonerWebCallServer/bin/FlashphonerWebCallServer
May 27 00:09:35 sudo[2565]: root : TTY=unknown ; PWD=/usr/local/FlashphonerWebCallServer-5.2.1227/bin ; USER=flashphoner ; COMMAND=/bin/echo -e [2022-05-27 00:09:35] INFO waitForHealth - Will wait for server response at least 10 seconds
May 27 00:09:35 bash[1229]: FlashphonerWebCallServer: starting[ OK ]
May 27 00:09:35 sudo[2608]: root : TTY=unknown ; PWD=/usr/local/FlashphonerWebCallServer-5.2.1227/bin ; USER=flashphoner ; COMMAND=/bin/echo -e [2022-05-27 00:09:35] INFO start - FlashphonerWebCallServer started, pid 2399
May 27 00:09:35 systemd[1]: New main PID 2399 does not belong to service, and PID file is not owned by root. Refusing.
 
Last edited:

Dani

Member
Hi Max, I've reverted the server back to the old image, as the system should be kept running. I can try redoing it next week at the same time - if this is working time on your side, as I have a short window when I can keep the system "down" for debugging this.
 

Max

Administrator
Staff member
You can deploy a staging server from the image you tried to upgrade, and reproduce the issue on it. We need a permanent 24/7 access to check the server.
You can also provide an additional data: collect a report from the old image as described here and send using this form. We'll try to reproduce update issue in our test environment in this case.
 

Max

Administrator
Staff member
We checked your server. The logs show that it cannot bind port 443:
1653876443239.png

To fix this, please do the following:
1. Stop WCS
Code:
systemctl stop webcallserver
2. Open the file /usr/local/FlashphonerWebCallServer/bin/setenv.sh in your favourite editor
Code:
nano /usr/local/FlashphonerWebCallServer/bin/setenv.sh
3. Change
Code:
WCS_NON_ROOT=true
to
Code:
WCS_NON_ROOT=false
1653876766863.png

Save changes and close the file
4. Start WCS
Code:
systemctl stop webcallserver
Then, server should work. We've successfully tested publishing and playback on your server
1653876908515.png
 

Dani

Member
is this change related to the update? it worked before this upgrade. thank you for the analysis
 

Max

Administrator
Staff member
is this change related to the update?
Yes. In latest builds, WCS main process is started from flashphoner user by default. In this case, a privileged ports (443 for example) may not be used, so it's necessary to launch the main process from root. The setting recommended above does it.
 

Dani

Member
Server does work (production) but I have a strange issue:
after running systemctl start webcallserver - this is what I get as systemctl status webcallserver:


root@cyber-net bin]# systemctl status webcallserver
● webcallserver.service - Flashphoner WebCallServer
Loaded: loaded (/etc/systemd/system/webcallserver.service; enabled; vendor preset: disabled)
Active: active (exited) since Thu 2022-06-02 23:44:40 EDT; 18s ago
Process: 10449 ExecStop=/bin/bash webcallserver stop (code=exited, status=0/SUCCESS)
Process: 10796 ExecStart=/bin/bash webcallserver start (code=exited, status=0/SUCCESS)
Main PID: 10796 (code=exited, status=0/SUCCESS)
Tasks: 120
CGroup: /system.slice/webcallserver.service
└─11378 java -Xmx16G -Xms16G -XX:+UseConcMarkSweepGC -XX:NewSize=1024m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.auth...


The server is running though.
So I'm not sure why I get active (exited) instead of active (running)

I see the same in the dev server I've created for you - should you want to inspect this yourself.
 

Max

Administrator
Staff member
The server is running though.
So I'm not sure why I get active (exited) instead of active (running)
That's because systemctl can't find the pid file to monitor. This is not the error, but if you prefer to fix this, do the following:
1. Open the file /etc/systemd/system/webcallserver.service
Code:
sudo nano /etc/systemd/system/webcallserver.service
2. Change the parameter
Code:
PIDFile=/usr/local/FlashphonerWebCallServer/bin/FlashphonerMainWebCallServer.pid
to
Code:
PIDFile=/var/run/FlashphonerMainWebCallServer.pid
then save and close the file
3. Reload service units
Code:
sudo systemctl daemon-reload
4. Restart WCS service
Code:
sudo systemctl restart webcallserver
 
Last edited:
Top