Consider Time Zone with automation script

It took me some time to get to this piece of code, but requirement changed and I needed to ditch it. But I'm sure I'll need to use it at some point in the future, so why not put a note here just in case.


Requirement

- A client has many hotels in Sydney and Brisbane which are in two different time zones. Sydney has daylight saving while Brisbane doesn't have. In other words, there is one hour difference for half of the year, and no time difference for the other half.

- Client wants to display a warning message to the user that when he/she raised a service request out of normal working hours (7AM to 7PM), if it's a high priority item, they should make a phone call instead.


Issues with Maximo attachment (DOCLINKS)

 Just a bunch of my own personal notes regarding Maximo attachment (DOCLINKS) function.

  •  When a file is attached to a record in Maximo, it creates a record in the DOCLINKS and a record in the DOCINFO table to keep the details of the file. The file is copied to a location on disk, usually on a local folder (e.g. D:\DOCLINKS) or on a network shared folder. The path for Maximo to read the file is kept in the URLNAME field of the DOCINFO table.
  • To setup this function, refer to this blog post by Bruno on MaximoDev blog (https://bportaluri.com/2014/06/attachments-doclinks-configuration.html)
  • When a user uploads an attachment, the location where Maximo puts the file will depend on the Folder selected:

How to test SMTP with PowerShell for setting up Maximo email notification

In an enterprise IT environment, it is sometimes difficult to setup Maximo to talk with SMTP service due to networking and security restrictions. To troubleshoot SMTP configuration, in the past, we can use Telnet from CMD tool. However, in newer versions of Windows Server, Telnet is often not installed by default. In such cases, we can use PowerShell to test and confirm the SMTP and firewall setting is working before trying to configure SMTP in Maximo.

The first thing I would do is checking whether firewall has been opened so that the port used by SMTP service (e.g. port 25) is reachable from the Maximo server.


Common issues when setting up Maximo with a Load Balancer

Just a couple of my own notes setting up Maximo with a Load Balancer which I learnt through the hard way:

- Property mxe.system.useLoadBalancer – should be set to 1. If not enabled, Maximo thinks the IP address of the Load Balancer’s IP is the client’s and blocks it when the number of requests exceeds a certain threshold (by default is 50 per 3 seconds). 

For more details about the IP blocking function, read this previous post

Messaging engine cannot be started as there is no runtime initialized for it yet

I sometimes have issues with message engine not running. Usually I'll just try to restart the whole system and hope that it goes away.

If it doesn't work, in most cases, it is caused by a corrupted file store used by the message engine and the suggestion from the Internet is to delete these files, which seems to work fine.

Sometimes, with the message engine uses a database store, I had a very similar issue. I find it quite hard to find out the exact root cause. So I chose the easier path by simply deleting the whole message engine, create a new one, giving a new schema name for the data store. This ensures it creates new tables when message engine is initialized the first time. 

Creating a new message engine and re-assigning bus destinations usually take less than 5 minutes, and it seems a lot easier than troubleshooting and finding the root cause of the issue.


JDBC Connection fails due to SQL Server allows TLS1.2 only

In a recent upgrade, I had to get Maximo 7.6.1.2 to work with SQL Server 2019 (15.0.4198.2 - Jan/2022). 

Initially, I thought I needed to replace the JDBC driver that comes with Maximo with the latest JDBC driver version (10.2). However it doesn't solve the issue.

After searching the Web, I came across this page which suggests the problem is due to SSL protocol TLS 1.2 is required.

Thus, I managed to fix the issue by adding this parameter to the end of the jdbc connections string: sslProtocol=TLSv1.2;

The full connection string will look as follows:

mxe.db.url=jdbc:sqlserver://;serverName=[SERVERNAME];databaseName=[DBNAME];portNumber=1433;integratedSecurity=false;sendStringParametersAsUnicode=false;sslProtocol=TLSv1.2;


The other method that seems to work is adding this parameter: -Dcom.ibm.jsse2.overrideDefaultTLS=true to the JVM argument of the Application server, or execution command of any tools running java. For example, for the integrityui.bat tool, I edit the file and update it as below:

@..\java\jre\bin\java -Dcom.ibm.jsse2.overrideDefaultTLS=true -Dswing.handleTopLevelPaint=false -classpath %MAXIMO_CLASSPATH% psdi.configure.UpgradeUI -i




Redeploy a single web.xml file

Most Maximo settings or java code can be deployed by copy/pasting the file directly to the installed folder in Websphere without having to rebuild and redeploy the application. However, with web.xml, it doesn't work that way. Sometimes, we need to update this file to increase timeout setting or enable/disable integrated security mode

Sure, we can directly modify the file in Websphere without redeployment, but we will also have update the file in a few temporary folders for which, I find the process quite tedious.

Recently, my colleague told me we can just deploy the single web.xml file instead. Below is the process:

- Update the web.xml file with new settings