dbTalk Databases Forums  

What does this mean?

comp.databases.postgresql comp.databases.postgresql


Discuss What does this mean? in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mick
 
Posts: n/a

Default What does this mean? - 11-30-2010 , 09:40 PM






I know PostgreSQL is installed and running as part of a TimeTrex install
but when I try to access it:

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

I'm really looking to make a backup of the TimeTrac Database befor I
attempt an upgrade.

Suggestions?

Reply With Quote
  #2  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: What does this mean? - 12-01-2010 , 11:45 AM






On Tue, 30 Nov 2010 22:40:31 -0500, Mick wrote:

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

I'm really looking to make a backup of the TimeTrac Database befor I
attempt an upgrade.

Suggestions?
Start the freaking PostgreSQL server.



--
http://mgogala.byethost5.com

Reply With Quote
  #3  
Old   
Mick
 
Posts: n/a

Default Re: What does this mean? - 12-01-2010 , 09:24 PM



On 12/01/2010 12:45 PM, Mladen Gogala wrote:
Quote:
On Tue, 30 Nov 2010 22:40:31 -0500, Mick wrote:

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

I'm really looking to make a backup of the TimeTrac Database befor I
attempt an upgrade.

Suggestions?

Start the freaking PostgreSQL server.



I note you cut my first line before posting your rudeness.

If TimeTrex is accessing it surely the server is already running.

If someone without experience in the area addressed asks for help or
advice. Either respond with help, advice or STFU.

Reply With Quote
  #4  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: What does this mean? - 12-01-2010 , 10:23 PM



On Wed, 01 Dec 2010 22:24:07 -0500, Mick wrote:

Quote:
If TimeTrex is accessing it surely the server is already running.
Your error says that it isn't running. You can prove me wrong by
verifying that the postgres processes are running, probably by
ps -fu postgres and by verifying that the shared memory is properly
attached by the postgres processes:


[root@lpo-postgres-01 ~]# ps -fu postgres
UID PID PPID C STIME TTY TIME CMD
postgres 5272 1 0 Nov30 ? 00:00:00 /usr/pgsql-9.0/bin/
postmaster -p
postgres 5274 5272 0 Nov30 ? 00:00:00 postgres: logger
process
postgres 5276 5272 0 Nov30 ? 00:00:02 postgres: writer
process
postgres 5277 5272 0 Nov30 ? 00:00:00 postgres: wal writer
process
postgres 5278 5272 0 Nov30 ? 00:00:00 postgres: autovacuum
launcher pr
postgres 5279 5272 0 Nov30 ? 00:00:00 postgres: stats collector
proces
[root@lpo-postgres-01 ~]#

[root@lpo-postgres-01 ~]# ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch
status
0x7402cf14 786432 root 600 4
0
0x7402ceea 1474561 root 600 4
0
0x0052e2c1 2555906 postgres 600 3310174208
4
0x7402cee9 1441795 root 600 4
0

[root@lpo-postgres-01 ~]#


Note the column nattch which will tell you the number of attached
processes. You can also verify that the server port is active:

nc -z -w 3 -v lpo-postgres-01 5432
Connection to lpo-postgres-01 5432 port [tcp/postgres] succeeded!

Here's what it looks like when it doesn't succeed:

[mgogala@medo ~]$ nc -z -w 3 -v localhost 5432
nc: connect to localhost port 5432 (tcp) failed: Connection refused

Your error tells you that the client process cannot establish contact on
the port 5432. If your (freaking) server is started, then you have messed
up the config file and did not enter the listener address. That's
probably the most frequent error made by beginners but, fortunately for
this group, most of those know how to use Google. Google is an excellent
resource and when you enter the first line of the error message, you will
get the following URL as the first result.

http://www.revsys.com/writings/postgresql/errors.html


There is a quite good explanation there. The Google search engine is
available at www.google.com. Many browsers also have a default field
pointing to Google. Try using it, it's not very hard. There is also a
good explanation of the Google search engine here:

http://www.google.com/support/websea...&answer=134479

BTW, yes, I am having fun writing this.

--
http://mgogala.byethost5.com

Reply With Quote
  #5  
Old   
Mick
 
Posts: n/a

Default Re: What does this mean? - 12-01-2010 , 11:05 PM



Quote:
BTW, yes, I am having fun writing this.

I'm sure you are
Let me explain my situation briefly

I never installed of configured the PostgreSQL server or client. I
assume that was done by the TimeTrex install.

When I go to upgrade to a later TimeTrex version to correct a couple of
issues they say "First back up your database".

I did not intend to become a Postres expert or DB admin I simply wanted
to back up my Db which timetrex accesses fine. Unfortunately their tech
support tends to answer in One-liners which blame everybody else except
their own people for any error.

Meanwhile their Db contains some payroll and Tax information that I
can't afford to lose without a lot of grief and hard work so I came to
the PGSQL experts hoping somebody would take sympathy on a finance man
who wants to use the system not become a Guru on it and explain in
simple terms what I could do.

So enjoy yourself and lets hope for you that the next time you seek
financial or any other advice in a field you are NOT an expert in. The
people you come in contact with treat you with greater respect.

Reply With Quote
  #6  
Old   
Thomas Kellerer
 
Posts: n/a

Default Re: What does this mean? - 12-02-2010 , 01:41 AM



Mick, 01.12.2010 04:40:
Quote:
and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Is it accepting *domain socket* connections?

It seems the server is configured to only accept TCP/IP connection.

Try to specify a port when running psql, like

psql -p 5432 dbname username

You might also verify the environment variables for that user. If the PG... variables are defined (especially PGPORT and PGHOST), make sure they point to the correct hostname and database

http://www.postgresql.org/docs/curre...pq-envars.html


Regards
Thomas

Reply With Quote
  #7  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: What does this mean? - 12-02-2010 , 06:32 AM



On Thu, 02 Dec 2010 00:05:07 -0500, Mick wrote:

Quote:
I never installed of configured the PostgreSQL server or client. I
assume that was done by the TimeTrex install.
There is such a thing as putting in a minimum effort.

Quote:
When I go to upgrade to a later TimeTrex version to correct a couple of
issues they say "First back up your database".
Now, that takes exactly 10 minutes to learn.


Quote:
I did not intend to become a Postres expert or DB admin I simply wanted
to back up my Db which timetrex accesses fine. Unfortunately their tech
support tends to answer in One-liners which blame everybody else except
their own people for any error.
If you are responsible for the database, you are the DB admin, whether
you like it or not. If you don't have a dedicated DBA is irrelevant.
You're it, you are responsible for the database, you might as well learn
how to use it and configure it properly. Also, a consultant may be an
option.


Quote:
Meanwhile their Db contains some payroll and Tax information that I
can't afford to lose without a lot of grief and hard work so I came to
the PGSQL experts hoping somebody would take sympathy on a finance man
who wants to use the system not become a Guru on it and explain in
simple terms what I could do.
You have a problem. You are responsible for a database that contains
financial information and you don't know how to use it properly. You
should get acquainted with the area of your responsibility. That will
require putting in some minimal effort.


Quote:
So enjoy yourself and lets hope for you that the next time you seek
financial or any other advice in a field you are NOT an expert in. The
people you come in contact with treat you with greater respect.
I was the only one who answered your question, so drop the attitude. You,
if I understand you correctly, are asking for a ready made answers,
without investing even a minimal effort, like using Google first. Your
attitude is not exactly the right one. Second, your question was badly
formulated because it doesn't contain either version or platform. Third,
there is a novice mailing list on postgresql.org.





--
http://mgogala.byethost5.com

Reply With Quote
  #8  
Old   
Mick
 
Posts: n/a

Default Re: What does this mean? - 12-02-2010 , 11:21 AM



On 12/02/2010 07:32 AM, Mladen Gogala wrote:
Quote:
On Thu, 02 Dec 2010 00:05:07 -0500, Mick wrote:

I never installed of configured the PostgreSQL server or client. I
assume that was done by the TimeTrex install.

There is such a thing as putting in a minimum effort.


When I go to upgrade to a later TimeTrex version to correct a couple of
issues they say "First back up your database".

Now, that takes exactly 10 minutes to learn.



I did not intend to become a Postres expert or DB admin I simply wanted
to back up my Db which timetrex accesses fine. Unfortunately their tech
support tends to answer in One-liners which blame everybody else except
their own people for any error.

If you are responsible for the database, you are the DB admin, whether
you like it or not. If you don't have a dedicated DBA is irrelevant.
You're it, you are responsible for the database, you might as well learn
how to use it and configure it properly. Also, a consultant may be an
option.



Meanwhile their Db contains some payroll and Tax information that I
can't afford to lose without a lot of grief and hard work so I came to
the PGSQL experts hoping somebody would take sympathy on a finance man
who wants to use the system not become a Guru on it and explain in
simple terms what I could do.

You have a problem. You are responsible for a database that contains
financial information and you don't know how to use it properly. You
should get acquainted with the area of your responsibility. That will
require putting in some minimal effort.



So enjoy yourself and lets hope for you that the next time you seek
financial or any other advice in a field you are NOT an expert in. The
people you come in contact with treat you with greater respect.

I was the only one who answered your question, so drop the attitude. You,
if I understand you correctly, are asking for a ready made answers,
without investing even a minimal effort, like using Google first. Your
attitude is not exactly the right one. Second, your question was badly
formulated because it doesn't contain either version or platform. Third,
there is a novice mailing list on postgresql.org.





I am a finance man trying to use a tool. A carpenter sawing wood doesn't
expect to know how to design or rebuild a table saw!

I acknowledge that TimeTrex should provide better tools and
explanations/instructions however they don't and I dispair of getting
any meaningful support from them after weeks of trying. Yes I was hoping
someone would come up with some novice help suggestions but my workload
is sufficient that I don't intend at this time to give up sleep
completely to learn any technology.

Right now I'm simply looking to secure my data, hopefully so I can
import it to a better tool with better support.

So instead of constant criticism and telling me what MY job is, if you
are unwilling to help . . .

Reply With Quote
  #9  
Old   
Mick
 
Posts: n/a

Default Re: What does this mean? - 12-02-2010 , 11:33 AM



On 12/02/2010 02:41 AM, Thomas Kellerer wrote:
Quote:
Mick, 01.12.2010 04:40:
and accepting connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?

Is it accepting *domain socket* connections?

It seems the server is configured to only accept TCP/IP connection.

Try to specify a port when running psql, like

psql -p 5432 dbname username

You might also verify the environment variables for that user. If the
PG... variables are defined (especially PGPORT and PGHOST), make sure
they point to the correct hostname and database

http://www.postgresql.org/docs/curre...pq-envars.html


Regards
Thomas

Thanks,

I checked the timerex.php.ini file (One they said I should take extra
care to backup and the Databse sections has this:

[database]
database_name = timetrex
; type = postgres8
host = localhost:5433
password = f50ec5f9d
type = postgres8
user = timetrex

Looking in Synaptic Package Manager it seems to say that the postgresql
client is running but not the server. So I'm still puzzled as to how
TimeTrex is accessing the database.

Could I safely install & run the Postgresql Server app without
destroying my database?

I tried running the command:
psql -p 543 timetrex timetrex
and still got:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5433"?

How can I check if the Postgres install is in a standard location and
that TimeTrex have not done some wierd custom install?

Reply With Quote
  #10  
Old   
Jasen Betts
 
Posts: n/a

Default Re: What does this mean? - 12-02-2010 , 11:54 AM



On 2010-12-01, Mick <mickg01 (AT) verizon (DOT) net> wrote:
Quote:
I know PostgreSQL is installed and running as part of a TimeTrex install
but when I try to access it:

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

I'm really looking to make a backup of the TimeTrac Database befor I
attempt an upgrade.
It seems the database server isn't where psql expected it to be.
assuming TimeTrac (whatever that is) is functioning correctly I'd
be looking at its configuration for clues, or perhaps it has an
inbuilt database backup functionality?

on the other hand this might work better

sudo su postgres -- -c psql


--
⚂⚃ 100% natural

Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.