I have been tasked to install JIRA and Confluence into the same postgres database but into different schemas.
Has anyone had success in doing this? I am struggling to get it to work.
Thanks!
Nic: For some reason the system won't let me add a comment, so I'm going to try to edit the original post with my info:
=====
Hi Nic. I install postgres and JIRA with no problem. But once i install Confluence, I start to use Confluence a little and then get this "Oops" error:
java.lang.RuntimeException: javax.servlet.ServletException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getConfluenceResourceTags' in class com.atlassian.confluence.setup.velocity.VelocityFriendlyPageBuilderService threw exception com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.atlassian.plugins.base-hipchat-integration-plugin-api] at /decorators/includes/header.vm[line 84, column 20]
at com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:37)
caused by: javax.servlet.ServletException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getConfluenceResourceTags' in class com.atlassian.confluence.setup.velocity.VelocityFriendlyPageBuilderService threw exception com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.atlassian.plugins.base-hipchat-integration-plugin-api] at /decorators/includes/header.vm[line 84, column 20]
at com.atlassian.confluence.util.profiling.ConfluenceSitemeshDecorator$ErrorSendingErrorHandlingStrategy.handleException(ConfluenceSitemeshDecorator.java:249)
caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getConfluenceResourceTags' in class com.atlassian.confluence.setup.velocity.VelocityFriendlyPageBuilderService threw exception com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.atlassian.plugins.base-hipchat-integration-plugin-api] at /decorators/includes/header.vm[line 84, column 20]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
caused by: com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.atlassian.plugins.base-hipchat-integration-plugin-api]
at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:105)
caused by: java.lang.RuntimeException: Could not read fields for table AO_5FB9D7_AOHIP_CHAT_LINK
at net.java.ao.schema.helper.DatabaseMetaDataReaderImpl.getFields(DatabaseMetaDataReaderImpl.java:149)
caused by: org.postgresql.util.PSQLException: ERROR: relation "AO_5FB9D7_AOHIP_CHAT_LINK" does not exist Position: 15
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182)
-----------------------------------------
Here are the steps I am using to perform the install on a virtual machine running on Virtual Box (with NAT)
Sorry, some of the numbering got screwed up, but the order is the same.
Steps to install Postgres and Jira
- Chose Centos 6.7 and Basic Server in Virtual Box
- Modify ifcfg-eth0 ONBOOT=yes
- service iptables stop
- chkconfig iptables off
- service network restart
- add proxy=http://gatekeeper.mitre.org:80 to /etc/yum.conf
- yum clean all;yum update
- reboot
- Following https://wiki.postgresql.org/wiki/YUM_Installation instructions
- Add exclude=postgresql* to /etc/yum/pluginconf.d/rhnplugin.conf
- For Centos: On CentOS: /etc/yum.repos.d/CentOS-Base.repo, [base] and [updates] sections
- Install PGDM RPM file sudo yum localinstall http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm
- For Centos: http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-2.noarch.rpm
- Change https to http in /etc/yum.repos.d/pgdg-94-centos.repo
- Confirm install available: sudo yum list postgres*
- Install postgresql: sudo yum install postgresql94-server
- Initialize database: sudo service postgresql-9.4 initdb
- Set startup: sudo chkconfig postgresql-9.4 on
- Start service: sudo service postgresql-9.4 start
- Switch to postgres user : sudo su – postgres
- Launch psql
- Create user : CREATE ROLE jiradbuser WITH LOGIN;
- Connect to jiradb : \c jiradb
- Create schema: CREATE SCHEMA jiraschema;
- Change ownership of schema to jiradbuser: ALTER SCHEMA jiraschema OWNER TO jiradbuser;
- Create database: CREATE DATABASE jiradb WITH ENCODING 'UNICODE';
- Grant user rights to database: GRANT ALL ON DATABASE jiradb TO jiradbuser;
- Set user's password: ALTER USER jiradbuser WITH PASSWORD '<password>';
- Change the postgres authentication method. Edit /var/lib/pgsql/9.4/data/pg_hba.conf change to:
# "local" is for Unix domain socket connections only
local all all password
# IPv4 local connections:
host all all 127.0.0.1/32 password
# IPv6 local connections:
host all all ::1/128 password
- Restart the postgres service: service postgresql-9.4 restart
- Download the Jira installer and sftp it to the home folder on the postgres server
- Make the file executable: chmod a+x atlassian-jira-software-7.0.0-jira-7.0.0-x64.bin
- Launch the installer: ./atlassian-jira-software-7.0.0-jira-7.0.0-x64.bin
- User default install settings and install as service
- Stop iptables: service iptables stop
- Navigate to the Jira config web page from a browser
- Choose "I'll set it up myself"
- Choose "My Own Database"
To shutdown jira:
- service jira stop
- service postgresql-9.4 stop
To create Confluence schema:
- On the postgres server, using psql:
- \c jiradb
- CREATE SCHEMA confluenceschema;
- Change ownership of schema to confluenceuser: ALTER SCHEMA confluenceschema OWNER TO jiradbuser;
- Re order search path: SET search_path TO confluenceschema,jiraschema;
To install Confluence
- Following instructions at: https://confluence.atlassian.com/doc/installing-confluence-on-linux-143556824.html
- Download 64 bit Linux bin installer: https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.8.14-x64.bin
- SFTP file to server
- Make the file executable: chmod a+x atlassian-confluence-*
- Launch the installer: ./atlassian-confluence-5.8.14-x64.bin
- Custom install
- Where to be installed: /opt/atlassian/confluence
- Confluence data location: /var/atlassian/application-data/confluence
- User default ports: HTTP: 8090, Control: 8000
- Run as a service: Yes
- Install completes: Confluence 5.8.14 can be accessed at http://localhost:8090
- Choose "Production Installation"
- No add ons. Click Next
- Use the server ID to generate a license key and enter it.
- Click next
- Choose PostgreSQL external database.
- Choose Direct JDBC database connection
- Database setup: Driver Class Name org.postgresql.Driver
Database URL jdbc:postgresql://localhost:5432/jiradb
User Name jiradbuser
Password <jiradbuser password>
- Load content: Example Site
- Manage users and groups with JIRA: Connect to JIRA
- JIRA Server Location: http://localhost:8080
- JIRA Admin login: enter administrator username and password
- Advanced options: change jira-users to jira-software-users
Thanks in advance for any help you can give!