This morning, while working on an internal JIRA instance, I encountered the following error:
ERROR [c.a.j.appconsistency.db.PostgresSchemaConfigCheck] The schema name 'null' in your dbconfig.xml file contains upper case characters and JIRA only supports lower case schemas in POSTGRES.
Searching for an answer on this, I found that no one really had documented this error message and I figured I would create something so that others (and my future self) don't have to approach this from a blank-slate.
This error occurred on JIRA 7.0 Service Desk 3.xx with a dbconfig.xml file generated by config.sh.
The dbconfig.xml (with some information redacted) appears as follows:
<?xml version="1.0" encoding="UTF-8"?> <jira-database-config> <name>defaultDS</name> <delegator-name>default</delegator-name> <database-type>postgres72</database-type> <jdbc-datasource> <url>jdbc:postgresql://***REDACTED***/***REDACTED***</url> <driver-class>org.postgresql.Driver</driver-class> <username>***REDACTED***</username> <password>***REDACTED***</password> <pool-min-size>***REDACTED***</pool-min-size> <pool-max-size>***REDACTED***</pool-max-size> <pool-max-wait>***REDACTED***</pool-max-wait> <time-between-eviction-runs-millis>***REDACTED***</time-between-eviction-runs-millis> <pool-max-idle>***REDACTED***</pool-max-idle> <pool-prepared-statements>***REDACTED***</pool-prepared-statements> <pool-remove-abandoned>***REDACTED***</pool-remove-abandoned> <pool-remove-abandoned-timeout>***REDACTED***</pool-remove-abandoned-timeout> <pool-test-while-idle>***REDACTED***</pool-test-while-idle> <validation-query-timeout>***REDACTED***</validation-query-timeout> </jdbc-datasource> </jira-database-config>
(1) This error appears to be a trivial issue. Not specifying a schema appears to have no impact on JIRA starting as NULL schema just reverts to the default (e.g. public) schema...at least in my installation. Nonetheless, I don't like errors in my logs.
(2) I manually added "<schema-name>public</schema-name>" to the dbconfig.xml to fix this issue. This fixes my issue.
(3) But what if you wanted to connect to a different schema? Well, first you could list all of the available schemas. The following SQL statement will tell you what schemas are available (in postgresql only):
sam_test-> select schema_name sam-test-> from information_schema.schemata; schema_name -------------------- public pg_catalog information_schema global_thermonuclear_war a_thing_that_should_work (5 rows)
Hopefully that helps someone else, but what about the long term? Why doesn't config.sh do this?
Researching a bit further, I found that @Nathan Peters already identified this issue (See [Jira config.sh creates invalid database settings file]). I'm not sure why I didn't find this earlier in my morning (not enough coffee, perhaps). Nathan raises a valid point in my humble opinion. While this is a trivial error with a known fix, I have submitted a bug report (https://jira.atlassian.com/browse/JRA-47663) this morning.
If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot