Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

MongoDB restore after backup - Failed to connect to error

8 - Asteroid

Reference used:

Server Version: 2018.4.6

I took a backup and trying to restore to the same server.

I am able to complete all steps until step # 3.


3. Connect to the MongoDB database using the command and connection string below.


Command: mongo mongodb://{server}:{port}/{galleryDatabase} -u user -p {Non-Admin Password}
Example: mongo mongodb://localhost:27018/AlteryxGallery -u user -p CCEC********************************33C0


I get the following error when I execute the  command.

Command I am using: mongo mongodb:// -u user -p ABCD********32DC


MongoDB shell version v3.4.10-62-g960c883
connecting to: mongodb://localhost:27018/AlteryxGallery
2020-11-08T07:27:25.269-0800 W NETWORK [thread1] Failed to connect to, in(checking socket for error after poll), reason: No connection could be made because the target machine actively refused it.
2020-11-08T07:27:25.273-0800 E QUERY [thread1] Error: couldn't connect to server localhost:27018, connection attempt failed :
exception: connect failed


How to resolve this?


Thank you.


Hi @kamanivk,


If you're trying to restore a backup on the same machine the backup was taken from, the Server Host Recovery process is not necessary, including the step you are having trouble with. That process is for situations where you're trying to restore a database that originated on a different machine. If you are restoring a backup from the same machine you should be able to just use the emongorestore command, then point your persistence folder in Alteryx System Settings to the restored database. Here's our help documentation as well as a good article that goes over the backup and recovery procedures:


If those articles don't help, I'd be happy to look into this further with you. Please send an email to and reference this community post as well as case #00391486 and it will get to me.

6 - Meteoroid

I have the same issue, but i do restore to another server, I followed all the steps as per instructon



C:\Program Files\Alteryx\bin>mongo mongodb://localhost:27018/AlteryxGallery -u user -p 85A************************C6B

MongoDB shell version v4.0.10

connecting to: mongodb://localhost:27018/AlteryxGallery?gssapiServiceName=mongodb

2020-12-05T15:24:22.313+0100 E QUERY    [js] Error: Authentication failed. :



exception: connect failed


Need some help here, i do not understand the authentication failed

8 - Asteroid

Assuming it was resolved? Can someone please provide some suggestions? Thanks