su: cannot open session: Module is unknown
The upgrade issue arises in several linux editions such as RHEL and CentOS when the bundled postgres database needs to be upgraded in that particular patch and the upgrade is triggered by the root user.
The highlighted line in the traces below (su: cannot open session: Module is unknown) identifies this specific upgrade failure instance.
Log Traces:
- Oct 27, 2023 4:13:06 PM [pglog] [INFO] : su: cannot open session: Module is unknown
- ............
- ............
- Oct 12, 2023 4:13:06 PM [com.adventnet.persistence.DefaultPreProcessor] [INFO] : Exception occured while initializing
- Oct 12, 2023 4:13:06 PM [SYSERR] [INFO] : java.net.ConnectException: Trying to start PostgresSQL server failed
- Oct 12, 2023 4:13:06 PM [SYSERR] [INFO] : at com.adventnet.db.adapter.postgres.DefaultPostgresDBInitializer.startDBServer(DefaultPostgresDBInitializer.java:201)
- Oct 12, 2023 4:13:06 PM [SYSERR] [INFO] : at com.adventnet.db.adapter.postgres.PostgresDBAdapter.startAndCheckDBServer(PostgresDBAdapter.java:781)
( or )
- Aug 12, 2023 4:13:06 PM [pglog] [INFO] : su: cannot open session: Module is unknown
- ............
- ............
- Aug 12, 2023 6:16:50 AM [com.adventnet.persistence.PostgresPreProcessor] [SEVERE] : PostgreSQL Server has not shutdown properly with pg_isready state :: [0]
- Aug 12, 2023 6:16:50 AM [com.adventnet.persistence.PostgresPreProcessor] [SEVERE] : {0}java.lang.Exception: PostgreSQL Server was not stopped properly
- at com.adventnet.persistence.PostgresPreProcessor.checkPostgresServerStatus(PostgresPreProcessor.java:1902)
Workaround 1
- Initiate the upgrade process as normal user with all privilege to the ServiceDesk directory
Note:
- If the application is already started using root user, then majority of the file ownership will be changed to root, so make sure if the proper privilege is given to that normal user. Make use of the below command to change the permission to normal user.
- chown -R <normal user name> : <normal user group> <product_installation_location>
- For Example,
- chown -R admin:admin_ubuntu ServiceDesk
- If any permission issue is occurring then the normal user can make a copy of the ServiceDesk directory in a different folder and then initiate the upgrade proces.
- run ./initpgsql.sh once, if it completed successfully, you are good to proceed with upgrade. otherwise, need to check the permissions.
(or)
Workaround 2:
- Please navigate to <product_installation_directory>/bin directory in your server.
- Take a backup of UpdateManager.sh script file.
- Open that file and comment out the below lines by adding the #(hash) in front and save the file.
- LD_LIBRARY_PATH=$DB_HOME/lib/:./lib/native:$LD_LIBRARY_PATH
- export LD_LIBRARY_PATH
Ex: After commenting out, it will look like,
- #LD_LIBRARY_PATH=$DB_HOME/lib/:./lib/native:$LD_LIBRARY_PATH
- #export LD_LIBRARY_PATH
4. Initiate the upgrade process.
New to ADSelfService Plus?
Related Articles
How to Connect External Postgres
To install an external PostgreSQL server, ensure the PostgreSQL version matches the inbuilt PostgreSQL version series of the ServiceDesk Plus application. For example: If ServiceDesk Plus version is 14010 with PostgreSQL version 10.21, install an ...
Unknown user and technicians permission
The requests that are not having a Site set means (Not associated to any site),, those requests are raised by Unknown users or Unregistered users or these users are NOT created in the application. These requests will be viewed only by certain ...
Remote read only access to database for Postgres customers
Frequently customers want to connect some reporting / dashboard application like PowerBI or Tableau with our Postgres database server. By default, the bundled Postgres is configured to only listen to the local machine. We can configure to allow ...
How to connect to external postgres(external DB)
1. From the postgres installed path navigate to bin folder and open a command prompt 2. Execute the command --> pg_ctl -D "C:\Program Files\PostgreSQL\10\data" start (Postgres server gets started) 3. Connect to DB using the command-->psql -U postgres ...
Script to send notifications when a unknown request is raised
Use case The script will send email notifications to the address configured inside the script whenever a request is created under unknown requests. This notification will be sent to Admin Email Pre-requisite - Python should be installed in the ...