LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-17-2009, 06:31 AM   #1
zulkifal.mushtaq
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
Linux webserver & PostgreSQL


Hi,

I have a scenario for linux webserver having PostgreSQL database and hosting one website on https://192.168.1.75.

The website is a type of employee time database management system. The credentials for authorized access are stored in PostgreSQL database.

The website is running and accepting requests on the login page only but the time I try to submit login information, it says fatal error.

I used ISQL for PostgreSQL query analyzer and couple of other query analyzers as well for PostgreSQL database, but the message that returns while connecting on default port i.e. 5432 is as follows:

Message:
could not connect to server:_Connection refused (0x0000274D/10061)
Is the server running on host "192.168.1.75" and accepting
TCP/IP connections on port 5432?.

The admin page for this website is showing the following error:

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

What I believe that the website part is running healthy as it is accepting connections and sending pages back to the requesters but the socks part which connects the website to PostgreSQL is turned off accidentally or somewhat.

Is there any way to know whether server is accepting socks connections on 5432 and in working state or in other words can we know that PostgreSQL service is running on it or not?

The kernel for this system is customized, locked and renamed DEBIANA LILO 2.6.8.1-tt.

I don't have the root password as well. But in the worst scenario, we can break it for temporarily.

Kindly support on this issue as I don't have much knowledge on linux commands as well as it's kernel.

Thank you very much,

Regards.

Last edited by zulkifal.mushtaq; 03-17-2009 at 06:32 AM.
 
Old 03-17-2009, 09:33 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,990

Rep: Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316
Quote:
Originally Posted by zulkifal.mushtaq View Post
Hi,

I have a scenario for linux webserver having PostgreSQL database and hosting one website on https://192.168.1.75.

The website is a type of employee time database management system. The credentials for authorized access are stored in PostgreSQL database.

The website is running and accepting requests on the login page only but the time I try to submit login information, it says fatal error.

I used ISQL for PostgreSQL query analyzer and couple of other query analyzers as well for PostgreSQL database, but the message that returns while connecting on default port i.e. 5432 is as follows:

Message:
could not connect to server:_Connection refused (0x0000274D/10061)
Is the server running on host "192.168.1.75" and accepting
TCP/IP connections on port 5432?.

The admin page for this website is showing the following error:

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

What I believe that the website part is running healthy as it is accepting connections and sending pages back to the requesters but the socks part which connects the website to PostgreSQL is turned off accidentally or somewhat.

Is there any way to know whether server is accepting socks connections on 5432 and in working state or in other words can we know that PostgreSQL service is running on it or not?

The kernel for this system is customized, locked and renamed DEBIANA LILO 2.6.8.1-tt.

I don't have the root password as well. But in the worst scenario, we can break it for temporarily.

Kindly support on this issue as I don't have much knowledge on linux commands as well as it's kernel.

Thank you very much,

Regards.
The only way you can test it is to fire up the postgres console on your web server from the command-line, and see if you can log in to the database server. Use the user ID/password, and database name as you have them in your connection script on the web server.

If you can't connect, the DBA is going to have to allow connections, in order for your program/server to connect. If it DOES connect from the command line, your web code is broken, and needs to be fixed.

Since you don't give any code examples, or tell us what version of postgres you're using, or what version/distro of Linux, it's hard to give more specific details, other than very basic troubleshooting.
 
Old 03-21-2009, 02:47 AM   #3
zulkifal.mushtaq
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Linux webserver & PostgreSQL

I have managed to log into the root and used the following command:

#/etc/init.d/postgresql restart

this command returns the following error message:
==========================================================
pg_ctl: cannot find /var/lib/postgres/data/postmaster.pid
Is postmaster running?
Starting PostgreSQL postmaster
Postmaster successfully started
==========================================================

The version which I am using for PostgreAQL is: PostgreSQL 7.3.4

I want to ask one thing more that like MS Access stores its database in a .mdb file and sql stores in a .mdf file, what is the extension of a postgresql database file? is it .pdd? and where is it located?

Please help...
 
Old 03-21-2009, 03:34 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,990

Rep: Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316Reputation: 4316
Quote:
Originally Posted by zulkifal.mushtaq View Post
I have managed to log into the root and used the following command:

#/etc/init.d/postgresql restart

this command returns the following error message:
==========================================================
pg_ctl: cannot find /var/lib/postgres/data/postmaster.pid
Is postmaster running?
Starting PostgreSQL postmaster
Postmaster successfully started
==========================================================

The version which I am using for PostgreAQL is: PostgreSQL 7.3.4

I want to ask one thing more that like MS Access stores its database in a .mdb file and sql stores in a .mdf file, what is the extension of a postgresql database file? is it .pdd? and where is it located?

Please help...
The restart message tells you why it wouldn't connect. The restart does two things: it shuts down the service, and then starts it again. Step 1 (the shutdown), failed, because either postgres wasn't started correctly, or wasn't running at all. Step 2 (the startup) completed.

Check your Postgres configuration, to see where you're saving the files. Check the Postgres documentation for information about the files.
 
Old 03-22-2009, 12:23 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by zulkifal.mushtaq View Post
The version which I am using for PostgreAQL is: PostgreSQL 7.3.4
Good grief ... that branch has been unsupported for a good
while, and you're 5 versions behind on that! 7.3.9 (the last
of the 7.3 series) was released on 31/01/2005 ...


Quote:
Originally Posted by zulkifal.mushtaq View Post
I want to ask one thing more that like MS Access stores its database in a .mdb file and sql stores in a .mdf file, what is the extension of a postgresql database file? is it .pdd? and where is it located?

Please help...
Postgresql is *sane*. It doesn't use just two files to
store its information. You can determine their location
by looking at your startup-script. They usually don't
have an extension, Postgres comes from a Unix background,
extensions mean diddly-squat.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Create A Local Debian/Ubuntu Mirror With apt-mirror LXer Syndicated Linux News 0 01-04-2007 05:33 PM
Become a mirror? 123 Paul Linux - General 9 12-06-2005 03:59 PM
mirror BRAHmS Linux - General 1 05-08-2004 07:31 PM
Low Harddisk space. Can I just transfer the entire Linux to a bigger harddisk? davidas Linux - Newbie 12 04-13-2004 02:03 AM
How to Mirror HD? sikandar Linux - Software 4 08-25-2003 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration