Alteryx Server Discussions

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

Mongodb is not restored correctly

jdevar243
7 - Meteor

Hi,

 

We installed the Alteryx server on the new cloud dev machine, and as part of the restore, we took the mongo DB backup from Prod and tried to restore it to the new server. However, we have an issue starting the services after the restoration. I followed the below document and did execute the steps as per the doc.  

 

Server Host Recovery Guide | Alteryx Help

 

In the CMD, I can see the mongo dB finished, but I found this error in the mongorestore log . 

 

2022-10-27T13:47:09.385-0700 [########################] AlteryxService.AS_ResultsFiles.Files 4.20GB/4.20GB (100.0%)
2022-10-27T13:47:09.385-0700 [#############...........] AlteryxService.AS_App_Chunks.Files 6.57GB/12.0GB (54.7%)
2022-10-27T13:47:09.385-0700 finished restoring AlteryxService.AS_App_Chunks.Files (0 documents, 0 failures)
2022-10-27T13:47:09.385-0700 Failed: AlteryxService.AS_App_Chunks.Files: error restoring from D:\MongoBackup\Mongo2P\AlteryxService\AS_App_Chunks.Files.bson: connection(localhost:27100[-6]) unable to write wire message to network: write tcp 127.0.0.1:61332->127.0.0.1:27100: wsasend: An existing connection was forcibly closed by the remote host.
2022-10-27T13:47:09.385-0700 62287 document(s) restored successfully. 0 document(s) failed to restore.
2022-10-27T13:47:09.385-0700 finished restoring AlteryxService.AS_ResultsFiles.Files (0 documents, 0 failures)

 

Did anyone face similar issue? Please let me know if anyone have any suggestions?

 

Thanks

8 REPLIES 8
fmvizcaino
17 - Castor
17 - Castor

Hi @jdevar243 ,

 

Did you remove the mongoDB locks as well? Both servers have the same alteryx server version, right?

 

Best,

Fernando Vizcaino

jdevar243
7 - Meteor

Hi @fmvizcaino - Yes, I did remove the MongoDB locks, but it did not work. Both Alteryx server versions are the same.

fmvizcaino
17 - Castor
17 - Castor

Only for context, I've performed this process several times and haven't experienced any issues, so there isn't anything out of the ordinary that needs to be done to be successful here.

 

I would suggest looking the service logs and checking if you can find more information related to the service not starting and also performing the restore once again to be sure it wasn't an ad hoc error. 

 

Other than that, I would open a case on the support portal. Maybe they already know what is happening there.

 

Best,

Fernando Vizcaino

 

 

Ariharan
11 - Bolide

Hi @jdevar243 , 

 

Can you please follow the below steps one more time and let me know what happens?

 

  1. Copy the production dump and place it in a temporary location
  2. Create a folder in a persistence location. Example (MongoDB_Restore)
  3. Execute the emongoRestore command (D:\Program Files\Alteryx\bin > AlteryxService.exe emongorestore=C:\Temp\PRODMongoDB”,” D:\Program Files\Alteryx\Service\Persistence\MongoDB_Restore”)
  4. Once the restoration is completed, Open Alteryx System setting, and in the Data folder configure the new MongoDB location (D:\Program Files\Alteryx\Service\Persistence\MongoDB_Restore) and save it.
  5. After that, the service will start automatically. In order to remove the lock Open CMD as administrator and follow the below steps to remove locks.
  • Connect to MongoDB
    mongo -u user -p PASTE_PASSWORD -host localhost:27018 AlteryxGallery
    You should see a welcome message to show you got in successfully
  • Enter the following command: (it should return 1-2 locks)
    db.locks.find()
  • Remove the records with this command:
    db.locks.remove({})
    Note: One lock or Two Locks - the Search Lock will be recreated immediately if the Service is online or as soon as the Service is started again. The Migration Lock will be created after an upgrade.

Note: Make sure you have full control access to perform all these operations.

 

Regards, 

Ariharan R

jdevar243
7 - Meteor

Thanks, @Ariharan. I followed this article but I got an error when I start the Alteryx services.

 

I believe it has something to do with Mongodb restoration. I get this below error after restoring the db

 

connection(localhost:27100[-6]) unable to write wire message to network: write tcp 127.0.0.1:61332->127.0.0.1:27100: wsasend: An existing connection was forcibly closed by the remote host.

Ariharan
11 - Bolide

Hi @jdevar243 , 


"An existing connection was forcibly closed by the remote host" which indicates your client closed the connection to the Alteryx MongoDB. 

  • Make sure the user you are connecting with an account has the appropriate permission. (Alteryx Installation Directory & C:/Program Data/Alteryx/)
  • Check whether %PROGRAMDATA%\Alteryx\RuntimeSettings.xml is updated correctly or not.
  • Check the server event log and share if the error message is strange or related to this error.

If everything is fine, my final recommendation is to rename the %PROGRAMDATA%\Alteryx\RuntimeSettings.xml file (the new name doesn't matter) and reconfigure the system setting again.

 

Regards, 

Ariharan R

marcusblackhill
12 - Quasar
12 - Quasar

Hi @jdevar243 !

 

Did you tried to run the Alteryx Server pre-upgrade checks in your prod environment prior to the mongodb backup? That could be due to some inconsistencies in the mongoDB, that could prevent the restore.

 

Run the workflow from the article and find if your environment have any duplicated users or something like that first.

 

In case you have duplicated users, you may need to first fix it, removing duplicated users and maybe even moving assets from old users to new ones. Since that is a prod environment, I would recommend you to request the Alteryx Support help on the email support@alteryx.com

 

niklas_greilinger
10 - Fireball

Hello,

 

we faced a similar problem while performing the mongodb restore. Did you follow the https://help.alteryx.com/20213/server/server-host-recovery-guide ?

Unfortunately there is a missing " in the mongodb-restore command that leads to a failure in the mongodb. Once we added the missing " it finally worked.

niklas_greilinger_0-1668523417757.png

@Ariharan I think it is also missing in your comment.

 

Hope this helps.

Best regards

Niklas