Alteryx Server Discussions

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

Alteryx Server Upgrade - Mongo DB failure and Gallery not accessible

Manikumarayyachamy
6 - Meteoroid

Restored our Prod Mongo DB in Test environment and did a server upgrade ( 2022.3 to 2022.1) in test environment with Production data.  The upgrade completed but Mongo DB migration failed along with that Gallery not accessible. Any suggestion he to resolve it.

 

Gallery log :

ERROR,1,AlteryxServerHost,Runner,Start,,,,SERVERNAME,,,,,,System.Threading.ThreadAbortException: Thread was being aborted.-> at System.Threading.Thread.AbortInternal()-> at System.Threading.Thread.Abort()-> at Alteryx.Server.Migration.MigrationHandler.DoMigrateDatabase()-> at Alteryx.Server.Host.Runner.Start(Action whenStarted)

 

ERROR,1,AlteryxServerHost,Runner,Start,,,,SERVERNAME,,,,,,"System.Exception: Unable to retrieve status from server: localhost:80-> at AlteryxService_Client.Net.ClientAPI.AlteryxService_VerifyCompatibility(String strServer, String strServerSecret)->

at Alteryx.Server.Host.Runner.VerifyConnectivityToServiceLayer(IHostingEnvironmentConfiguration hostingEnvironment)-> at Alteryx.Server.Host.Runner.Start(Action whenStarted)"

 

Mongo DB Migration log :

FATAL,1,AlteryxServerHost,migrationLogger,DoMigrateDatabase,"...lock obtained, performing migration.->Services will start but be unavailable until migration is complete.",

 

FATAL,1,AlteryxServerWebApiHost,migrationLogger,DoMigrateDatabase,Migration failed with error: Command create failed: a collection 'AlteryxGallery.userGroupsPostMigration_30' already exists.,

 

But i don't see any collection with the name of "userGroupsPostMigration_30" in AlteryxGallery Mongo DB.

6 REPLIES 6
Ariharan
11 - Bolide

Hi @Manikumarayyachamy

 


We tried to restore the Mongodb in UAT(clone of our production server VM), but the PROD server name appeared to be still registered somewhere on the PROD mongo database.

The following procedure solved our problem:


#1 Enter Mongo shell – open command line as an admin

#2 Change to Alteryx bin directory – for the default enter:
cd "\Program Files\Alteryx\bin"

#3 Connect to the Mongo Shell
mongo localhost:27018/AlteryxGallery -u user -p <PWD>

#4 Open the database(Type it in the command Prompt)
use AlteryxGallery

#5 You should see some type of welcome message to indicate you got in successfully

#6 Verify the presence of locks
Enter: db.locks.find()

#7 It should return 1-2 locks

#8 Remove the locks
db.locks.remove({})

#9 Verify the presence of locks (You could see the machine name changes in the locks values)
Enter: db.locks.find()

#10 Exit MongoDB
exit

 

Regards, 
Ariharan.R

Manikumarayyachamy
6 - Meteoroid

Thank you for response Ariharan .  This db.locks collection we already checked and update the Machine name and lock.remove as well. Still error not resolved.

 

 “ db.locks.update ({"_id":ObjectId("ActualObjectID")}, {$set:{"MachineName":"New Machine Name"}})”

 

 

Migration Error log :

 

2022-09-29 15:41:02.876643,FATAL,1,AlteryxServerHost,migrationLogger,DoMigrateDatabase,"...lock obtained, performing migration.->Services will start but be unavailable until migration is complete.",
2022-09-29 15:41:02.876643,INFO,1,AlteryxServerHost,migrationLogger,MoveNext,Starting Migration: 29,
2022-09-29 15:41:03.065653,INFO,1,AlteryxServerHost,migrationLogger,MoveNext,Renaming collection from 'configurations' to 'configurationsMigrationInProcess_29'->,
2022-09-29 15:41:03.065653,INFO,1,AlteryxServerHost,migrationLogger,MoveNext,Done renaming collection->,
2022-09-29 15:41:03.065653,INFO,1,AlteryxServerHost,migrationLogger,MoveNext,,
2022-09-29 15:41:03.134660,FATAL,1,AlteryxServerHost,migrationLogger,DoMigrateDatabase,Migration failed with error: Command create failed: a collection 'AlteryxGallery.configurationsPostMigration_29' already exists.,

Ariharan
11 - Bolide

Hi @Manikumarayyachamy , 

 

Would you be able to share a lock collection screenshot with me?

 

Regards, 

Ariharan.R

Manikumarayyachamy
6 - Meteoroid

Hi @Ariharan  , Find the attached locks collection screen shot.

 

locks collection.png

Kaustubh17
8 - Asteroid

Hi @Manikumarayyachamy 

 

Please follow the below suggestion on how I fix the issue in my environment. Below mentioned points might help you.

 

  1. Verified that the MongoDB schema does not match the current Server authentication type which is Built-in authentication. This may cause Server upgrade issues.
  2. To correct the MongoDB schema, it would require a reset of the MongoDB and the Server environment. You would be able to save your Server workflows, but you may lose some other items in Server, such as Schedules, Collection settings, User settings, Data Connections etc., which you would have to recreate in the new Server environment. Please do the following:
    1. First, take a backup of the current MongoDB. The MongoDB backup steps are found in this Help page: https://help.alteryx.com/20221/server/mongodb-backups
    2. Next, download all Server workflows onto a local drive, to be migrated into your new Server environment after the MongoDB reset. You can use the Server API endpoint for migrating workflows, described in this Help page: https://help.alteryx.com/developer-help/gallery-api-migratable-endpoint
    3. Stop Alteryx Service
    4. Go to the directory of the current MongoDB folder, as listed in Alteryx System Settings > Controller > Persistence > Data Folder.
    5. Rename the current MongoDB folder to something like "MongoDB_Old"
    6. In the same directory, create a new, empty folder named "MongoDB".
    7. Ensure that Alteryx System Settings > Controller > Persistence > Data Folder is pointing to the new folder created in 6.
    8. Go to Gallery > Authentication, and choose your desired Authentication Type. It is not recommended to change this after the selection.
    9. Click through the rest of Alteryx System Settings, then click Finish to save your changes and automatically start Alteryx Service with the new settings.
    10. Reupload the workflows to Server. You can refer to Step 3. Publish Workflows in the Target Environment in this Help page: https://help.alteryx.com/developer-help/gallery-api-migratable-endpoint
    11. Recreate any Server items that you need, such as Schedules, Collection settings, User settings, Data Connections etc.
    12. Run the Server Pre-Upgrade Check App again to verify there are no potential upgrade issues.

 

Since you have reset the Server MongoDB, assuming you chose Built-in authentication in the Alteryx System Settings, you would first need to recreate the Gallery Administrator's user account. Please refer to the Set Up Built-in Authentication section in this Help page: https://help.alteryx.com/20221/server/configure-alteryx-server-authentication

Next, you would also have re-add all Server users in the new Server environment.

Once the user accounts are set up, the users can then sign into their respective Server/Gallery accounts.

Please let me know if you have other doubts.

 

Hope @Manikumarayyachamy 

Above steps might help you.

 

If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions.
Thank you
Kaustubh

 

Manikumarayyachamy
6 - Meteoroid

@Kaustubh17 - Thank you for response. From your comments i could see you have suggest to reset the Mongo DB and server environments. In that case we can have only Workflow's and remaining needs to be created manually . I am not sure will that work for my issue.

 

Below is the steps which performed to fix the issue :

1. Post this issue I have downgraded my server to 2020.3 and upgrade to 2022.1 version with UAT data , then environment works fine there is no issue.

2. Again  I have downgraded my server to 2020.3 and upgrade to 2022.1 version with Prod data and Gallery not accessible and seeing below errors on migration logs . 

 

Error log:

2022-09-29 15:41:02.876643,FATAL,1,AlteryxServerHost,migrationLogger,DoMigrateDatabase,"...lock obtained, performing migration.->Services will start but be unavailable until migration is complete.",
2022-09-29 15:41:02.876643,INFO,1,AlteryxServerHost,migrationLogger,MoveNext,Starting Migration: 29,
2022-09-29 15:41:03.065653,INFO,1,AlteryxServerHost,migrationLogger,MoveNext,Renaming collection from 'configurations' to 'configurationsMigrationInProcess_29'->,
2022-09-29 15:41:03.065653,INFO,1,AlteryxServerHost,migrationLogger,MoveNext,Done renaming collection->,
2022-09-29 15:41:03.065653,INFO,1,AlteryxServerHost,migrationLogger,MoveNext,,
2022-09-29 15:41:03.134660,FATAL,1,AlteryxServerHost,migrationLogger,DoMigrateDatabase,Migration failed with error: Command create failed: a collection 'AlteryxGallery.configurationsPostMigration_29' already exists.,