Wednesday, June 19, 2024

Running JasperReports from IBM i

For any of you looking to do reporting from IBM i. I created a wrapper around Pete Helgrens RPG Report Generator Java code that can execute Jasper Reports from IBM i. 

I have done work with Jasper Reports since 2007. JasperReports has a bit of a learning curve but well worth it if you learn to build reports and documents with it. 

This wrapper is IBM i specific, but Jasper can be used anywhere to generate reports. Have fun.
https://github.com/richardschoen/ibmijasper

Tuesday, May 21, 2024

Configure NGINX with specific user without user needing *ALLOBJ Authority

User was seeing the following error in their NGINX log file when trying to start or restart the NGINX server via:

Errors showed up in the log file in file: /QOpenSys/var/log/nginx/error.log

Accessing error.log from 5250 command line:
WRKLNK '/QOpenSys/var/log/nginx/error.log'

2024/05/21 13:00:46 [notice] 3215038#1: signal process started                 
2024/05/21 13:00:46 [alert] 3214934#1: recvmsg() failed (13: Permission denied)
2024/05/21 13:00:46 [alert] 3215039#1: recvmsg() failed (13: Permission denied)
2024/05/21 13:00:46 [alert] 3215041#1: recvmsg() failed (13: Permission denied)
2024/05/21 13:00:46 [alert] 3215042#1: recvmsg() failed (13: Permission denied)

This seems to be related to setting up an appropriate user profile to run the NGINX server and threads under.

By default the main thread user will be the user who started the NGINX server. And worker thread jobs run under user profile: QTMHHTTP by default.

What we want is for the main thread and worker threads to run under the same user profile. See the following GitHub article for a resolution: https://github.com/richardschoen/howtostuff/blob/master/nginx-ibmi-without-allobject-auth.md


Saturday, February 03, 2024

Update IBM i System Time with Python

I just completed a nice example of integrating IBM i system commands with Python when you have a need to update your system time. The IBM i has a built in time sync, but in my case some of the firewalling services I used get in the way so I needed a way to update on demand via an NTP time server. And Python didn't disappoint. 

Check out this link for the Python code example:    
https://github.com/richardschoen/PythonSamples/blob/master/ibmi/ibmintptimeupdate.py