User receives database access error on attempt at logon to Server Manager


 Product(s):APM Implementation and Performance Management
 Version(s):7
 Environment:N/A
 Area:N/A
 Subarea:N/A

Problem Description

An APM user with Oracle database environment would receive a "Database access error" when attempting to logon to the APM Server Manager or when trying to deploy an APM Smart Client package via the Server Manager:

In the Server Manager logs there would be the following error message:

2022-10-07 21:15:13.5363Z [Host=servername.domainname.com] [Computer=ServerName] RegisterServerController.Post() - called to register the server. ServerID: ServerName _server_Bentley_services
2022-10-07 21:15:13.5363Z [Host= servername.domainname.com] [Computer= ServerName] Problem encountered getting user information from database for severSessionID: ServerName -IvaraServer-*****-******-*****-****** EXCEPTION OCCURRED:NullReferenceException Object reference not set to an instance of an object.    at Bentley.APM.Common.Db.GenericDatabaseConnector.CreateConnection()
   at ServerAdminBroker.APMAuthenticationManager.IsValidRegisteredServer(String serverSessionID)
   at ServerAdminBroker.Controllers.RegisterServerController.Post(BrokerFullServerInfo serverInfo)
2022-10-07 21:15:13.5363Z [Host= servername.domainname.com] [Computer= ServerName] Exception Processing Authentication request EXCEPTION OCCURRED:NullReferenceException Object reference not set to an instance of an object.    at Bentley.APM.Common.Db.GenericDatabaseConnector.CreateConnection()
   at ServerAdminBroker.APMAuthenticationManager.IsValidRegisteredServer(String serverSessionID)
   at ServerAdminBroker.Controllers.RegisterServerController.Post(BrokerFullServerInfo serverInfo)

Running the Bentley Configuration tool Instance test resulted in no errors or warnings.

Testing the ODBC DSN resulted in a successful connection.

Other services using the same Database with the same credentials all tested and ran successfully.

Server Manager website was updated, restarted and running in the IIS Manager.

Solution

It was found that the user had recently updated the Oracle database from Oracle release 12 to Oracle release 19. Keeping both Oracle client instances and associated drivers installed on the server. There results in a conflict whereby the server tries to connect the Server Manager to the Oracle 12 client for database authentication using the Oracle 19 drivers to the Oracle 19 database.

Bentley recommends that the user only use one Oracle Client instance on the server and that all versions of the Oracle client, Oracle drivers and Oracle database match, otherwise this conflict may cause various APM services to fail or work with unexpected results.

A bypass has been developed which adds a section of code to the Web.Config file that forces the Server Manager website to use the Oracle 19 client.

Please launch an SR if you believe that you are experiencing this issue and wish to use the workaround.

See also

SR 7001487456

https://communities.bentley.com/products/assetwise/asset_performance_management/w/internal_support_solutions/62797/web-config-setting-to-force-apm-server-manager-to-use-oracle-19-client