howto

wsadmin ProfileAdmin error “NameError: bAskForNodeComm”

I stumbled across this issue when trying to update a users information in Connections after a UID change.

I’d successfully updated the PROF_UID and PROF_UID_LOWER with the new information, and TDI had synched across the new user data.

To then get the other Connections Applications to update their user information for this user, I ran the ProfilesService.publishUserData(“new.email@domain.com”)

I received a very descriptive error.ErrorProfiles

So I noticed that the unlike the other Connections admin commands, the ProfilesAdmin.py script had not asked me for “What node did you want to connect to?”

I tried various things, but was not able to get the ProfilesAdmin script to select a node.

I found this error  which seemed to match what I was getting, so I tried the suggested fix.

See below, it worked. This technique also will work with other ProfileAdmin commands.

NoErrorProfiles

Error when reparenting a sub-community.

Reparenting a sub-community is a feature added in Connections 4.5 CR3.

This feature allows you to move a sub-community to a Parent level, but also allows you to move the sub community to a different parent. (Think of the sub community as the child).

To move a sub-community, you use wsadmin, and the CommunitiesService.moveSubcommunityToCommunity(“CommunityUNID”) command.

Here is the IBM Link to the this utility.

I ran into an issue when trying to move the Community.

Firing up wsadmin as our usual Admin user,  I got the below error.

wsadminerror

 The System.Out

000009a TangoServiceI W com.ibm.tango.internal.service.TangoServiceImpl getMemberProfileWithUpdates CLFRM0110W: Undetermined memberProfile, in which its name: waslocaladmin, email: null, member uuid: 2f333cc26-b4d5-437d-b970-c9c1b3c076aa, and logins: [waslocaladmin], closely matches to directory service object of an user, whose name: waslocaladmin, email: null, and logins: [waslocaladmin].

Then

000009a TangoServiceI E com.ibm.tango.internal.service.TangoServiceImpl updateCommunity CLFRM0039E: internal error
com.ibm.tango.exception.MemberDuplicateLoginIdException: [waslocaladmin]
at com.ibm.tango.internal.service.TangoServiceImpl.getMemberProfileWithUpdates(TangoServiceImpl.java:3187)

 This was interesting, as the user waslocaladmin user was the Admin user for Connections, but wasn’t listed as an Admin userroles in the Application.

Additionally, waslocaladmin user was in the file based repository.

Workaround..

Switching to our support login, which has Administration access to the Communities application, I was able to run the reparenting command successfully.

This was done by running the wsadmin command as the support user.

Fix..

Further Troubleshooting revealed that this issue is more than likely the waslocaladmin id not being synced with the Community member database table.

This environment was upgraded, so in theory this could be correct. The migration method was a side-by-side install, so the waslocaladmin user would be different.

Synchronise a single member’s directory ID in the Communities member database table

  1. Open a command prompt and navigate to C:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin
  2. Run wsadmin -lang jython -user waslocaladmin -password password -port 8879

From the wsadmin prompt run:
wsadmin>execfile(“communitiesAdmin.py”) (enter)
wsadmin>CommunitiesMemberService.syncMemberExtIdByLogin(“waslocaladmin”) 

Errors have stopped, so fingers crossed!

Increasing the library file size of a Community.

Just had to update the file size of a Community. Sounds easy right??

I swear IBM make this stuff as complex as possible…..

To increase the size limit of a Community, you need it’s UID usually found as the last part in the url.

https://blaf.com./communities/service/html/communityview?communityUuid=2672ad0a-9646-4c2f-8094-3b552322d79e

 But what happens if you aren’t a member of the Community and can’t access it? What happens if all you have is the name?

You need to do this:

Start wsadmin

Launch Communities administration:

>execfile("communitiesAdmin.py")

Then you need to get all communities, and find the name. This is done by:
wsadmin> all=CommunitiesService.fetchAllComm()
wsadmin> CommunitiesListService.filterListByName(all, "community name") 

You will get output like the following:

[{lastModBy=[John User, A6F3CFCB-E9F5-3CEE-CA25-6F1000815F04], created=6/2/13 4:38:17 PM EST, tags=[], type=private, name=APACBlah, uuid=2672ad0a-9646-4c2f-8094-3b552322d79e, memberSize=36, lastMod=10/22/13 2:25:31 PM EST, description= This is a subcommunity for APAC staff who have completed their initial launch training for . , createdBy=[John User, A6F3CFCB-E9F5-3CEE-CA25-6F1000815F04]}]
 You now have the UUID.. but now you need to find the corresponding Library ID. This is done in the Files Admin tool.

Launch files admin,

wsadmin>execfile("filesAdmin.py")
Files Administration initialized.

We then need to find the ID of the corresponding Library. This is found by issuing the following command,

wsadmin>FilesLibraryService.getByExternalContainerId("2672ad0a-9646-4c2f-8094-3b552322d79e")
APAC staff who have completed their initial launch training for the project., createDate=Sun Jun 02 16:38:18 EST 2013, policyId=00000000-0000-0000-0000-000000000001,
externalContainerId=2672ad0a-9646-4c2f-8094-3b552322d79e, themeName=default, label=We251c6a45e07_482a_b5c7_a13bbb0654ca, title=APACBlah,
ownerUserId=00000000-0000-0000-0000-000000000000, type=community, id=9e1b8069-a132-4ea6-a32c-948634a520cc, externalInstanceId=We251c6a45e07_482a_b5c7_a13bbb0654ca, lastUpdate=Mon Oct 21 17:08:37 EST 2013}

We then need to create the new Policy

Create a new policy, i.e we need to create a policy for 1 Gb of files in the community.

Use the following command. Anything over 2 GB needs an L at the end. format of (name, size)

wsadmin>FilesPolicyService.add("1 GB", 1073741824) 

A policy will be created, and an id given. Take note of this ID.

A policy was added with the new id 82e5ae13-efa7-4cc7-bb37-1b8d68b521cc

Now you need to apply the new policy to the Community. Format of command is (ID,Policy)

 wsadmin>FilesLibraryService.assignPolicy("9e1b8069-a132-4ea6-a32c-948634a520cc","82e5ae13-efa7-4cc7-bb37-1b8d68b521cc")
The policy with the id 82e5ae13-efa7-4cc7-bb37-1b8d68b521cc is now assigned to the library with the id 9e1b8069-a132-4ea6-a32c-948634a520cc .

 Simple hey????

A tick box on the Community administration page would kill you?

Updating a user’s personal library quota in Connections Files

I get asked quite a bit on how to do some routine things in Customers environments. You’d think the simple task of increasing a users File quota would be pretty straight forward. Unfortunately, it’s more complex and convoluted then it should be. I can only hope the upcoming versions of Connections start integrating the great Administration tools that are available from BP’s out there into the Core product.

Overview of the process 

  1. Create a policy – refer to this blog on how to create a policy.
  2. Find the user
  3. Find the library belonging to the user
  4. Apply the policy to the Library

Start up wsadmin on the Deployment manager

D:\>cd IBM\WebSphere\AppServer\profiles\Dmgr01\bin
D:\IBM\WebSphere\AppServer\profiles\Dmgr01\bin>wsadmin.bat -lang jython -user <connectionsadminuser> -password <connectionsadminuserpassword>-port 8879
WASX7209I: Connected to process “dmgr” on node CellManager01 using SOAP connector; The type of process is: DeploymentManager
WASX7031I: For help, enter: “print Help.help()”

Start Files Administration, and connect to a node
wsadmin>execfile(“filesAdmin.py”)
1: WebSphere:name=FilesSchedulerMBean,process=Cluster2_server1,platform=dynamicproxy,node=Node01,version=8.0.0.5,type=LotusConnections,mbeanIdentifier=FilesSchedulerMBean,cell=Cell01,spec=1.0
2: WebSphere:name=FilesSchedulerMBean,process=Cluster2_server2,platform=dynamicproxy,node=Node01,version=8.0.0.5,type=LotusConnections,mbeanIdentifier=FilesSchedulerMBean,cell=Cell01,spec=1.0
Which service do you want to connect to?
1

Connecting to WebSphere:name=FilesAdminService,type=LotusConnections,cell=Cell01,node=Node01,*
Files Administration initialized.

Find the users ID, notated below in bold by using their email address.
wsadmin>FilesMemberService.getByEmail(“userwhoneedsmorespace@blah.com”)
{directoryGroupLastUpdate=Tue Sep 09 12:48:02 EST 2014, lastVisit=Tue Sep 09 12:46:01 EST 2014, communityLastUpdate=Tue Sep 09 12:48:02 EST 2014, createDate=Thu Jul 04 16:50:43 EST
2013, id=97ea886e-fa34-415f-9883-2658af528bb6, name=User Who, email=userwhoneedsmorespace@blah.com, directoryLastUpdate=Tue Sep 09 12:46:01 EST 2014, isOprhan=false}

Take note of the value in “id=” . This is the internal representation of the user in the Files Application.

In this case it is  “id=97ea886e-fa34-415f-9883-2658af528bb6″

Use the ID, and find the users Library ID

wsadmin>FilesLibraryService.getPersonalByOwnerId(“97ea886e-fa34-415f-9883-2658af528bb6”)
{maximumSize=524288000, size=524174032, percentUsed=0.9997826232910156, summary=, createDate=Thu Jul 04 16:50:43 EST 2013, policyId=00000000-0000-0000-0000-000000000000, externalContainerId=null, themeName=, label=036841EC-8E19-4118-986A-B55B53BA663A, title=User Who, ownerUserId=97ea886e-fa34-415f-9883-2658af528bb6, type=personal, id=021b4d54-c47a-41ca-97d3-46b301b3bc34, externalInstanceId=null, lastUpdate=Thu Jul 04 16:50:43 EST 2013}

Note that some pretty interesting information is displayed, i.e Policy currently applied “policyId”, Current percent used “percentUsed” etc. The bit we are interested in is the id of the Library, which in this case is “id=021b4d54-c47a-41ca-97d3-46b301b3bc34″.

Assign the policy to the Library

I had already created a policy for 1GB, and taken note of it’s ID. For completeness, it was “d60abd07-5d86-45b3-8500-20ce95596bd5”

Syntax of the command is FilesLibraryService.assignPolicy(“LibraryID”,”PolicyID”)

wsadmin>FilesLibraryService.assignPolicy(“021b4d54-c47a-41ca-97d3-46b301b3bc34″,”d60abd07-5d86-45b3-8500-20ce95596bd5”)

If complete, you’ll get a confirmation, like below.
The policy with the id d60abd07-5d86-45b3-8500-20ce95596bd5 is now assigned to the library with the id 021b4d54-c47a-41ca-97d3-46b301b3bc34″)