Skip to content

Commit

Permalink
fix(bbb-conf): remove tomcat servlet traces from bbb-conf
Browse files Browse the repository at this point in the history
  • Loading branch information
antobinary committed Aug 10, 2023
1 parent 3222d2b commit e8d311d
Showing 1 changed file with 0 additions and 84 deletions.
84 changes: 0 additions & 84 deletions bigbluebutton-config/bin/bbb-conf
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,9 @@ source /etc/bigbluebutton/bigbluebutton-release

if [ -f /etc/centos-release ] || [ -f /etc/system-release ]; then
DISTRIB_ID=centos
TOMCAT_USER=tomcat
TOMCAT_DIR=/var/lib/$TOMCAT_USER
SERVLET_LOGS=/usr/share/tomcat/logs
REDIS_SERVICE=redis.service
else
. /etc/lsb-release # Get value for DISTRIB_ID
if [ "$DISTRIB_CODENAME" == "focal" ]; then
TOMCAT_USER=tomcat9
fi
TOMCAT_DIR=/var/lib/$TOMCAT_USER
SERVLET_LOGS=$TOMCAT_DIR/logs
REDIS_SERVICE=redis-server
fi

Expand Down Expand Up @@ -350,12 +342,6 @@ uncomment () {

stop_bigbluebutton () {
echo "Stopping BigBlueButton"

if systemctl list-units --full -all | grep -q $TOMCAT_USER.service; then
TOMCAT_SERVICE=$TOMCAT_USER
systemctl stop $TOMCAT_SERVICE
fi

systemctl stop bigbluebutton.target
}

Expand Down Expand Up @@ -383,18 +369,6 @@ start_bigbluebutton () {

echo "Starting BigBlueButton"

if systemctl list-units --full -all | grep -q $TOMCAT_USER.service; then
TOMCAT_SERVICE=$TOMCAT_USER

[ -z "$TOMCAT_SERVICE" ] || systemctl start $TOMCAT_SERVICE || {
echo
echo "# Warning: $TOMCAT_SERVICE could not be started. Please, check BBB-LTI."
echo "# Run the command:"
echo "# sudo journalctl -u $TOMCAT_SERVICE"
echo "# To better understand the ERROR"
}
fi

systemctl restart bigbluebutton.target

if [ -f /usr/lib/systemd/system/bbb-html5.service ]; then
Expand All @@ -407,10 +381,6 @@ start_bigbluebutton () {
display_bigbluebutton_status () {
units="nginx freeswitch $REDIS_SERVICE bbb-apps-akka bbb-fsesl-akka"

if [ -d $TOMCAT_DIR ]; then
units="$units $TOMCAT_USER"
fi

if [ -f /usr/lib/systemd/system/bbb-html5.service ]; then
units="$units mongod bbb-html5"

Expand Down Expand Up @@ -477,10 +447,6 @@ display_bigbluebutton_status () {
units="$units bbb-transcription-controller"
fi

if systemctl list-units --full -all | grep -q $TOMCAT_USER.service; then
TOMCAT_SERVICE=$TOMCAT_USER
fi

line='—————————————————————————————►'
for unit in $units; do
status=$(systemctl is-active "$unit")
Expand Down Expand Up @@ -893,23 +859,6 @@ check_state() {
RUNNING_APPS="${RUNNING_APPS} Nginx"
fi

if ! ss -ant | grep '8090' > /dev/null; then
print_header
if [ ! -z "$TOMCAT_SERVICE" ]; then
NOT_RUNNING_APPS="${NOT_RUNNING_APPS} ${TOMCAT_USER} or grails"
fi
else
if ps aux | ps -aef | grep -v grep | grep grails | grep run-app > /dev/null; then
print_header
RUNNING_APPS="${RUNNING_APPS} Grails"
echo "# ${TOMCAT_USER}: noticed you are running grails run-app instead of ${TOMCAT_USER}"
else
if [ ! -z "$TOMCAT_SERVICE" ]; then
RUNNING_APPS="${RUNNING_APPS} ${TOMCAT_USER}"
fi
fi
fi

if ! ps aux | grep -v grep | grep '[/]usr/[s]*bin/redis-server' > /dev/null; then
print_header
NOT_RUNNING_APPS="${NOT_RUNNING_APPS} redis-server"
Expand Down Expand Up @@ -996,16 +945,6 @@ check_state() {
;;
esac


#
# Check that the servlet container has started properly and has created log files
#
if [ -d $TOMCAT_DIR ]; then
if [ -z "$(ls -A $SERVLET_LOGS)" ]; then
echo "# empty directory: $SERVLET_LOGS contains no logs"
fi
fi

#
# Check if the user is running their own bbb-web
#
Expand Down Expand Up @@ -1110,14 +1049,6 @@ check_state() {
fi

if bbb-conf --status | grep -q inactive; then
if systemctl list-units --full -all | grep -q $TOMCAT_USER.service; then
TOMCAT_SERVICE=$TOMCAT_USER

if bbb-conf --status | grep -q inactive | grep -q $TOMCAT_SERVICE; then
echo "# Warning: $TOMCAT_SERVICE is not started correctly"
echo "#"
fi
fi
if bbb-conf --status | grep inactive; then
echo "# Error: Detected some processes have not started correctly"
echo "#"
Expand Down Expand Up @@ -1494,7 +1425,6 @@ if [ $ZIP ]; then

touch /tmp/empty
tar cf $TMP_LOG_FILE /tmp/empty > /dev/null 2>&1
tar rfh $TMP_LOG_FILE $SERVLET_LOGS > /dev/null 2>&1
tar rf $TMP_LOG_FILE /var/log/bigbluebutton/* > /dev/null 2>&1
tar rf $TMP_LOG_FILE /var/log/bbb-apps-akka > /dev/null 2>&1
tar rf $TMP_LOG_FILE /var/log/bbb-fsesl-akka > /dev/null 2>&1
Expand Down Expand Up @@ -1546,16 +1476,6 @@ if [ $DEBUG ]; then
echo
fi

if [ -d $SERVLET_LOGS ]; then
rm -rf /tmp/t
$SUDO grep --directories=skip Exception $SERVLET_LOGS/* | grep -v CacheExceptionHandlerFactory > /tmp/t
if [ -s /tmp/t ]; then
echo " -- Exceptions found in $SERVLET_LOGS/ -- "
cat /tmp/t
echo
fi
fi

rm -rf /tmp/t
if [ -s /var/log/nginx/error.log ]; then
cat /var/log/nginx/error.log | grep -v "/fcs/ident2" > /tmp/t
Expand Down Expand Up @@ -1763,10 +1683,6 @@ if [ $CLEAN ]; then
rm -f /var/log/bigbluebutton/presentation/*
fi

if [[ $SERVLET_LOGS ]]; then
rm -rf $SERVLET_LOGS/*
fi

# Check if we are storing HTML5 logs in the server
HTML5_SERVER_LOG=0
if [[ -f /var/log/nginx/html5-client.log ]]; then
Expand Down

0 comments on commit e8d311d

Please sign in to comment.