community
cancel
Showing results for 
Search instead for 
Did you mean: 

alteryx server Knowledge Base

Definitive answers from Server experts.

ERROR: Mongo Connection failed, please ensure server address and credentials are correct

Alteryx
Alteryx
Created on

This is a very common error that can occur if the AlteryxService shuts down unexpectedly. Most commonly the error is caused by MongoDB not shutting down properly and the lock file does not get released. This prevents MongoDB from starting the next time you try to start the AlteryxService and returns an error message similar to:

 

LockFileError.png

"Mongo connection failed, please ensure server address and credentials are correct."

 

To resolve this error, first follow the steps below

 

  1. Identify where the MongoDB is installed from the System Settings->Controller->Persistence
  2. Open a Windows Folder Browse and navigate to that folder
  3. Check to see if the mongod.lock file is anything but 0k

If it does have data inside (1k usually), we recommend to first clone your server instance (in case of corruption) before proceeding to the steps below. For assistance cloning your server instance, please reach out to customer support.

 

  1. Delete or rename the mongod.lock file
  2. Right-click in the window and select New->Text Document
  3. Rename the document mongod.lock (make sure show extensions is on for the folder, otherwise this file will actually be mongod.lock.txt)
  4. Open a Windows Command Prompt and navigate to the \Alteryx\bin directory (e.g. cd "\Program files\Alteryx\bin")
  5. Start up the MognoDB service just to make sure everything is clean:

 mongod --dbpath "folder path from system settings" --auth --port 27018

 

  1. With an unclean shutdown it may take a few minutes to reallocate the data.  Look for a line that says "Waiting for connections on port 27018"  When it appears hit Ctrl+c on your keyboard to shutdown the service
  2. Start up the AlteryxService.  You can do this in the Command Prompt with: sc start AlteryxService
  3. Check the Task Manager->Details (or Processes) to verify that the AlteryxService processes are staying up

If the lock file was ok 

 

  1. Open a Windows Command Prompt and navigate to the \Alteryx\bin directory (e.g. cd "\Program files\Alteryx\bin")
  2. Run the AlteryxService in test mode to identify the actual error: AlteryxService test
  3. If you are unable to easily identify what is causing the error, send us the service log files (path found in System Settings->Controller->General)