Thread: Permissions problem
I have developed a webapp using JSP and POJOs that accesses our production Postgre database. On the Windows machine I developed it on, everything works fine: it connects to the database and performs the queries specified by the user in the web pages.
When placed into production on our Linux boxes, it will not connect and I cannot figure out what the problem is. I presume it is with permissions. Other JSP webapps on our server successfully connect to Postgre, but using a legacy API I cannot get my head around.
Again my question is: Why does this webapp work when ran from my Windows machine, but not from the Linux?
thanks,
Jonathan
When placed into production on our Linux boxes, it will not connect and I cannot figure out what the problem is. I presume it is with permissions. Other JSP webapps on our server successfully connect to Postgre, but using a legacy API I cannot get my head around.
Again my question is: Why does this webapp work when ran from my Windows machine, but not from the Linux?
thanks,
Jonathan
Jonathan Mast wrote: > I have developed a webapp using JSP and POJOs that accesses > our production Postgre database. On the Windows machine I > developed it on, everything works fine: it connects to the > database and performs the queries specified by the user in > the web pages. > > When placed into production on our Linux boxes, it will not > connect and I cannot figure out what the problem is. I > presume it is with permissions. Other JSP webapps on our > server successfully connect to Postgre, but using a legacy > API I cannot get my head around. > > Again my question is: Why does this webapp work when ran from > my Windows machine, but not from the Linux? What error messages do you get? It's hard to guess what problem you are experiencing. Also, without knowing what software you use and which versions of it, it will be nigh impossible to help. Yours, Laurenz Albe
The software is:
Tomcat 5.5.17
Apache 1.3.33
Java 1.4.2
PostgreSQL 8.1.3
Let me clarify the situation:
Postgre, Apache/Tomcat, everything is on Linux boxes down at the server farm.
The webapp was developed on a Windows machine in the office.
When run locally (with Tomcat on the Windows box) the webapp connects correctly to the servers and accesses the pgsql database with no problems.
When deployed on the server, the webapp will not connect to pgsql.
Errors:
It will throw an SQLException, but I haven't found it too helpful, it basically says "Cannot connect to PostgreSQL" and thats it.
I think with the problem clearly described above maybe the list users can come up with some ideas, but I'll post the stack trace if not.
thanks again
On Jan 3, 2008 2:59 AM, Albe Laurenz < laurenz.albe@wien.gv.at> wrote:
What error messages do you get? It's hard to guess what problemJonathan Mast wrote:
> I have developed a webapp using JSP and POJOs that accesses
> our production Postgre database. On the Windows machine I
> developed it on, everything works fine: it connects to the
> database and performs the queries specified by the user in
> the web pages.
>
> When placed into production on our Linux boxes, it will not
> connect and I cannot figure out what the problem is. I
> presume it is with permissions. Other JSP webapps on our
> server successfully connect to Postgre, but using a legacy
> API I cannot get my head around.
>
> Again my question is: Why does this webapp work when ran from
> my Windows machine, but not from the Linux?
you are experiencing.
Also, without knowing what software you use and which versions of it,
it will be nigh impossible to help.
Yours,
Laurenz Albe
"Jonathan Mast" <jonathan.h.mast@gmail.com> writes: > When run locally (with Tomcat on the Windows box) the webapp connects > correctly to the servers and accesses the pgsql database with no problems. > When deployed on the server, the webapp will not connect to pgsql. > Errors: > It will throw an SQLException, but I haven't found it too helpful, it > basically says "Cannot connect to PostgreSQL" and thats it. That's pretty useless :-( ... a complaint to the webapp's author wouldn't be out of line. In the meantime, I'd bet on either a firewall blocking the connection or a missing/incorrect entry in the server's pg_hba.conf file for the remote connection. Try turning on log_connections in the server and watching its log file when you try the webapp. If you see nothing at all then it's probably a firewall problem. If you do get a log entry then it should tell you what's wrong. regards, tom lane