Alteryx Server Knowledge Base

Definitive answers from Server experts.

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

AndrewL
Alteryx
Alteryx
Created

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 maytake 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 theAlteryxService. 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)
Comments
somervill
7 - Meteor

This is super helpful Andrew!

 

I got a quick question still if you may have a look on this.

 

I created a Mongo DB and try to connect it with Alteryx designer, however, the MongoDB Input is able to connect to DATABASE while it is not able to extract the collection information.

 

My DB info is as below, great thanks if you may have a look on the issue!

 

connection string: mongodb://root:Hello%402022@dds-uf6000d77dec59941305-pub.mongodb.rds.aliyuncs.com:3717

server: mongodb://root:Hello%402022@dds-uf6000d77dec59941305-pub.mongodb.rds.aliyuncs.com:3717

username: root

password: Hello@2022

 

somervill_0-1661753166123.png