You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by S Arvind <ar...@gmail.com> on 2009/05/02 20:45:07 UTC

Database pooling prob

from this stack trace i can find that there is no problem in Tomcat or dbcp.
But when i try my postgre from outside application its working fine but when
i connect from local tomcat application it not working fine. I disable the
firewall and all ... but i keep on getting this stack ....

AbandonedObjectPool is used
(org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@d5eb7)
   LogAbandoned: true
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 300
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Connection refused. Check that the hostname and
port are correct and that the postmaster is accepting TCP/IP connections.)
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)


When i tried the netstat to check my vista ports , at that time i found one
wierd line...

TCP    [::1]:80               Michael:50522          ESTABLISHED
TCP    [::1]:50522            Michael:http           ESTABLISHED

As my tomcat is listening to 80, i dont know why i dont  get the ip address
in the netstat result for port 80 alone..
It is surely my tomcat request since only when i make the request its
showing...

I think the problem in ip only... please any one help.. postgres and tomcat
in same system and postgres is watchin to port 5432 only.

Arvind


*
"Many of lifes failure are people who did not realize how close they were to
success when they gave up."
-Thomas Edison*

RE: Database pooling prob

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: ados1984@gmail.com [mailto:ados1984@gmail.com]
> Subject: Re: Database pooling prob
> 
> I am trying to configure Tomcat Server on Eclipse and I am not 
> able to do it.

Don't hijack threads.  Start a completely new thread (don't just change the subject line) when you have a new topic to discuss.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Database pooling prob

Posted by "ados1984@gmail.com" <ad...@gmail.com>.
Hi,
I am trying to configure Tomcat Server on Eclipse and I am not able to do
it. My goal is to create a simple JSP page and deploy that on Tomcat Server
and access that page through Browser.

Guidance would be really appreciated.

Regards,
Ados.



On Sun, May 3, 2009 at 9:12 PM, Rusty Wright <ru...@gmail.com> wrote:

> What did you specify for the ip address that tomcat uses for connecting to
> the database?  If, for example, tomcat is using the host name of your
> machine, or its ip address that you'd use to connect to it from the outside,
> and psql is using localhost (127.0.0.1) which is a special ip address that
> always goes to the machine you're on, so that you don't have to know its ip
> address, that would be a difference in the configuration.  Or psql could be
> using a unix filesystem socket and not using tcp/ip.
>
> Postgres uses some config file with hba in its name to configure its
> network security; fiddle with that and make it wide open so that tomcat can
> connect, then go back and figure out how to tighten its security so that
> only localhost can connect.
>
>
> S Arvind wrote:
>
>> from this stack trace i can find that there is no problem in Tomcat or
>> dbcp.
>> But when i try my postgre from outside application its working fine but
>> when
>> i connect from local tomcat application it not working fine. I disable the
>> firewall and all ... but i keep on getting this stack ....
>>
>> AbandonedObjectPool is used
>> (org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@d5eb7)
>>   LogAbandoned: true
>>   RemoveAbandoned: true
>>   RemoveAbandonedTimeout: 300
>> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
>> PoolableConnectionFactory (Connection refused. Check that the hostname and
>> port are correct and that the postmaster is accepting TCP/IP connections.)
>>        at
>>
>> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
>>        at
>>
>> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
>>
>>
>> When i tried the netstat to check my vista ports , at that time i found
>> one
>> wierd line...
>>
>> TCP    [::1]:80               Michael:50522          ESTABLISHED
>> TCP    [::1]:50522            Michael:http           ESTABLISHED
>>
>> As my tomcat is listening to 80, i dont know why i dont  get the ip
>> address
>> in the netstat result for port 80 alone..
>> It is surely my tomcat request since only when i make the request its
>> showing...
>>
>> I think the problem in ip only... please any one help.. postgres and
>> tomcat
>> in same system and postgres is watchin to port 5432 only.
>>
>> Arvind
>>
>>
>> *
>> "Many of lifes failure are people who did not realize how close they were
>> to
>> success when they gave up."
>> -Thomas Edison*
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Database pooling prob

Posted by S Arvind <ar...@gmail.com>.
Thanks everone. The problem i found is completely different. Its  vista
administaratve rights problem. I corrected that and our rocking tomcat is
rocking.. Thanks every one.

Arvind S


*"Many of lifes failure are people who did not realize how close they were
to success when they gave up."
-Thomas Edison*


On Mon, May 4, 2009 at 8:42 AM, Rusty Wright <ru...@gmail.com> wrote:

> What did you specify for the ip address that tomcat uses for connecting to
> the database?  If, for example, tomcat is using the host name of your
> machine, or its ip address that you'd use to connect to it from the outside,
> and psql is using localhost (127.0.0.1) which is a special ip address that
> always goes to the machine you're on, so that you don't have to know its ip
> address, that would be a difference in the configuration.  Or psql could be
> using a unix filesystem socket and not using tcp/ip.
>
> Postgres uses some config file with hba in its name to configure its
> network security; fiddle with that and make it wide open so that tomcat can
> connect, then go back and figure out how to tighten its security so that
> only localhost can connect.
>
>
> S Arvind wrote:
>
>> from this stack trace i can find that there is no problem in Tomcat or
>> dbcp.
>> But when i try my postgre from outside application its working fine but
>> when
>> i connect from local tomcat application it not working fine. I disable the
>> firewall and all ... but i keep on getting this stack ....
>>
>> AbandonedObjectPool is used
>> (org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@d5eb7)
>>   LogAbandoned: true
>>   RemoveAbandoned: true
>>   RemoveAbandonedTimeout: 300
>> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
>> PoolableConnectionFactory (Connection refused. Check that the hostname and
>> port are correct and that the postmaster is accepting TCP/IP connections.)
>>        at
>>
>> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
>>        at
>>
>> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
>>
>>
>> When i tried the netstat to check my vista ports , at that time i found
>> one
>> wierd line...
>>
>> TCP    [::1]:80               Michael:50522          ESTABLISHED
>> TCP    [::1]:50522            Michael:http           ESTABLISHED
>>
>> As my tomcat is listening to 80, i dont know why i dont  get the ip
>> address
>> in the netstat result for port 80 alone..
>> It is surely my tomcat request since only when i make the request its
>> showing...
>>
>> I think the problem in ip only... please any one help.. postgres and
>> tomcat
>> in same system and postgres is watchin to port 5432 only.
>>
>> Arvind
>>
>>
>> *
>> "Many of lifes failure are people who did not realize how close they were
>> to
>> success when they gave up."
>> -Thomas Edison*
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Database pooling prob

Posted by Rusty Wright <ru...@gmail.com>.
What did you specify for the ip address that tomcat uses for connecting to the database?  If, for example, tomcat is using the host name of your machine, or its ip address that you'd use to connect to it from the outside, and psql is using localhost (127.0.0.1) which is a special ip address that always goes to the machine you're on, so that you don't have to know its ip address, that would be a difference in the configuration.  Or psql could be using a unix filesystem socket and not using tcp/ip.

Postgres uses some config file with hba in its name to configure its network security; fiddle with that and make it wide open so that tomcat can connect, then go back and figure out how to tighten its security so that only localhost can connect.


S Arvind wrote:
> from this stack trace i can find that there is no problem in Tomcat or dbcp.
> But when i try my postgre from outside application its working fine but when
> i connect from local tomcat application it not working fine. I disable the
> firewall and all ... but i keep on getting this stack ....
> 
> AbandonedObjectPool is used
> (org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@d5eb7)
>    LogAbandoned: true
>    RemoveAbandoned: true
>    RemoveAbandonedTimeout: 300
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory (Connection refused. Check that the hostname and
> port are correct and that the postmaster is accepting TCP/IP connections.)
>         at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
>         at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
> 
> 
> When i tried the netstat to check my vista ports , at that time i found one
> wierd line...
> 
> TCP    [::1]:80               Michael:50522          ESTABLISHED
> TCP    [::1]:50522            Michael:http           ESTABLISHED
> 
> As my tomcat is listening to 80, i dont know why i dont  get the ip address
> in the netstat result for port 80 alone..
> It is surely my tomcat request since only when i make the request its
> showing...
> 
> I think the problem in ip only... please any one help.. postgres and tomcat
> in same system and postgres is watchin to port 5432 only.
> 
> Arvind
> 
> 
> *
> "Many of lifes failure are people who did not realize how close they were to
> success when they gave up."
> -Thomas Edison*
> 

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


Re: Database pooling prob

Posted by André Warnier <aw...@ice-sa.com>.
Andre-John Mas wrote:
> The IP address isn't missing. What you are seeing is an IPv6 address, and
> more specifically the localhost IP address.
> 
> For information see:
> 
> http://en.wikipedia.org/wiki/IPv6
> 
> You can try doing 'ping6 ::1' and you will get a repsonse.
> 
 >>>> TCP    [::1]:80               Michael:50522          ESTABLISHED
 >>>> TCP    [::1]:50522            Michael:http           ESTABLISHED

The OP might have been talking about the "Michael:" part though.
That is the resolved DNS name of the destination, appearing when one 
does a netstat without the -n switch.
The same is true for the port "http" instead of "80".

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


Re: Database pooling prob

Posted by Andre-John Mas <aj...@sympatico.ca>.
The IP address isn't missing. What you are seeing is an IPv6 address,  
and
more specifically the localhost IP address.

For information see:

http://en.wikipedia.org/wiki/IPv6

You can try doing 'ping6 ::1' and you will get a repsonse.

André-John

On 2-May-2009, at 17:17, S Arvind wrote:

> Why ip is missing???
>
> -Arvind S
> *
>
>
>
>
> "Many of lifes failure are people who did not realize how close they  
> were to
> success when they gave up."
> -Thomas Edison*
>
>
> On Sun, May 3, 2009 at 2:42 AM, Filip Hanik - Dev Lists
> <de...@hanik.com>wrote:
>
>> if the client and the server are on the same machine, you would get  
>> two
>> lines in the netstat output
>>
>> TCP    [::1]:80               Michael:50522          ESTABLISHED
>> TCP    [::1]:50522            Michael:http           ESTABLISHED
>>
>> one line is for the server connection, and the other one is for the  
>> client
>> connection.
>>
>> Filip
>>
>>
>> S Arvind wrote:
>>
>>> from this stack trace i can find that there is no problem in  
>>> Tomcat or
>>> dbcp.
>>> But when i try my postgre from outside application its working  
>>> fine but
>>> when
>>> i connect from local tomcat application it not working fine. I  
>>> disable the
>>> firewall and all ... but i keep on getting this stack ....
>>>
>>> AbandonedObjectPool is used
>>> (org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@d5eb7)
>>>  LogAbandoned: true
>>>  RemoveAbandoned: true
>>>  RemoveAbandonedTimeout: 300
>>> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
>>> PoolableConnectionFactory (Connection refused. Check that the  
>>> hostname and
>>> port are correct and that the postmaster is accepting TCP/IP  
>>> connections.)
>>>       at
>>>
>>> org 
>>> .apache 
>>> .tomcat 
>>> .dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java: 
>>> 1225)
>>>       at
>>>
>>> org 
>>> .apache 
>>> .tomcat 
>>> .dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
>>>
>>>
>>> When i tried the netstat to check my vista ports , at that time i  
>>> found
>>> one
>>> wierd line...
>>>
>>> TCP    [::1]:80               Michael:50522          ESTABLISHED
>>> TCP    [::1]:50522            Michael:http           ESTABLISHED
>>>
>>> As my tomcat is listening to 80, i dont know why i dont  get the ip
>>> address
>>> in the netstat result for port 80 alone..
>>> It is surely my tomcat request since only when i make the request  
>>> its
>>> showing...
>>>
>>> I think the problem in ip only... please any one help.. postgres and
>>> tomcat
>>> in same system and postgres is watchin to port 5432 only.
>>>
>>> Arvind
>>>
>>>
>>> *
>>> "Many of lifes failure are people who did not realize how close  
>>> they were
>>> to
>>> success when they gave up."
>>> -Thomas Edison*
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: Database pooling prob

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: S Arvind [mailto: arvindwill@gmail.com]
> Subject: Re: Database pooling prob
> 
> Why ip is missing???

It's not.  [::1] is the IPv6 equivalent of IPv4 127.0.0.1.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Database pooling prob

Posted by André Warnier <aw...@ice-sa.com>.
S Arvind wrote:
> Why ip is missing???
> 
man netstat
or
netstat -h

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


Re: Database pooling prob

Posted by S Arvind <ar...@gmail.com>.
Why ip is missing???

-Arvind S
*




"Many of lifes failure are people who did not realize how close they were to
success when they gave up."
-Thomas Edison*


On Sun, May 3, 2009 at 2:42 AM, Filip Hanik - Dev Lists
<de...@hanik.com>wrote:

> if the client and the server are on the same machine, you would get two
> lines in the netstat output
>
> TCP    [::1]:80               Michael:50522          ESTABLISHED
> TCP    [::1]:50522            Michael:http           ESTABLISHED
>
> one line is for the server connection, and the other one is for the client
> connection.
>
> Filip
>
>
> S Arvind wrote:
>
>> from this stack trace i can find that there is no problem in Tomcat or
>> dbcp.
>> But when i try my postgre from outside application its working fine but
>> when
>> i connect from local tomcat application it not working fine. I disable the
>> firewall and all ... but i keep on getting this stack ....
>>
>> AbandonedObjectPool is used
>> (org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@d5eb7)
>>   LogAbandoned: true
>>   RemoveAbandoned: true
>>   RemoveAbandonedTimeout: 300
>> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
>> PoolableConnectionFactory (Connection refused. Check that the hostname and
>> port are correct and that the postmaster is accepting TCP/IP connections.)
>>        at
>>
>> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
>>        at
>>
>> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
>>
>>
>> When i tried the netstat to check my vista ports , at that time i found
>> one
>> wierd line...
>>
>> TCP    [::1]:80               Michael:50522          ESTABLISHED
>> TCP    [::1]:50522            Michael:http           ESTABLISHED
>>
>> As my tomcat is listening to 80, i dont know why i dont  get the ip
>> address
>> in the netstat result for port 80 alone..
>> It is surely my tomcat request since only when i make the request its
>> showing...
>>
>> I think the problem in ip only... please any one help.. postgres and
>> tomcat
>> in same system and postgres is watchin to port 5432 only.
>>
>> Arvind
>>
>>
>> *
>> "Many of lifes failure are people who did not realize how close they were
>> to
>> success when they gave up."
>> -Thomas Edison*
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Database pooling prob

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
if the client and the server are on the same machine, you would get two 
lines in the netstat output

TCP    [::1]:80               Michael:50522          ESTABLISHED
TCP    [::1]:50522            Michael:http           ESTABLISHED

one line is for the server connection, and the other one is for the 
client connection.

Filip


S Arvind wrote:
> from this stack trace i can find that there is no problem in Tomcat or dbcp.
> But when i try my postgre from outside application its working fine but when
> i connect from local tomcat application it not working fine. I disable the
> firewall and all ... but i keep on getting this stack ....
>
> AbandonedObjectPool is used
> (org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool@d5eb7)
>    LogAbandoned: true
>    RemoveAbandoned: true
>    RemoveAbandonedTimeout: 300
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory (Connection refused. Check that the hostname and
> port are correct and that the postmaster is accepting TCP/IP connections.)
>         at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
>         at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
>
>
> When i tried the netstat to check my vista ports , at that time i found one
> wierd line...
>
> TCP    [::1]:80               Michael:50522          ESTABLISHED
> TCP    [::1]:50522            Michael:http           ESTABLISHED
>
> As my tomcat is listening to 80, i dont know why i dont  get the ip address
> in the netstat result for port 80 alone..
> It is surely my tomcat request since only when i make the request its
> showing...
>
> I think the problem in ip only... please any one help.. postgres and tomcat
> in same system and postgres is watchin to port 5432 only.
>
> Arvind
>
>
> *
> "Many of lifes failure are people who did not realize how close they were to
> success when they gave up."
> -Thomas Edison*
>
>   


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