New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Commodore Commodore
Commodore
588 views

OO 10.80 silent install with postgresql failed / installer doesn't extract db.name for db check

Jump to solution

Hi,

I have a strange behavior with OO 10.80 silent installation on RHEL.

Here is my silent file:

root.dir=/opt/microfocus/oo
install.java=true
install.ras=false
install.central=true
install.studio=false
install.docs=false
db.port=5432
db.host=DBHOST
db.type=postgresql
db.name=DBNAME
db.create-schema=true
db.admin.username=ADMINUSER
db.admin.password=PASS
http.port=8080
https.port=8443
http.port.access=disabled
should.start.central=false
language=en
db.username=DBUSER
db.password=PASS
idm.mode=native
ssl.certificate.type=self-signed

After installation I found these errors in installer.log:

2018-05-15 19:49:29,441 [INFO ] --- end of command outputs ---
2018-05-15 19:49:29,441 [INFO ] finished task: Configure TLS TrustStore, result: Configure TLS TrustStore: success
2018-05-15 19:49:29,441 [INFO ] starting task: Configure database properties
2018-05-15 19:49:29,441 [INFO ] database properties calculated location: /opt/microfocus/oo/central/conf/database.properties
2018-05-15 19:49:29,441 [INFO ] calculating database properties
2018-05-15 19:49:29,441 [INFO ] defaultDriver: org.postgresql.Driver
2018-05-15 19:49:29,441 [INFO ] driver: org.postgresql.Driver
2018-05-15 19:49:29,441 [INFO ] host: DBHOST
2018-05-15 19:49:29,442 [INFO ] db.port: 5432
2018-05-15 19:49:29,442 [INFO ] db.user: DBUSER
2018-05-15 19:49:29,473 [INFO ] db.pass: PASS
2018-05-15 19:49:29,473 [INFO ] db.name: DBNAME
2018-05-15 19:49:29,473 [INFO ] oracle.connection.type: sid
2018-05-15 19:49:29,473 [INFO ] service.name: null
2018-05-15 19:49:29,475 [INFO ] test db connection
2018-05-15 19:49:29,476 [INFO ] checking db version jdbc:postgresql://DBHOST:5432/ username: ADMINUSER
2018-05-15 19:49:29,639 [WARN ] unable to connect: FATAL: database "ADMINUSER" does not exist
org.postgresql.util.PSQLException: FATAL: database "ADMINUSER" does not exist

 

The checking URL seems to be incorrect. The db.name is missing at the end. If I don't specify the db name with psql then the name of the user is taken for db name.

Is this a bug with oo installer?

Many thanks in advance!

Robert

0 Likes
1 Solution

Accepted Solutions
Highlighted
Commodore Commodore
Commodore

Solved.

In my case the name of the admin db user and his db name was not exactly equal.

The db was auto generated with different name for the admin. For thoses cases a new option in silent file where useful.

Maybe this one: "db.admin.name"

 

Robert

View solution in original post

0 Likes
2 Replies
Highlighted
Commodore Commodore
Commodore

Found this in Java File:

 

private String getDbURL(String url, boolean adminDbTest, String dbType)

 {

String dbURl = url;

if (adminDbTest) {

if (isMSSQL14Url(dbType, dbURl)) {

dbURl = url.substring(0, url.indexOf(';'));

} else if ("postgresql".equals(dbType)) {

dbURl = url.substring(0, url.lastIndexOf('/') + 1);

} else if (!"oracle".equals(dbType)) {

dbURl = url.substring(0, url.lastIndexOf('/'));

 }

}

return dbURl;

 }

 

So if the dbUrl for postgresql is like this jdbc:postgresql://dbhost:5432/dbname then the dbname will be truncated. And this is causing the error.  If I change the line dbURl = url.substring(0, url.lastIndexOf('/') + 1); to dbURl = url.substring(0, url.lastIndexOf('/')); and give this dbUrl jdbc:postgresql://dbhost:5432/dbname/ ist works maybe.

0 Likes
Highlighted
Commodore Commodore
Commodore

Solved.

In my case the name of the admin db user and his db name was not exactly equal.

The db was auto generated with different name for the admin. For thoses cases a new option in silent file where useful.

Maybe this one: "db.admin.name"

 

Robert

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.