etl_logs.sh -> kaltura access log couldnt be processed

4 replies [Last post]
Joined: 07/18/2009
Points: 11

/home/etl//etlsource/execute/etl_logs.sh

It seems that the script miss a command maybe?

#!/bin/bash
MAILUSERS="removed"

if [ $# -eq 0 ]; then
        echo "No specific date requested, taking today"
        WHEN=$(date +%Y%m%d)
elif [ $# -eq 1 ]; then
        echo "You requested $1"
        WHEN=$1
else
        echo "Invalid user input"
        exit 1;
fi

ETLHOME="/home/etl/"
ETLOGS="${ETLHOME}/logs"
JOBLOG="${ETLOGS}/etl_job-$WHEN.log"

    if [ -s /opt/kaltura/log//kaltura_apache_access.log-$WHEN.gz ] ; then
        echo -e "\n"
        echo "-----------------------------" >>$JOBLOG
        echo "kaltura access log is processed" >>$JOBLOG
        echo "-----------------------------" >>$JOBLOG
        zcat /opt/kaltura/log//kaltura_apache_access.log-$WHEN.gz |php /opt/kaltura/app//alpha/scripts/create_event_log_from_apache_access_log.php  2>>$JOBLOG > ${ETLHOME}/events/_events_log_combined_kaltura-${WHEN}

        mv ${ETLHOME}/events/_events_log_combined_kaltura-${WHEN} ${ETLHOME}/events/events_log_combined_kaltura-${WHEN}

   else
        echo -e "\n"
        echo "-----------------------------" >>$JOBLOG
        echo "kaltura access log couldnt be  processed" >>$JOBLOG
        echo "-----------------------------" >>$JOBLOG
        echo "kaltura access log couldnt be  processed" | mail -s "etljob file failed : `date`" ${MAILUSERS}
   fi

Any help would be greatly appreciated.

Thx :)

Joined: 01/05/2009
Points: 1697

Can you please be more specific?
What error/s do you get, what is your system specs...

Zohar

Joined: 07/18/2009
Points: 11

Hello,

Sorry about not posting enough info. I've post this a bit in an hurry.

So the problem is I receive an email saying "kaltura access log couldnt be processed".
So it looks like the script goes in the else statement.

I'm using kaltura 2.0.2 on a Debian box.

So looking at the script, if no date are given, it will use today's date and will try to get the compress log file with the current date.
Thing is I don't see this log in my folder.
The current log is indeed not compressed. ( as probably there is not much to log so the file size doesn't grow, the auto rotate of logs doesn't kick in )

Hopefully that make sens.
So maybe trying to check if this log file exists and if not try to take the current log ( not compressed )

Cheers.

Joined: 08/20/2010
Points: 1

I'm having the same issue. I suspecting a permissions issue with the log directory in /opt/kaltura/log. What process is supposed to create the compressed log file in this directory?

Joined: 10/05/2010
Points: 2

same goes here. Debian Lenny (2.6.26-1-xen-686), KalturaCE 2.0.2, I recieved the same mail "kaltura access log couldnt be processed". in /opt/kaltura/log I have kaltura_apache_access_log but no kaltura_apache_access.log-%Y%m%d.gz which seems to cause this error message. any help would be appreciated.

(I also have kaltura_api_v3.log there with the size 325MB and still growing continously, someone could ensure me this is caused by normal behaviour. I pretty much doubt it...)

thanks in advance,
zphd