Search This Blog

Wednesday, May 22, 2024

Maximo Application Suite Admin APIs 8.11.x


Set user application permissions

PUT

/workspaces/{workspaceId}/applications/{applicationId}/users/{userId}

Requires Workspace Administration permission in the target workspace. System Administration permission allows modifications to any workspace.


https://api.{mas-instance-id}.{mas-domain}/workspaces/{workspaceId}/applications/{applicationId}/users/{userId}


Reference Link : https://developer.ibm.com/apis/catalog/maximo--maximo-application-suite-admin-apis/api/API--maximo--workspace-management#setUserApplicationPermission

Friday, May 10, 2024

Modifying the size of a user field in MAS

 Question

In MAS you can verify that many of the fields of the user records are also present in Manage application, but how can we change their length?

Answer

We can change them by changing the field length in Manage application, and then running syncmetadata.sh script.

In this example we will use the PERSON.FIRSTNAME attribute from Manage, which is equivalent to the users Given Name attribute in MAS User Administration. The steps bellow represents the required changes and procedures in order to accomplish it.
   
In Manage:
  1. Go to Database Configuration Application.
  2. Change the field size in Manage and apply the changes via Database configuration application. 
Image representing the database configuration page, inside the PERSON object, indicating that the FIRSTNAME field length was changed to 60.
 
Using a database tool, run the following SQL Statement: 
update maxvars set varvalue = '1' where varname = 'METAUPG'

Go to Maxinst pod and run the following command: 
/opt/IBM/SMP/maximo/tools/maximo/syncmetadata.sh
 
After the command execution is complete, Manage and MAS databases should have their fields synchronized. 

Note: as this command is runned inside Maxinst pod, this is the only pod that need to be up.


Error: BMXAA0024E - The action READ is not allowed on object MAFAPPDATA accessing Maximo Manage

 Problem

This error occurs when attempting to log in to Maximo Manage and indicates insufficient access permissions for the user's security group. Specifically, the user lacks the "READ" permission for the "MAFAPPDATA" object structure.

Resolving The Problem

Access Security Groups Application:
Log in to Maximo with a user account possessing security group administration privileges.
Navigate to the Security Groups application within Maximo.

Identify User Security Group:
Locate the security group to which the user experiencing the login error belongs.

Grant "READ" Access (Object Structures Tab):
Select the relevant security group.
Click on the Object Structures tab.
In the search bar, locate the object structure named OSLCMAFAPPDATA.
Ensure the checkbox next to "OSLCMAFAPPDATA" is selected, granting "READ" access.
Save your changes.
Optional Verification (Application Tab):
While less likely to be the sole cause, you can also check the Application tab within the Security Group application.
Review the list of applications and ensure the security group has at least "READ" access for the "Maximo Manage" application itself.

Test Login:
After granting "READ" access to the "OSLCMAFAPPDATA" object structure, have the affected user attempt to log in to Maximo Manage again.
The login process should now proceed without the "BMXAA0024E" error.

MAS - Error in Mobile when new work order is sync which had an Inspection record

 There are times when the sync of the mobile device would bring a new Work Order, however on accessing that record there will be an error if it had an Inspection record associated with it.

Debugging the Problem

Mobile :
1)Create workorder in Mobile with inspection form
2)Update the Section A from Inspection form

Desktop:
1)Open the same workorder .
2)Update Section B,C from Inspection form

Mobile:
1)Refresh the workorder.

2)Check the Inspection form (B,C sections not updated on Inspection form)

RESULT: The initialized inspection in the first download only, this is by design

EXPECTED RESULT: The desireable effect is to sync the inspection every time

Resolving The Problem

The recommendation could be to modify the code to ensure a full sync occurs when a work order record is retrieved.

This could be achieved as follows:

Customize the File to be changed:  ExecutionFormDataController.js to force a full data sync

Action:  Remove items.length check

ExecutioFormDataController.js sample code


Thursday, April 25, 2024

MAS and Manage custom resources are not reconciled

 After a change was applied to IBM Maximo Application Suite (MAS) or IBM Maximo Manage, the custom resources are not reconciled.

For example after you enable manual certificates in the Suite custom resource, you set manualCertMgmt: true in the spec section, you see that the status section still shows manualCertMgmt: false

Diagnosing The Problem

In version 8.10 and before, the suite custom resource is reconciled by the mas operator, in version 8.11, it is reconciled by the entitymgr-suite operator.
Check the logs for the operator for errors.
 
for example:
{"level":"error","ts":"2024-02-01T08:51:35Z","logger":"runner","msg":"\u001b[0;34mansible-playbook [core 2.15.2]\u001b[0m\r\n\u001b[0;34m config file = /etc/ansible/ansible.cfg\u001b[0m\r\n\u001b[0;34m configured module search path = ['/opt/ansible/library']\u001b[0m\r\n\u001b[0;34m ansible python module location = /usr/local/lib/python3.9/site-packages/ansible\u001b[0m\r\n\u001b[0;34m ansible collection location = /opt/ansible/.ansible/collections:/usr/share/ansible/collections\u001b[0m\r\n\u001b[0;34m executable location = /usr/local/bin/ansible-playbook\u001b[0m\r\n\u001b[0;34m python version = 3.9.16 (main, Sep 22 2023, 17:57:55) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] (/usr/bin/python3)\u001b[0m\r\n\u001b[0;34m jinja version = 3.1.2\u001b[0m\r\n\u001b[0;34m libyaml = True\u001b[0m\r\n\u001b[0;34mUsing /etc/ansible/ansible.cfg as config file\u001b[0m\r\n\u001b[0;31mERROR! Unexpected Exception, this is probably a bug: [Errno 28] No space left on device\u001b[0m\r\nto see the full traceback, use -vvv\r\n","job":"4687123108924943814","name":"masinstanceid","namespace":"mas-masinstanceid-core","error":"exit status 250","stacktrace":"github.com/operator-framework/operator-sdk/internal/ansible/runner.(*runner).Run.func1\n\t/workspace/internal/ansible/runner/runner.go:269"}

For a list of the MAS and Manage pods and their function, refer to 
https://www.ibm.com/docs/en/mas-cd/continuous-delivery?topic=reference-maximo-application-suite-pod-details

Resolving The Problem

Restart the pod (delete the pod so it will be recreated).

This error may affect other operators, you can collect the MAS must gather using the CLI and search all logs for the same error and restart the pods where this error occurred.

MAS - JDBC error in MAS Core Suite Admin

 In suite administration, configuration section user gets an error related to database connection.


Error snippet:
Error: Message: JDBC configuration was unable to be verified: [IBM][CLI Driver][DB2/LINUXX8664] SQL0601N The name of the object to be created is identical to the existing name "DB2INST1.MYTESTTABLE" of type "TABLE". SQLSTATE=42710 SQLCODE=-601


An attempt to name an object failed because the name is already in use for an object of the same type.

Answer

DB2INST1.MYTESTTABLE table can be drop as it plays no role here.

Below is the command to drop table:
$ db2 drop table DB2INST1.MYTESTTABLE

For more information on SQLCODE=-601:
https://www.ibm.com/docs/en/db2-for-zos/11?topic=codes-601


MAS - The authentication token is invalid: ExpiredSignatureError('Signature has expired')

 When you try to log into Maximo Application Suite, you receive a message:

Login failed
Invalid username or password. Try again or contact an administrator reset.

In coreapi log:
AIUCO1001E: The authentication token is invalid: ExpiredSignatureError('Signature has expired')

Resolving The Problem

Export a new license key file in IBM Rational license Key Center and replace it in Maximo Application Suite:

image-20240307184942-1

Tuesday, April 23, 2024

Maximo Mobile - Receives error "The app does not exist" during data download

 STEPS:

1) Install Maximo Mobile from Google play store app

2) Enter URL

3) Click Log In

RESULTS: On the Setting up page, navigator shows “Setting up (0%)”
Download error "An error occurred during the data download. View the log for more information. The app does not exist"

image-20230511211130-1

Diagnosing The Problem

Excerpt from Debug device log :[ERROR]: [containerApp]: [JS-DisconnectedRESTConnection]: Request for /core/packages?workspaceId=hccbprod taking 15002 miliseconds

[ERROR]: [containerApp]: [DownloadController]: Download error: The app does not exist.

Collect log files from mobileapi and coreapi pods:

1) Reproduce the error to ensure it is logged
2) Login openshift web console
3) Go to Workloads->Pods
4) Select project <masinstid>-core
5) Search "coreapi", you may find 3 pods like screenshot
image-20230511211801-2
6) Click each pod
7) Go to Logs tab
8) Click download

image-20230511211915-3

Repeat 5-8, search for "mobileapi"


Resolving The Problem

Mobile api log shows error about mongo certificate

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:XXXX),mas-mongo-ce.mas-mongo-svc.cluster.local:XXXX:

Restart the mobileapi pod to up the mongo certificate from trust store.


OpenShift commands

You can check the OC by running the instructions listed below.  #login with admin user oc login https://<master-server>:8443 -u admin ...