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.
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
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.,
Hi @Manikumarayyachamy ,
Would you be able to share a lock collection screenshot with me?
Regards,
Ariharan.R
Please follow the below suggestion on how I fix the issue in my environment. Below mentioned points might help you.
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
@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.,