su: cannot open session: Module is unknown

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:

  1. Oct 27, 2023 4:13:06 PM  [pglog]  [INFO] : su: cannot open session: Module is unknown
  2. ............
  3. ............
  4. Oct 12, 2023 4:13:06 PM  [com.adventnet.persistence.DefaultPreProcessor]  [INFO] : Exception occured while initializing
  5. Oct 12, 2023 4:13:06 PM  [SYSERR]  [INFO] : Trying to start PostgresSQL server failed 
  6. Oct 12, 2023 4:13:06 PM  [SYSERR]  [INFO] : at com.adventnet.db.adapter.postgres.DefaultPostgresDBInitializer.startDBServer(
  7. Oct 12, 2023 4:13:06 PM  [SYSERR]  [INFO] : at com.adventnet.db.adapter.postgres.PostgresDBAdapter.startAndCheckDBServer(

( or )

  1. Aug 12, 2023 4:13:06 PM  [pglog]  [INFO] : su: cannot open session: Module is unknown
  2. ............
  3. ............
  4. Aug 12, 2023 6:16:50 AM  [com.adventnet.persistence.PostgresPreProcessor]  [SEVERE] : PostgreSQL Server has not shutdown properly with pg_isready state :: [0]
  5. Aug 12, 2023 6:16:50 AM  [com.adventnet.persistence.PostgresPreProcessor]  [SEVERE] : {0}java.lang.Exception: PostgreSQL Server was not stopped properly
  6. at com.adventnet.persistence.PostgresPreProcessor.checkPostgresServerStatus(

Workaround 1
  1. Initiate the upgrade process as normal user with all privilege to the ServiceDesk directory

  1. 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.
    1. chown -R <normal user name> : <normal user group> ServiceDeskplus
  2. 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.
  3. run ./ once, if it completed successfully, you are good to proceed with upgrade. otherwise, need to check the permissions.

Workaround 2:
  1. Please navigate to <product_installation_directory>/bin directory in your server.
  2. Take a backup of script file.
  3. Open that file and comment out the below lines by adding the #(hash) in front and save the file.
  1. LD_LIBRARY_PATH=$DB_HOME/lib/:./lib/native:$LD_LIBRARY_PATH
  2. export LD_LIBRARY_PATH

Ex: After commenting out, it will look like, 

  1. #LD_LIBRARY_PATH=$DB_HOME/lib/:./lib/native:$LD_LIBRARY_PATH
  2. #export LD_LIBRARY_PATH
       4. Initiate the upgrade process.

        New to ADManager Plus?

          New to ADSelfService Plus?

            • Related Articles

            • How to Connect External Postgres

              Install a External Postgres such that the version of that postgres is currently in the series of inbuilt postgres of our Application. Say for example, In Servicedeskplus Application version 14010, which has postgres version 10.21, then you should ...
            • 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 ...
            • Query Executor Tool for PostGres

              This tool is designed to execute queries in the customer environment by connecting the database by reading the database configuration file. We need to enter the query that we require to execute in queryToExecute.txt file. We can enter multiple ...
            • Migration failure for Postgres Database with a blank space in it

              Trace : \ManageEngine\ServiceDesk\Patch\AdventNet_ManageEngine_ServiceDesk_Plus-14.2.0-SP-1.0.0\SERVICEDESK\PreInstall\pg_migrate\pgsql_old\bin\pg_dumpall.exe", -U, postgres, -p, 65433, -h,, -r, -w, |, ...
            • Resetting Forgotten Postgres password

              When the customer has altered the postgres user password and forgotten on how to retrive it. Please follow the below procedure to Reset Postgres SuperUser Password. This case will be helpful in case of forgotten old password, for changing the ...