Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Server Discussions

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

Can't find user to add to data connection

eliberatore
7 - Meteor

I've added two new users to a collection but when I go to add them to a Data Connection in Gallery their names won't appear.

16 REPLIES 16
gpmyers111
6 - Meteoroid

We're on Server and Designer 2022.1.1 and also having this problem. I wasn't able to get the workflow @patrick_digan created to run. I'm not familiar at all with the API. Any other ideas or suggestions for how to resolve this?

mmichaelson
8 - Asteroid

I am experiencing the same issue as @gpmyers111 after just upgrading to 2022.1.1 from 2021.1.4.

 

I am familiar with the API, but I do not have the time/bandwidth to write the call(s) required to make this work.

 

Any guidance on this?

jrgo
14 - Magnetar

I worked on an environment that had this issue and discovered that the problem was due to an attribute in the MongoDB collection.table AlteryxGallery.users that was missing on some record documents.

 

There was an attribute named "IsPasswordMigrated" that was showing NULL for some and EMPTY for others. I found that the ones that were EMPTY is because the attribute didn't exist in their record document. I corrected those documents by adding the attribute and setting it with a NULL value, which did resolve the problem.

 

Note that it is NOT recommended that you manually alter tables in MongoDB and you should create a case with Alteryx to have their support team work with you to identify and correct. Doing so may cause irreparable damage to your environment.

 

If you'd like the script I used and familiar with MongoDB, shoot me a DM.

mmichaelson
8 - Asteroid

Thanks @jrgo.  I reached out to Alteryx support and was able to get this resolved using a combination of the steps they provided and resources on the Alteryx Community.

 

Basically, you need to re-index the MongoDB that powers Alteryx Server.

 

Here are the steps I took:

  • Login to your Alteryx Server machine
  • Open the command line as an administrator (Right click > Select "Run as administrator")
  • Run the following commands one at a time.  You do not need to stop the Alteryx Service before performing these steps - actually, this is much easier if the service is running:

 

 

C:\> cd "C:\Program Files\Alteryx\bin"   <-- Change this to wherever Alteryx Server is installed
C:\Program Files\Alteryx\bin> alteryxservice getemongopassword

Admin:  ***********
Non-Admin: ********   <-- Use this password to connect to the Mongo DB below

C:\Program Files\Alteryx\bin>mongo mongodb://localhost:27018/AlteryxGallery -u user -p {Non-Admin Password}  <-- Enter your Non-Admin password here

MongoDB shell version v4.2.22  <-- Version will vary depending on your installation
connecting to: mongodb://localhost:27018/AlteryxGallery?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("6fa8e3c2-dc4a-48d1-ac9e-c9720779db42") }
MongoDB server version: 4.2.22
> use AlteryxGallery
switched to db AlteryxGallery
> db.locks.remove({})
WriteResult({ "nRemoved" : 3 })   <-- This number will vary from 0 to 2 (or 3 in this case)
WriteResult({ "nRemoved" : 3 })
> db.commandQueueItems.remove({})
WriteResult({ "nRemoved" : 0 })

 

 

 

  • Once you've run the steps above, download the attached workflow, open it in Alteryx Designer, follow the instructions in the workflow, and run it.  After that, you should be able to add users to a data connection as expected.

 

For more information regarding the commands above, check out Step 2 of this article on the community: https://help.alteryx.com/20193/server/server-host-recovery-guide#step-1-stand-up-a-new-server

 

Alteryx support also recommended clearing the "locks" collection within the AlteryxGallery_Lucene database.  However, I was not able to access that database and everything still worked fine without completing that step.  They also recommended downloading a tool called Robo3T which makes a lot of this easier; however, if you are working within a proxy or firewall, the steps above might be easier.

 

Hope this helps!

kgalbert
9 - Comet

So we've been having this problem for about 6 months now even after upgrading versions.  Re-indexing as described above works, but the problem comes back very fast... within a few days. 

 

Is this expected or should I open a ticket to look for the root cause?

 

  

mmichaelson
8 - Asteroid

@kgalbert I would reach out to Alteryx support.  If they aren't able to provide any solutions beyond what I've described above, you could try automating these steps using something like PowerShell, Python, or even Alteryx  From there, schedule these steps to run once per week (or every day if you're having this issue more frequently).

 

Full transparency - I have not tried automating this, so I'm not sure what all this would entail.

 

Hope this helps.

Allenn
6 - Meteoroid

The problem has been there for at least 2 years, Alteryx still have not yet fixed it nor provided any easy workaround.