TIBCO Spotfire Automation Services job which executes a data function fails with error "The remote server returned an error: (403) Forbidden"

TIBCO Spotfire Automation Services job which executes a data function fails with error "The remote server returned an error: (403) Forbidden"

book

Article ID: KB0076581

calendar_today

Updated On:

Products Versions
Spotfire Server 7.5 and higher
Spotfire Analyst 7.5 and higher

Description

When executing a TIBCO Spotfire Automation Services job (via the TIBCO Spotfire Analyst client or through Spotfire Administrator UI > Automation Services) which triggers a data function to execute, the Automation Services job may fail and the following error or similar may be seen:
 
Could not execute function call 'test'
The remote server returned an error: (403) Forbidden .
at Spotfire.Dxp.Framework.HttpClient.NativeWebResponse..ctor(NativeHttpClient httpClient, NativeWebRequest request)
at Spotfire.Dxp.Framework.HttpClient.WinHttp.WinHttpWebRequest.GetResponseCore()
at Spotfire.Dxp.Framework.HttpClient.NativeWebRequest.GetResponse()
at Statistica.Spotfire.Extensions.StatisticaServiceClient.<ProcessWebRequest>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Statistica.Spotfire.Extensions.StatisticaServiceClient.<OpenSession>d__37.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Statistica.Spotfire.Extensions.StatisticaRemoteEngine.<ExecuteTask>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Statistica.Spotfire.Extensions.StatisticaRemoteEngine.RunTask(CLIRunOptions cliRunOpts, String& errorMessage)
at Statistica.Spotfire.Extensions.DataFunctionHelper.ExecuteDFWorkspace(DataFunctionInvocation dfiObj, String sDXPPath)
at Statistica.Spotfire.Extensions.DataFunctionExecutor.<ExecuteFunctionCore>d__0.MoveNext()
at Spotfire.Dxp.Application.Extension.CustomDataFunctionExecutor.<Spotfire-Dxp-Data-DataFunctions-IFunctionExecutor-ExecuteFunction>d__5.MoveNext()
at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.<ExecuteFunction>d__7.MoveNext()


If there is a data function using data from a data source that has been imported using a local path (like C:\myfolder\mydata.csv) and not using a UNC path (like \\myserver\myfolder\mydata.csv), the error shown above may be seen.

Issue/Introduction

This article explains the issue when a TIBCO Spotfire Automation Services job which executes a data function fails with error "Could not execute function call 'test' The remote server returned an error: (403) Forbidden"

Resolution

To resolve:

First, replace the data source using a local path (like C:\myfolder\mydata.csv) and add it again using the UNC path (like \\myserver\myfolder\mydata.csv). The data should always be imported using the UNC path like \\myserver\myfolder\mydata.csv so that it can be accessible from multiple machines.

Then, ensure the Automation Services services are configured to allow access to the shared UNC paths by updating the AllowedFilePaths setting per KB Article How to configure access to local and shared network directories for the TIBCO Spotfire Web Player.

Additional Information

KB: How to configure access to local and shared network directories for the TIBCO Spotfire Web Player