TIBCO Spotfire Automation Services jobs fails with error "Could not authenticate with server, since setting for username or password is not set"

TIBCO Spotfire Automation Services jobs fails with error "Could not authenticate with server, since setting for username or password is not set"

book

Article ID: KB0078221

calendar_today

Updated On:

Products Versions
Spotfire Automation Services All Versions

Description

When executing Automation Services jobs on the server with the Client Job Sender, you may see the following error message with an Automation ClientJobSender exception (Spotfire.Dxp.Automation.ClientJobSender):
Info;19-05-02 10:15:02.522;42516;Program;Starting application (Ver 37.0.13223.3459) using command line 'http://10.20.30.40:1010 C:\Users\myUser\Documents\AS workaround\1.xml' 
Info;19-05-02 10:15:02.545;42516;Console;Connecting to server http://10.20.30.40:1010. 
Info;19-05-02 10:15:02.559;44076;Console;Sending job to server http://10.20.30.40:1010. 
Error;19-05-02 10:15:02.606;44076;ServerConnectionManager;Could not authenticate with server, since setting for username  or password  is not set. 
Error;19-05-02 10:15:02.607;44076;Console;Error executing job: 
Error;19-05-02 10:15:02.611;44076;Console;System.Configuration.ConfigurationErrorsException: Could not authenticate with server, since setting for username  or password  is not set. (Spotfire.Dxp.ClientJobSender.exe.config)     at Spotfire.Dxp.Automation.ClientJobSender.ServerConnectionManager.CreateTssWebRequest(Uri relativeUri)     at Spotfire.Dxp.Automation.JobBuilder.SpotfireServerJobExecutor.CreateWebRequest(String relativeUri)     at Spotfire.Dxp.Automation.JobBuilder.SpotfireServerJobExecutor.StartJob(String jobFileContent, String jobFilePath, Boolean useLibrary)     at Spotfire.Dxp.Automation.ClientJobSender.ServerConnectionManager.ExecuteWithOAuth2Retry(Func`1 executer, Boolean isRetry)     at Spotfire.Dxp.Automation.ClientJobSender.JobExecutionHandler.ExecuteServiceCall(ServerConnectionManager connectionManager, Func`1 executer)     at Spotfire.Dxp.Automation.ClientJobSender.JobExecutionHandler.Run(CommandLineManager cmd)

 

Issue/Introduction

This article will help you resolve the issue when you run into the "Could not authenticate with server, since setting for username or password is not set" error.

Resolution

This authentication issue occurs if the username and password are not set in Spotfire.Dxp.ClientJobSender.exe.config and the Spotfire Server is set up with username and password authentication. To resolve this, perform the following steps:
  1. Open "Spotfire.Dxp.Automation.ClientJobsender.exe.config" file that is part of Automation Services installation folder
  2. Append the following two lines with the user credentials that has access to the TIBCO Spotfire Server:
<add key="Spotfire.Authentication.Basic.UserName" value=""/> 
<add key="Spotfire.Authentication.Basic.Password" value=""/>
            It should resemble as follows:
<add key="Spotfire.Authentication.Basic.UserName" value="sfadmin"/>
<add key="Spotfire.Authentication.Basic.Password" value="sfadmin"/>
           3. Save the file and then try running the job again.

Note: It is possible to encrypt the password that is specified in the configuration file. See Configuring the Client Job Sender for more details.

Additional Information

Doc: Installing the Client Job Sender Doc: Configuring the Client Job Sender