You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Laurence Cohen <lc...@novetta.com> on 2015/07/14 21:32:20 UTC

Java stack trace, unable to connect to the database

Hello fellow users,

 

We are suddenly having a problem with our Tomcat WebApp connecting to the
database.  Unfortunately I can't give you the whole thing because the error
is on a network that is restricted, and I can't take anything off of it
without writing it down and retyping it.  I figured I would give you what
information I can, and see if anyone has any ideas.

 

The first error before the stack trace is "Error preloading the connection
pool".
 
The last error is "FATAL Database is starting up".
 
Unfortunately we do not have access to the database server, but I can tell
you it's Postgresql.  We are running Tomcat 7.054.  I'm not sure of the
Postgresql version because it is not under our control.  The database admins
say they see us connect for a couple of seconds and then we disconnect.
This is on both of the webapps that we are running.
 
Thanks for any help,
 
Larry Cohen

Re: Java stack trace, unable to connect to the database

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Philip,

On 7/14/15 3:00 PM, Philip Wigg wrote:
>> The last error is "FATAL Database is starting up".
> 
> A quick Google search for "FATAL Database is starting up" seems to 
> suggest that is an error message coming from PostgreSQL and not
> from Tomcat itself.
> 
> Hope that helps.

If so, then the error is pretty clear: you can't connect to Postgres
because it's still initializing. Perhaps the tablespace has been
damaged and it's trying to recover or something like that.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVpXFkAAoJEBzwKT+lPKRYRugQALbZeeoQegCZ/vKBbrRjbiSS
U/xeb7OHJEJj8HV/M9FLHq4laBCYzaWI35Rtbn7R6T3pFB1xCXRC5Ig7x1SBWeCR
pP4jGdO8xblVIvpW8I8hy94meVFWgKBHQXWtXVeSeDzSgTepBZUgIa0dmPPaiD4Q
eCoNnq9g0FNyD4dLfg9W4cPnbXvTM4fco3aZhnI/MucU2HQh2jlXePm/MX/PlktV
KQaFQMOQtGALKGn4eSV2Fow+qkKfVbDO9CleZ1ZehCCKidvtaYykDFBkFjWliw1z
QNyADpk9TwCyhIZ3PkRVIQTlCfUYPLgUmSZ7x1eAMiLZWBO5ub2f9AtUEhMUFKFe
Iox48Q7aoB9hSI8WhvMarhDNKAtCxNCTDOJo84TgzUM2dXrmc4asfjxJXP4XvRnQ
WyfjPMjEOVxd+iPm9uDt1LKkfoGC+XUWjIn5cptiix1E1Nb1OkrcmHWOXoF9ms6I
eJUPjtw+7aUw3LtX7Ih3Sy3gr20jywYhaA5YEB6B5w1W1cNDSRGJrx55vpZXL4FY
iOuAtDvRkMTqv7hjDV1ULkE2KnT40RNutu0j4MB/xzNKIrttSDDIZ4ZqZl3jEauO
09Y5CfWt24gwEFhsTBsas8B5pWZ/kkLKVmT9yWKu6G5WMRKrtdGTI2ovUc/ydy2j
J1/1IpG2Asf3fyYaz7kC
=kkHb
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Java stack trace, unable to connect to the database

Posted by Philip Wigg <ph...@philipwigg.co.uk>.
> The last error is "FATAL Database is starting up".

A quick Google search for "FATAL Database is starting up" seems to
suggest that is an error message coming from PostgreSQL and not from
Tomcat itself.

Hope that helps.

Phil.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Java stack trace, unable to connect to the database

Posted by Phil Steitz <ph...@gmail.com>.
On 7/14/15 1:11 PM, Christopher Schultz wrote:
> Laurence,
>
> On 7/14/15 2:32 PM, Laurence Cohen wrote:
> > We are suddenly having a problem with our Tomcat WebApp connecting
> > to the database.  Unfortunately I can't give you the whole thing
> > because the error is on a network that is restricted, and I can't
> > take anything off of it without writing it down and retyping it.  I
> > figured I would give you what information I can, and see if anyone
> > has any ideas.
>
> > The first error before the stack trace is "Error preloading the
> > connection pool".
>
> Hmm. I don't see the string "preloading" anywhere in Tomcat 7. Can you
> ask the engineers if they can find that string in their own code?

DBCP will throw an SQLException with that error message if an
exception occurs when it is trying to preload the pool.

Phil

>
> > The last error is "FATAL Database is starting up".
>
> That's definitely not a Tomcat error message.
>
> > Unfortunately we do not have access to the database server, but I
> > can tell you it's Postgresql.  We are running Tomcat 7.054.  I'm
> > not sure of the Postgresql version because it is not under our
> > control.  The database admins say they see us connect for a couple
> > of seconds and then we disconnect. This is on both of the webapps
> > that we are running.
>
> Unfortunately, I think just about anything could be "the problem". I
> might start by checking to see if the configuration for the connection
> pool might try to make more connections than Postgres is willing to
> allocate to the user (e.g. you are only allowed to open 10 connections
> but you are trying to open 15). In that case, the connection might
> fail and the pool (which is trying to fill itself) might report a
> failure to initialize.
>
> This may or may not have anything to do with Tomcat; it depends upon
> the pool you are using, how you are initializing it, etc.
>
> Try to get some more information and we might be able to help a little
> more.
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Java stack trace, unable to connect to the database

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Laurence,

On 7/14/15 2:32 PM, Laurence Cohen wrote:
> We are suddenly having a problem with our Tomcat WebApp connecting
> to the database.  Unfortunately I can't give you the whole thing
> because the error is on a network that is restricted, and I can't
> take anything off of it without writing it down and retyping it.  I
> figured I would give you what information I can, and see if anyone
> has any ideas.
> 
> The first error before the stack trace is "Error preloading the
> connection pool".

Hmm. I don't see the string "preloading" anywhere in Tomcat 7. Can you
ask the engineers if they can find that string in their own code?

> The last error is "FATAL Database is starting up".

That's definitely not a Tomcat error message.

> Unfortunately we do not have access to the database server, but I
> can tell you it's Postgresql.  We are running Tomcat 7.054.  I'm
> not sure of the Postgresql version because it is not under our
> control.  The database admins say they see us connect for a couple
> of seconds and then we disconnect. This is on both of the webapps
> that we are running.

Unfortunately, I think just about anything could be "the problem". I
might start by checking to see if the configuration for the connection
pool might try to make more connections than Postgres is willing to
allocate to the user (e.g. you are only allowed to open 10 connections
but you are trying to open 15). In that case, the connection might
fail and the pool (which is trying to fill itself) might report a
failure to initialize.

This may or may not have anything to do with Tomcat; it depends upon
the pool you are using, how you are initializing it, etc.

Try to get some more information and we might be able to help a little
more.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVpWzfAAoJEBzwKT+lPKRYAl4P/i44HN27JghEoQngpEgO4CPN
G5c+m7ETtLUZgYpPb6qmeg+aZwdCcTAjGcmcunqyeBaCXWRTBh7ZU0OrnIvmg2KY
2mCFzhmV6i9gOviKEhw9dZLruWdPkUt4lN1cZUTIOHT6zFkZFNVXF2QtdOZ50sLy
7Wa1TgByiMsdRupGMX3l1DH4FUUxMRzaxcIzTLct2hrx5EUjIf/txq/t1FPHstI2
1fDIH58PnHLcm8jiQhBs7fGtfXR9ae+l9V+ip+NHk5hvG+GL83Ck4LivkuTosdFH
1D1lba0xzZHrM74dpGHx9BcT2szcCDJ4FTbvUKm8BHGX/pQK3syqdKmXcRB1dYFr
yiXzIt9kASSpJ+xBekw+3ji1pjVk36jqCPeyegwdO4wNsmwaFvQBMKB+9h6AM0Bg
mNIpbF/puBuUExl3i+7xx8rLB8nKVkFHgFe4fHWEZbCljCfPKyvugi0DWQhiTWdD
RTj0wANGD+MT+LqkdONYFCOoXobNKRNg3XuYr3d9qOFiTLOi5LL+Akjz8O51dueR
J6C5EXZVquEfS+AMZIaTybwlq1POYwiuX4O4lIFTMKOQo/36sXi2aA3m4EHFuxBf
DaSVh79yzw+dFIibjMXISAUFkw+6UB0sUeYblIzZQ6FvWo/AYf2jYAplE1/qIcaa
y/VJUvpgb+6dro8O2QRE
=ynHk
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org