ERROR 15109 encountered when calling upload api

Our automated load scripts have just experienced an exception;

com.transcoding.services.VideoService : Exception occured while uploading the file due to::Invalid KS “YzZmYjM4ZTc3ODJmOTc1YWI2NzkyOGJmZDM1NDQwMDg0NGMwOGVlZXwxMDE7MTAxOzE1MjUyMTEyMjI7MjsxMTYxOTtVcGxvYWRlcjs=”, Error “-1,INVALID_STR”
2018-04-30 21:47:02.682 ERROR 15109 — [pool-1-thread-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task.

We have not changed any code on our side and the error just started to appear and is preventing us from loaded content.

Hi @steve_corey,

Start by decoding the KS to see what attributes it holds. You can that by going to Admin Console->Developer->System Helper, pasting the KS string in “String to manipulate” text area and checking the “KS” radio button.

If the reason for the error is unclear by the results, you’d have to look into the code that generates that KS.
I don’t know whether you’re using the session->start() action to generate it or a local function in the client lib but this can make a difference. Perhaps someone deactivated the partner ID in question?
You should also look inside the /opt/kaltura/log/kaltura_api_v3.log. Of course, if you have several API nodes, you’ll need to look at each one in turn and search for erroneous patterns.

[4/30/18, 7:10:44 PM] Abhishek Kumar: This is the error found in api_v3.log during While using “System Helper” in Developer Section of Admin Console

2018-04-30 20:06:13 [0.000186] [::1] [1814651747] [23] [API] [ks->logError] ERR: exception ‘Exception’ with message ‘Hash [083a57d04745f0afd465f4df9254595f569f7a81] doesn’t match the sha1 on the salt on partner [101].’ in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/webservices/kSessionUtils.class.php(735): KalturaLog::err(‘Hash [083a57d04…’)
#1 /opt/kaltura/app/alpha/apps/kaltura/lib/request/kSessionBase.class.php(238): ks->logError(‘Hash [083a57d04…’)
#2 /opt/kaltura/app/alpha/apps/kaltura/lib/request/kSessionBase.class.php(157): kSessionBase->parseKsV1(‘083a57d04745f0a…’)
#3 /opt/kaltura/app/alpha/apps/kaltura/lib/webservices/kSessionUtils.class.php(281): kSessionBase->parseKS(‘MDgzYTU3ZDA0NzQ…’)
#4 /opt/kaltura/app/plugins/admin_console/kaltura_internal_tools/services/KalturaInternalToolsSystemHelperService.php(22): ks::fromSecureString(‘MDgzYTU3ZDA0NzQ…’)
#5 [internal function]: KalturaInternalToolsSystemHelperService->fromSecureStringAction(‘MDgzYTU3ZDA0NzQ…’)
#6 /opt/kaltura/app/api_v3/lib/reflection/KalturaActionReflector.php(233): call_user_func_array(Array, Array)
#7 /opt/kaltura/app/api_v3/lib/KalturaDispatcher.php(124): KalturaActionReflector->invoke(Array)
#8 /opt/kaltura/app/api_v3/lib/KalturaFrontController.php(113): KalturaDispatcher->dispatch(‘kalturainternal…’, ‘fromSecureStrin…’, Array)
#9 /opt/kaltura/app/api_v3/web/index.php(29): KalturaFrontController->run()
#10 {main}
2018-04-30 20:06:13 [0.000158] [::1] [1814651747] [24] [API] [KalturaFrontController->getExceptionObject] CRIT: exception ‘Exception’ with message ‘INVALID_STR’ in /opt/kaltura/app/alpha/apps/kaltura/lib/webservices/kSessionUtils.class.php:283
Stack trace:
#0 /opt/kaltura/app/plugins/admin_console/kaltura_internal_tools/services/KalturaInternalToolsSystemHelperService.php(22): ks::fromSecureString(‘MDgzYTU3ZDA0NzQ…’)
#1 [internal function]: KalturaInternalToolsSystemHelperService->fromSecureStringAction(‘MDgzYTU3ZDA0NzQ…’)
#2 /opt/kaltura/app/api_v3/lib/reflection/KalturaActionReflector.php(233): call_user_func_array(Array, Array)
#3 /opt/kaltura/app/api_v3/lib/KalturaDispatcher.php(124): KalturaActionReflector->invoke(Array)
#4 /opt/kaltura/app/api_v3/lib/KalturaFrontController.php(113): KalturaDispatcher->dispatch(‘kalturainternal…’, ‘fromSecureStrin…’, Array)
#5 /opt/kaltura/app/api_v3/web/index.php(29): KalturaFrontController->run()
#6 {main}
[4/30/18, 7:11:12 PM] Abhishek Kumar: same error is thrown when hitting from Upload server code.
[4/30/18, 7:12:56 PM] Abhishek Kumar: NWZkZjViYjZmY2FjYjA4YjM4ODg3NjBmMDlmZTI5NzlkNmViMTc5M3wtMjstMjsxNTI1MjI1NTAzOzI7MTUyNTEzOTEwMy4wNzM4O3N0ZXZlQGJhYnlmbGl4Lm5ldDtkaXNhYmxlZW50aXRsZW1lbnQ7Ow==

IS is one of the KS when any operation was performed from Kaltura Admin console
Its output on “System Helper”

Kaltura_Client_KalturaInternalTools_Type_InternalToolsSession Object
(
[partner_id] => -2
[valid_until] => 1525225503
[partner_pattern] => -2
[type] => 2
[error] =>
[rand] => 1525139103
[user] => steve@babyflix.net
[privileges] => disableentitlement
[relatedObjects] =>
)

KS valid until: 01/05 19:45:03
Time now: 1525140707 (30/04 20:11:47)

Jess, we found the error. Thank so much for the help!

Hi @steve_corey,

Welcome && glad to hear we’re good.

What was the source of the error, then?

It was an error in code outside of Kaltura. We added Kaltura authentication is one system (Drupal) and we were missing Kaltura authentication info in a different system. We did not think adding new Kaltura authentication info in Drupal could break this other scripted process the way it did.

1 Like