Alteryx Server Knowledge Base

Definitive answers from Server experts.

Error: Alteryx Server Usage Report (8): RunBatch (695): Tool #1: The external program ".\CollectionCheck.bat" returned an error code: -4

beccakatzmann
Alteryx
Alteryx
Created

Environment Details


  • Alteryx Server
    • All versions
  • Alteryx Designer
    • All versions
  • User-Managed MongoDB
  • Server Usage Report


The following error is seen when running the Alteryx Server Usage Report

 

Error: Alteryx Server Usage Report (8): RunBatch (695): Tool #1: The external program ".\CollectionCheck.bat" returned an error code: -4

 



Cause


The Database Host field is configured to use the Secondary MongoDB node instead of the Primary/Master node. It cannot read from a secondary node in a user-managed MongoDB replica set.

Resolution


To double-check that you are using the primary node:
  1. Open Command Prompt as an Admin 
  2. Change the directory to the location of the mongo.exe (Path will vary based on your installation)
cd C:\Program Files\Alteryx\bin
  1. Connect to a MongoDB node:
mongo mongodb://user:password@hostname:port/AlteryxService
  1. Query the nodes to see which is primary:
db.runCommand("ismaster")
​​​​
  1. Once you know the primary node, you can update it in the Server Usage Report:
No ratings