Bamboo 5.1.0 failing to create constraints on PostgreSQL 9.1

Hi all,

I've juts installed Bamboo 5.1.0 on Ubuntu 12.04.2 LTS. I've setup PostgreSQL 9.1 as external database but during the initial setup I'm getting the following errors:

2013-09-16 09:24:22 EST STATEMENT: drop table TRUSTED_APPS_IPS

2013-09-16 09:24:22 EST ERROR: table "password_reset_token" does not exist

2013-09-16 09:24:22 EST STATEMENT: drop table password_reset_token

2013-09-16 09:24:22 EST ERROR: table "deployment_version_status" does not exist

2013-09-16 09:24:22 EST STATEMENT: drop table DEPLOYMENT_VERSION_STATUS

2013-09-16 09:24:22 EST ERROR: table "deployment_version_jira_issue" does not exist

2013-09-16 09:24:22 EST STATEMENT: drop table DEPLOYMENT_VERSION_JIRA_ISSUE

2013-09-16 09:24:22 EST ERROR: table "brs_artifact_link" does not exist

2013-09-16 09:24:22 EST STATEMENT: drop table BRS_ARTIFACT_LINK

2013-09-16 09:24:22 EST ERROR: table "deployment_project_item_ba" does not exist

2013-09-16 09:24:22 EST STATEMENT: drop table DEPLOYMENT_PROJECT_ITEM_BA

2013-09-16 09:24:22 EST ERROR: table "artifact" does not exist

2013-09-16 09:24:22 EST STATEMENT: drop table ARTIFACT

2013-09-16 09:24:22 EST ERROR: table "hibernate_unique_key" does not exist

2013-09-16 09:24:22 EST STATEMENT: drop table hibernate_unique_key

2013-09-16 09:24:23 EST ERROR: could not read block 43 in file "base/63394/11787": read only 0 of 8192 bytes

2013-09-16 09:24:23 EST STATEMENT: alter table DEPLOYMENT_RESULT add constraint FKB7ACDAD7A248FEE7 foreign key (ENVIRONMENT_ID) references DEPLOYMENT_ENVIRONMENT

2013-09-16 09:24:23 EST ERROR: could not read block 43 in file "base/63394/11787": read only 0 of 8192 bytes

2013-09-16 09:24:23 EST STATEMENT: alter table DEPLOYMENT_RESULT add constraint FKB7ACDAD7F4F36A02 foreign key (VERSION_ID) references DEPLOYMENT_VERSION

2013-09-16 09:24:23 EST ERROR: could not read block 43 in file "base/63394/11787": read only 0 of 8192 bytes

2013-09-16 09:24:23 EST STATEMENT: alter table DEPLOYMENT_RESULT add constraint FKB7ACDAD7E3B5B062 foreign key (VARIABLE_CONTEXT_BASELINE_ID) references VARIABLE_CONTEXT_BASELINE

2013-09-16 09:24:23 EST ERROR: could not read block 43 in file "base/63394/11787": read only 0 of 8192 bytes

2013-09-16 09:24:23 EST STATEMENT: alter table DEPLOYMENT_VERSION_ITEM add constraint FKEC5E1747BD9BBC foreign key (DEPLOYMENT_VERSION_ID) references DEPLOYMENT_VERSION

2013-09-16 09:24:23 EST ERROR: could not read block 43 in file "base/63394/11787": read only 0 of 8192 bytes

2013-09-16 09:24:23 EST STATEMENT: alter table ELASTIC_SCHEDULE add constraint FK1C6B30E1581FB731 foreign key (ELASTIC_IMAGE) references ELASTIC_IMAGE

2013-09-16 09:24:23 EST ERROR: could not read block 43 in file "base/63394/11787": read only 0 of 8192 bytes

2013-09-16 09:24:23 EST STATEMENT: alter table TEST_CLASS_RESULT add constraint FK3521FF712170166F foreign key (TEST_CLASS_ID) references TEST_CLASS

2013-09-16 09:24:23 EST ERROR: could not read block 43 in file "base/63394/11787": read only 0 of 8192 bytes

.

.

and so on, lots of errors about not being able to read the specific database file and thus failing creating constraints. And the database file is really empty:

root@server:/opt/atlassian-bamboo-5.1.0# ls -l /var/lib/postgresql/9.1/main/base/63394/11787
-rw------- 1 postgres postgres 0 Sep 16 09:20 /var/lib/postgresql/9.1/main/base/63394/11787

When trying to setup a new build plan we get the same error message in the applciation log, that the above db file is empty.

The database looks ok on first glancef, it has 87 tables and just to chek one of them:

bamboo5=# \d capability;
Table "public.capability"
Column | Type | Modifiers
----------------+-------------------------+-----------
capability_id | bigint | not null
key_identifier | character varying(255) |
value | character varying(4000) |
capability_set | bigint |
Indexes:
"capability_pkey" PRIMARY KEY, btree (capability_id)
"capability_key_index" btree (key_identifier)
"capability_set_index" btree (capability_set)

bamboo5=# select * from capability;

capability_id | key_identifier | value | capability_set
---------------+---------------------------------------------+-------------------------------------------------------------+----------------
229377 | system.git.executable | /usr/bin/git | 163842
229378 | system.jdk.JDK 1.6.0_45 | /usr/lib/jvm/java-6-oracle | 163842
229379 | system.jdk.JDK 1.6 | /usr/lib/jvm/java-6-oracle | 163842
229380 | system.builder.node.Node.js 0.10 | /opt/node-0.10/bin/node | 163844
229381 | system.builder.grailsBuilder.Grails 1.3 | /opt/grails-1.3 | 163844
229382 | system.builder.mvn3.Maven 3.0 | /opt/maven-3.0 | 163844
229383 | system.jdk.JDK 1.7 | /opt/jdk-7 | 163844
.

.

We already have bamboo 4.2.1 running on the same server using the same PostgreSQL 9.1 database, different instance though.

Any ideas why is this failing?

Thanks

2 answers

This widget could not be displayed.

It looks like your database files are corrupt, you should probably salvage what you can and set up a new one. Bamboo does not have anything to do with it.

This widget could not be displayed.

There is already bamboo-4.2.1 running on the same database without any problems. Anyway, I moved to MySQL now it is working fine.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

81 views 1 0
Join discussion

Atlassian User Groups

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!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you