Error HTTP Status 404 - The installation of Jira 5.x

Every once in a while JIRA is not available at startup. Today when I first switched on the server, I got the error. Here are my logs:

localhost.2012-09-18.log

Sep 18, 2012 7:37:03 AM org.apache.catalina.core.StandardContext listenerStart

SEVERE: Exception sending context initialized event to listener instance of class com.atlassian.jira.startup.LauncherContextListener

com.atlassian.jira.exception.DataAccessException: org.postgresql.util.PSQLException: FATAL: the database system is starting up

at com.atlassian.jira.upgrade.util.UpgradeUtils.tableExists(UpgradeUtils.java:127)

at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.databaseSetup(MinimumUpgradableVersionCheck.java:49)

at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.isOk(MinimumUpgradableVersionCheck.java:30)

at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.doStartupChecks(JiraDatabaseConfigChecklist.java:63)

at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.startupOK(JiraDatabaseConfigChecklist.java:51)

at com.atlassian.jira.startup.DatabaseChecklistLauncher.start(DatabaseChecklistLauncher.java:35)

at com.atlassian.jira.startup.DefaultJiraLauncher$2.run(DefaultJiraLauncher.java:90)

at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:284)

at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseConfigured(DatabaseConfigurationManagerImpl.java:175)

at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:85)

at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:24)

at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:61)

at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:33)

at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:56)

at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:67)

at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:62)

at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.get(MultiTenantComponentMapImpl.java:121)

at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.onTenantStart(MultiTenantComponentMapImpl.java:165)

at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:134)

at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:131)

at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForEachListener(DefaultMultiTenantManager.java:256)

at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startTenant(DefaultMultiTenantManager.java:130)

at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startAll(DefaultMultiTenantManager.java:203)

at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:95)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: org.postgresql.util.PSQLException: FATAL: the database system is starting up

at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)

at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)

at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)

at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)

at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)

at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)

at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)

at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)

at org.postgresql.Driver.makeConnection(Driver.java:393)

at org.postgresql.Driver.connect(Driver.java:267)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:87)

at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:146)

at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:101)

at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)

at com.atlassian.jira.ofbiz.DefaultOfBizConnectionFactory.getConnection(DefaultOfBizConnectionFactory.java:28)

at com.atlassian.jira.upgrade.util.UpgradeUtils.tableExists(UpgradeUtils.java:100)

... 38 more

Sep 18, 2012 3:19:58 PM org.apache.catalina.core.ApplicationContext log

INFO: org.tuckey.web.filters.urlrewrite.utils.Log ERROR: logLevelConf: null

Sep 18, 2012 3:19:58 PM org.apache.catalina.core.ApplicationContext log

INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)

Thank you for the support

3 answers

1 accepted

I solved the problem by adding the LSB section in the startup script as follows (adding the following lines in the /etc/init.d/jira file):

### BEGIN INIT INFO

# Provides: jira

# Required-Start: $remote_fs $syslog $named $network $time

# Required-Stop: $remote_fs $syslog $named $network

# Should-Start: postgresql

# Should-Stop: postgresql

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: Atlassian JIRA

### END INIT INFO

Then run the following:

update-rc.d jira defaults

0 votes

This usually happens when a service starts before another, in this case, your JIRA is starting before the PostgreSQL. You need to create a "delay" for the JIRA service to fix this.

If you are using Linux:

You need to set the order of the services by going to /etc/init.d

In Windows:

You can set the dependency of the JIRA service, setting it to wait for the Postgres Service.

Hope that helps. :)

Thank you for your suggestion. I actually changed when JIRA needs to be started in rc directories but unfortunately 2 times out of 5 boots, JIRA is not coming up correctly.

This is the error I'm having in the catalina log:

SEVERE: Error listenerStart

I solved the problem by adding the LSB section in the startup script as follows (adding the following lines in the /etc/init.d/jira file):

### BEGIN INIT INFO

# Provides: jira

# Required-Start: $remote_fs $syslog $named $network $time

# Required-Stop: $remote_fs $syslog $named $network

# Should-Start: postgresql

# Should-Stop: postgresql

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: Atlassian JIRA

### END INIT INFO

Then run the following:

update-rc.d jira defaults

I use MySQL, tried:

### BEGIN INIT INFO

# Provides: jira

# Required-Start: $remote_fs $syslog $named $network $time

# Required-Stop: $remote_fs $syslog $named $network

# Should-Start: mysql

# Should-Stop: mysql

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: Atlassian JIRA

### END INIT INFO

But it didn't help.

Then simply added sleep 30 like this:

# JIRA Linux service controller script

cd "/opt/atlassian/jira/bin"

case "$1" in

start)

sleep 30

./start-jira.sh

;;

stop)

./stop-jira.sh

;;

*)

echo "Usage: $0 {start|stop}"

exit 1

;;

esac

Now it works :)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,139 views 13 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot