Error when trying to get account usage data: Internal Server Error

9 replies [Last post]
Joined: 12/03/2010
Points: 9

After typing in credentials and logging in to the dashboard(KMC), I am getting 2 pop-up boxes: One says:

"Error when trying to get account usage data: Internal server error occured"

Clicking ok brings up another error box:

"Internal server error occured"

I ran a  tail -f kaltura_api_v3.log when logging in and found a few errors pop up in the log when these errors showed up:

2010-12-17 13:02:53 [158.136.112.108] [1491200422] [API] [myReportsMgr::executeQuery] ERR: Invalid query: Table 'kalturadw.dwh_aggr_events_entry' doesn't exist

2010-12-17 08:02:53 [158.136.112.108] [902551634] [API] [KalturaFrontController->getExceptionObject] CRIT: exception 'Exception' with message 'could not get partner usage from DWH' in /opt/kaltura/app/alpha/apps/kaltura/lib/myPartnerUtils.class.php:838

I can see the kalturadw database but there are no tables listed in there. I haven't tried to re-install yet, but I am expecting the same results. Any ideas?

Full log from log in session is attached.

AttachmentSize
Log in error.TXT3.52 KB
Joined: 12/03/2010
Points: 9

I was able to fix this error:

Under the Kaltura base directory (/opt/kaltura by default) there was a directory named "dwh." In here there are some documents and another directory named "ddl." In this directory there is a script named "dwh_ddl_install.sh." The script references a bunch of .sql scripts and creates a bunch of database and tables. If you go through the script you can see where it creates the "dwh_aggr_events_entry" table, which is the one that the error log was originally complaining about.

I had to go through the script a couple of times and comment out different sections because it was halting when it ran in to a table or database that already existed. In the end, there was only one line of the script I couldn't execute, but it wasn't a show stopper. It ended up being this line :

#mysqlexec $DS_ROOT_DIR/get_ip_country_location_function.sql

I will work on getting this working at another time.

I have no idea why I had to go through all this to avoid that error. I am not sure why the original install.php script doesn't build these tables in the first place, or why it was never documented. Maybe I just missed it?

Joined: 08/21/2010
Points: 22

I have find out the bug which cause databases build problem of Kaltura v3.

It is happen only when you define different db username and db password for the installation script.
If you use standard username/password for database which is default of installation script, this problem will not happen.

The bug is coded in dwh_ddl_install.sh as follow:

bug code is located at line 9

u) UESR="$OPTARG";;

you need to change this to:

u) USER="$OPTARG";;

This code fix must do befor running 'php install.php'.
The dwh_ddl_install.sh is located at : {YOUR KALTURA INSTALLATION EXTRACTED FOLDER}/package/app/dwh/ddl/dwh_ddl_install.sh

After fixing of it, just now you can run 'php install.php', and should have done all correct installation.

Joined: 12/03/2010
Points: 9

Nice catch. I will try to re-install with this fix and see if I get some better results.

Thanks!

Joined: 08/25/2010
Points: 8

Hi, interesting point.. I've got the same error but also a lot of videos and other stuff loaded on the platform... is there a way to fix the problem without reinstalling the 3.0?
thanks in advance.

Joined: 02/16/2011
Points: 2

I'm in the same situation and wondering if you found a safe, easy way to fix this without reinstalling.

Joined: 02/16/2011
Points: 2

I modified the script to take a hostname as well as user and password and it's safe to run on existing systems (everything is done in four newly created databases). Make sure you grant super on *.* to etl prior to running it so it can create the databases and procedures. I think you can safely revoke super when you're done.

Joined: 05/06/2009
Points: 3

I don't see the difference between these two lines from above, am I reading it correct?

bug code is located at line 9

u) UESR="$OPTARG";;

you need to change this to:

u) USER="$OPTARG";;

Joined: 05/06/2009
Points: 3

I changed the line 9 and 10 in kalturaCE_v3.0.0/package/app/dwh/ddl/dwh_ddl_install.sh to following and I got tables created and "Error when trying to get account usage data: Internal server error occured" is gone.

u) UESR="etl";;
p) PW="etl";;

Not sure if this was the right thing to do, but it worked for me.

Thanks!

Joined: 08/21/2010
Points: 22

The difference of :

>> bug code is located at line 9
>>
>> u) UESR="$OPTARG";;
>>
>> you need to change this to:
>>
>>u) USER="$OPTARG";;

is that the spell.
UESR is wrong. (second and third character is switched)
USER is right.

If you use username=elf and password=elf, the error has gone.
This error is happen only when you use different username and password for mysql.

Thanks