Troubleshooting
Problem
Attempting to deploy IBM i2 Intelligence Analysis Platform 3.0.5.1 against an Oracle database results in connection failure error.
Symptom
Execute "python deploy.py -s write" as described in the Deployment Guide
As part of the deployment, the script will check the connection for the created WebSphere data source. This check will fail.
The exact output will differ slightly depending on the name of the data source, but will be of the form:
Testing connection to datasource ds/DocumentStore-doc1
ERROR: Failed to establish connection to datasource"
Cause
The WebSphere data source created by the deployment script has an incorrect connection URL for an Oracle server. The connection URL includes the database name instead of the instance name.
Environment
IBM i2 Intelligence Analysis Platform 3.0.5.1
Diagnosing The Problem
- 1) Open WebSphere Administrative Console in a web browser
- 2) Expand "Resources"
- 3) Expand "JDBC"
- 4) Click on "Data sources"
- 5) Select the checkbox next to the affected data source (e.g., ds/DocumentStore-doc1)
- 6) Click "Test connection"
The connection will fail with an error. This may be of the form below, but may well differ slightly:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor DSRA0010E: SQL State = 66000, Error Code = 12,514
Optional: If you would like to further confirm that the URL is the problem and check whether the fix below will resolve the issue then you can follow the steps below. Alternatively, you can just follow the resolution steps to rebuild the profile.
- 7) Click on the data source name in WebSphere Administrative Console to view the properties of the misconfigured data source
- 8) Scroll down and examine the URL. It will have the database name at the end of the URL. For example, if the database is named Document then the URL will be of the form:
jdbc:oracle:thin:@//localhost:1521/Document
- 9) Replace the database name in the URL with the name of the Oracle instance. For example, if the Oracle instance is "orcl" then the URL should be of the form:
jdbc:oracle:thin:@//localhost:1521/orcl
- 10) Click "Apply"
- 11) Click "Save"
- 12) Select the checkbox next to the affected data source (e.g., ds/DocumentStore-doc1)
- 13) Click "Test connection". The connection should now succeed
Resolving The Problem
To resolve the problem completely, the topology file needs to be changed and the profile rebuilt.
- 1) Edit topology.xml and ensure that the database-name is set to the Oracle instance name. For example:
<database dialect="oracle" xa="true" database-name="my-oracle-instance-name"
database-type="DocumentStore" id="doc1" host-name="my-host-name"
port-number="1521" max-pool-size="5" />
<database dialect="oracle" xa="true" database-name="my-oracle-instance-name"
database-type="WriteStore" id="write1" host-name="my-host-name"
port-number="1521" max-pool-size="5" />
<database dialect="oracle" xa="false" database-name="my-oracle-instance-name"
database-type="ItemRetrievalStore" id="item1" host-name="my-host-name"
port-number="1521" max-pool-size="5" />
- 2) Execute "python deploy.py -s write -t delete-was-profile"
- 3) Execute "python deploy.py -s write -t create-was-profile"
This will remove and recreate the profiles with the correct data source connection URL. If the problem also affects the read side then execute the same commands on the read side.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21668372