Discussion:
Help needed with initial JIRA / PostgreSQL configuration
f***@atlassian.com
2009-09-09 03:44:28 UTC
Permalink
Hi,
Please excuse my ignorance, but I'm a total newbie.
I'm trying to follow the steps to configure JIRA on a PPC G5 Mac running OS X 10.5.8.

I am able to see JIRA in my browser, but read the following message:
+"You are using HSQL DB, which is an in-memory database and susceptible to corruption when abnormally terminated. DO NOT USE THIS IN A PRODUCTION SYSTEM. Instead we recommend using an external database, for a list of supported databases please see our documentation"+

I have installed PostgreSQL and came to this page:
http://www.atlassian.com/software/jira/docs/v3.13/databases/postgres.html

I think that I managed to create a database, but I'm not 100% sure. I can't create a user.
How exactly do I create the database and user?
I found this example, and changed name and password to make it relevant to my needs, but I don't know how this is supposed to work:
+CREATEDB jiradb+
+CREATE USER xxxxx WITH PASSWORD 'xxxxx'+

I have typed those commands in Terminal, which is launched when I double click on "SQL Shell (psql)" but I don't think this is working.

Once I can do this first step I'll try to follow the additional steps. I've already downloaded the PostgreSQL JDBC driver.

Thank you VERY MUCH for your help.
Eddie
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-09 04:10:56 UTC
Permalink
Hi,

You can use pgAdmin (a GUI tool for Postgres administration) to configure/create the database and users. Once that is done, you can follow that Atlassian documentation to configure JIRA to use Postgres instead of HSQL.

Regards

Patrick Li
--
Post by patrick.li - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-09 05:52:54 UTC
Permalink
Thanks Patrick.

Unfortunately the message remains even after modifying the "server.xml" and "atlassian-jira/WEB-INF/classes/entityengine.xml" files.

Your websites indicates to use "postgres72"
Could this be an issue since the current version is 84?
The driver also shows 84 ("postgresql-8.4-701.jdbc4.jar")

Or is there something else I have to do?

Thanks again!
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-09 20:21:31 UTC
Permalink
I tried to work again at figuring this out, but now I can't even access JIRA. Please see attachment.
Thanks again for the help.
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-16 20:09:57 UTC
Permalink
I guess that I'll wait a couple of more weeks and start from scratch with JIRA 4. :(
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-17 00:25:25 UTC
Permalink
Hi Eddie,

So can JIRA access the database at all? I have linked up JIRA with Postgres 8.3 and I think 8.4 should work too. Try use a different driver, one that is not jdbc4 maybe. Can you also check the logs for errors?

Regards

Patrick Li
--
Post by patrick.li - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-17 23:06:35 UTC
Permalink
Hi Patrick,
I was able to connect using 8.4, but when I turned on my Mac the next day I could not connect at all and got the "HTTP Status 404" as shown in the previous attachment.

I uninstalled JIRA and started from the beginning. It works until I restart my Mac. After that I get the same error.

Before restarting -and after modifying the relevant files- I still got the following message:

+"You are using HSQL DB, which is an in-memory database and susceptible to corruption when abnormally terminated. DO NOT USE THIS IN A PRODUCTION SYSTEM. Instead we recommend using an external database, for a list of supported databases please see our documentation"+

As I did before, I followed the video shown here for the installation:
http://confluence.atlassian.com/display/JIRA/JIRA+101

I followed the steps shown here for configuring PostgreSQL, editing the relevant files with the text shown in bold.
http://www.atlassian.com/software/jira/docs/latest/databases/postgres.html
Note that PostgreSQL7.2 is mentioned in that page, and I'm using 8.4. Is the editing different for that newer version?

I'm using the postgresql-8.4-701.jdbc3.jar driver

Are these the relevant log errors?

+2009-09-17 15:54:18,230 main ERROR [atlassian.jira.service.DefaultServiceManager] Could not configure services:+
+org.ofbiz.core.entity.GenericDataSourceException: Unable to esablish a connection with the database. (Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgresql://host:port/database')+

+org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgresql://host:port/database'+

+Caused by: java.sql.SQLException: No suitable driver+
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-18 00:30:37 UTC
Permalink
Hi Eddie,

Looking at the error message, it complains about getting connection or something wrong with the driver. Can you check (when it is failing) that the correct driver jar file is available in the lib directory and the database is accessible? Is Postgres setup to start when your Mac starts?

Regards

Patrick Li
--
Post by patrick.li - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-18 02:05:31 UTC
Permalink
The driver is in this lib directory:
/Applications/atlassian-jira-enterprise-3.13.5-standalone/common/lib/postgresql-8.4-701.jdbc3.jar

How do I check to see whether the database is accessible?
It seems to be connected as seen in the attached snapshot, but I don't know if this is the way to check.

Postgres does not start when my Mac starts. I've tried "Start Server" but get a message (see attachment)

"Restart Server" seems to work (see attachment)

Should I use these functions? I was just launching pgAdminIII and connecting the database, but was not using "Start Server" or ""Restart Server"

Regardless of using "Start Server," "Restart Server," or pgAdminIII, I then run "startup.sh" and get the same "HTTP Status 404" message when going to http://localhost:8080/

Thanks for all your help Patrick.
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-18 03:19:00 UTC
Permalink
Hi Eddie,

So when you restart your Mac,

1. Can you connect to Postgres with pgAdmin?
2. If not, it probably means Postgres is not running, so you try restart and then you can connect to it with pgAdmin?
3. Then you startup JIRA but it cannot connect?

Regards

Patrick Li
--
Post by patrick.li - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-18 04:48:22 UTC
Permalink
Hi Patrick,
1. I can connect using pgAdmin. I get a message saying it's connecting and under the Property Connected? it says Yes.
3. I then startup JIRA. Terminal shows the following:

+"Last login: Thu Sep 17 21:37:00 on console+
+PowerMacG5:~ eduardo$ /Applications/atlassian-jira-enterprise-3.13.5-standalone/bin/startup.sh ; exit;+
+Detecting JVM PermGen support...+
+PermGen switch is supported. Setting to 128m+
+If you encounter issues starting up JIRA Standalone Edition, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide+
+Using CATALINA_BASE: /Applications/atlassian-jira-enterprise-3.13.5-standalone+
+Using CATALINA_HOME: /Applications/atlassian-jira-enterprise-3.13.5-standalone+
+Using CATALINA_TMPDIR: /Applications/atlassian-jira-enterprise-3.13.5-standalone/temp+
+Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home+
+logout+

+[Process completed]"+

Then when I go to http://localhost:8080/ I get the following:
+"HTTP Status 404 - /+
+type Status report+
+message /+
+description The requested resource (/) is not available.+
+Apache Tomcat/5.5.26"+
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-18 05:26:40 UTC
Permalink
Hi,

This is weird. You get 404 because JIRA failed to startup. Can you attach your log file?

Regards

Patrick Li
--
Post by patrick.li - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-18 07:39:07 UTC
Permalink
Hi,
Attached are the files as requested.
Thanks again.

I get a message saying "File 'atlassian-jira.log' is too large." It is 1.4 MB, which does seem a bit large.
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-18 12:53:45 UTC
Permalink
Hi,

For the url value in server.xml, is it actually url="jdbc:postgresql://host:port/database" or you have changed it too?

With the log file, you can remove it and start up JIRA again, it will recreate the file.

Regards

Patrick Li
--
Post by patrick.li - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-18 14:28:29 UTC
Permalink
I just checked and it is:

url="jdbc:postgresql://host:port/database"
maxActive="20" />

I also tried it without the "maxActive="20"" which is in the original file but not on this page:
http://www.atlassian.com/software/jira/docs/latest/databases/postgres.html

Should I use something other than "url="jdbc:postgresql://host:port/database""
Is it better to remove the maxActive="20" as well?

Attached is the new log.
Thanks!
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-19 13:36:48 UTC
Permalink
Hi Eddie,

The url should be the actual address to your database, what you have is the format. So for example assuming both JIRA and Postgres is running on the same machine (your Mac), it should be something like

url = "jdbc:postgresql://localhost:5431/jiraDB"

Regards

Patrick Li
--
Post by patrick.li - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-19 15:50:54 UTC
Permalink
Hi Patrick.

How do I determine the URL?
I created the database as instructed but don't recall any specific path to it.

With pgAdmin3 I can see that under servers I have
Name: PostgreSQL 8.4
Host: localhost
Port: 5432

Under the server I have Databases, and there I can see jiradb

I copied jdbc:postgresql://localhost:5431/jiraDB and tried with 5432 and jiradb (lowercase) but get the same error as before.

Both JIRA and Postgres are running on my Mac.

I'll try again later today after rebooting to see if that helps.
Thanks again.
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-19 16:40:08 UTC
Permalink
Patrick,
Things seem to be working fine after the restart.
Thanks again for all your help.
Eddie
--
Post by Eddie - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
f***@atlassian.com
2009-09-20 07:44:04 UTC
Permalink
Hi,

You just need to swap out different parts of the URL pattern with their actual values

host: localhost (or IP/computer name of where the DB is hosted)
port: port number
database: name of the database created and given to JIRA.

Regards

Patrick Li
--
Post by patrick.li - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=36962
Loading...