Thread: PG on zeta 1.0

PG on zeta 1.0

From
"sam karush"
Date:
Does anyone have any experience starting and using PG on zeta, or BeOS?
 I'm having some trouble getting PG started after installation.
 
 Here is the error I recieve:
 
$ ./postmaster -D /boot/home/database
LOG:  could not translate host name "localhost", service "5432" to address: unknown name or service
WARNING:  could not create listen socket for "localhost"
FATAL:  could not create any TCP/IP sockets
 
Or this:
 
 

$  ./pg_ctl -D /boot/home/database -l logfile start
postmaster starting
 
Attempts to login with phpPgAdmin fail.
 
Any tips are appreciated.
sam

                


I am using the free version of SPAMfighter for private users.
It has removed 114 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!

Re: PG on zeta 1.0

From
kmh496
Date:
2006-05-20 (토), 06:47 -0400, sam karush 쓰시길:
> Does anyone have any experience starting and using PG on zeta, or
> BeOS?









>
> $  ./pg_ctl -D /boot/home/database -l logfile start
> postmaster starting
>
the output is going to the logfile.  Can you take off the "-l logfile"
part and send the list the error message for that portion.
> Attempts to login with phpPgAdmin fail.
so, it is running, but you just can't connect?
>












Re: PG on zeta 1.0

From
"sam karush"
Date:
> $  ./pg_ctl -D /boot/home/database -l logfile start
> postmaster starting

the output is going to the logfile.  Can you take off the "-l logfile"
part and send the list the error message for that portion.
> Attempts to login with phpPgAdmin fail.
so, it is running, but you just can't connect?
 
Here is what I get:
 
 
$   ./pg_ctl -D /boot/home/database  start
LOG:  could not translate host name "localhost", service "5432" to address: unknown name or service
WARNING:  could not create listen socket for "localhost"
FATAL:  could not create any TCP/IP sockets
 
No PG is not running, thus I can't connect.
 
Thanks!
sam




I am using the free version of SPAMfighter for private users.
It has removed 114 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!

Re: PG on zeta 1.0

From
kmh496
Date:
can you send the list the pg_hba.conf which is in the database server's
directory?  That contains the configuration.
2006-05-20 (토), 07:57 -0400, sam karush 쓰시길:
> > $  ./pg_ctl -D /boot/home/database -l logfile start
> > postmaster starting
> >
> the output is going to the logfile.  Can you take off the "-l logfile"
> part and send the list the error message for that portion.
> > Attempts to login with phpPgAdmin fail.
> so, it is running, but you just can't connect?
> >
>
> Here is what I get:
>
>
> $   ./pg_ctl -D /boot/home/database  start
> LOG:  could not translate host name "localhost", service "5432" to
> address: unknown name or service
> WARNING:  could not create listen socket for "localhost"
> FATAL:  could not create any TCP/IP sockets
>
> No PG is not running, thus I can't connect.
>
> Thanks!
> sam
>
>
>
>
>
> ______________________________________________________________________
> I am using the free version of SPAMfighter for private users.
> It has removed 114 spam emails to date.
> Paying users do not have this message in their emails.
> Try SPAMfighter for free now!
--
my site <a href="http://www.myowndictionary.com">myowndictionary</a> was
made to help students of many languages learn them faster.






Re: PG on zeta 1.0

From
"sam karush"
Date:
>can you send the list the pg_hba.conf which is in the database server's
>directory?  That contains the configuration.
Here it is:
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the PostgreSQL Administrator's Guide, chapter "Client
# Authentication" for a complete description.  A short synopsis
# follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access.  Records take one of these forms:
#
# local      DATABASE  USER  METHOD  [OPTION]
# host       DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]
# hostssl    DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]
# hostnossl  DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]
#
# (The uppercase items must be replaced by actual values.)
#
# The first field is the connection type: "local" is a Unix-domain socket,
# "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an
# SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.
#
# DATABASE can be "all", "sameuser", "samerole", a database name, or
# a comma-separated list thereof.
#
# USER can be "all", a user name, a group name prefixed with "+", or
# a comma-separated list thereof.  In both the DATABASE and USER fields
# you can also write a file name prefixed with "@" to include names from
# a separate file.
#
# CIDR-ADDRESS specifies the set of hosts the record matches.
# It is made up of an IP address and a CIDR mask that is an integer
# (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies
# the number of significant bits in the mask.  Alternatively, you can write
# an IP address and netmask in separate columns to specify the set of hosts.
#
# METHOD can be "trust", "reject", "md5", "crypt", "password",
# "krb5", "ident", or "pam".  Note that "password" sends passwords
# in clear text; "md5" is preferred since it sends encrypted passwords.
#
# OPTION is the ident map or the name of the PAM service, depending on METHOD.
#
# Database and user names containing spaces, commas, quotes and other special
# characters must be quoted. Quoting one of the keywords "all", "sameuser" or
# "samerole" makes the name lose its special character, and just match a
# database or username with that name.
#
# This file is read on server startup and when the postmaster receives
# a SIGHUP signal.  If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect.  You can use
# "pg_ctl reload" to do that.

# Put your actual configuration here
# IPv4 local connections:
# host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
# host    all         all         127.0.0.1/128         trust
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL listen
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
#

# CAUTION: Configuring the system for local "trust" authentication allows
# any local user to connect as any PostgreSQL user, including the database
# superuser. If you do not trust all your local users, use another
# authentication method.


# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
#host    all         all         ::1/128               trust


I am using the free version of SPAMfighter for private users.
It has removed 114 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!

Re: PG on zeta 1.0

From
Tom Lane
Date:
"sam karush" <sk418@rivah.net> writes:
> $ ./postmaster -D /boot/home/database
> LOG:  could not translate host name "localhost", service "5432" to address:=
>  unknown name or service
> WARNING:  could not create listen socket for "localhost"
> FATAL:  could not create any TCP/IP sockets

It looks to me like you don't have DNS correctly configured on that
machine.  Every machine should be able to resolve "localhost" as
"127.0.0.1" --- that's standard.  Look at name resolution settings,
/etc/resolv.conf, that sort of thing.

(BTW, what in the heck is "zeta"?  I don't think it's really BeOS;
we dropped support for that thing several PG versions back.)

            regards, tom lane

Re: PG on zeta 1.0

From
kmh496
Date:
2006-05-20 (토), 11:53 -0400, Tom Lane 쓰시길:
> "sam karush" <sk418@rivah.net> writes:
> > $ ./postmaster -D /boot/home/database
> > LOG:  could not translate host name "localhost", service "5432" to address:=
> >  unknown name or service
> > WARNING:  could not create listen socket for "localhost"
> > FATAL:  could not create any TCP/IP sockets
>
> It looks to me like you don't have DNS correctly configured on that
> machine.  Every machine should be able to resolve "localhost" as
> "127.0.0.1" --- that's standard.  Look at name resolution settings,
> /etc/resolv.conf, that sort of thing.
>
> (BTW, what in the heck is "zeta"?  I don't think it's really BeOS;
> we dropped support for that thing several PG versions back.)
wow!  i have the same problem.  Everything was fine, then i got this
email and everything went wacko.
coincidence?
i think it's the port for an unknown reason.  I don't have any port
number listed for 5543 but it gives me the same error when i try to use
it.  If I use port 55543 however there is no problem.

I will show below how i started first one postmaster on one cluster,
then tried to start another postmaster on another cluster using a
different port, and the resulting error (same as sam's), then stopped
that second postmaster (it still started, yes), and restarted without
the error message on a much higher port (55543):


=================================================
[postgres@www ~]$
[postgres@www ~]$ ps  -aux | grep pos
Warning: bad syntax, perhaps a bogus '-'?
See /usr/share/doc/procps-3.2.5/FAQ
root      7119  0.0  0.1   5588  1120 pts/4    S    01:04   0:00 su -
postgres
postgres  7120  0.0  0.1   4384  1452 pts/4    S    01:04   0:00 -bash
postgres  7321  0.0  0.0   4484   920 pts/4    R+   01:08   0:00 ps -aux
postgres  7322  0.0  0.0   3756   692 pts/4    R+   01:08   0:00 grep
pos
[postgres@www ~]$ pg_ctl -D pg8 start
postmaster starting
[postgres@www ~]$ LOG:  database system was shut down at 2006-05-21
01:08:00 KST
LOG:  checkpoint record is at 1/28F3484
LOG:  redo record is at 1/28F3484; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 7315086; next OID: 11726686
LOG:  database system is ready

[postgres@www ~]$ ps  -aux | grep pos
Warning: bad syntax, perhaps a bogus '-'?
See /usr/share/doc/procps-3.2.5/FAQ
root      7119  0.0  0.1   5588  1120 pts/4    S    01:04   0:00 su -
postgres
postgres  7120  0.0  0.1   4384  1452 pts/4    S    01:04   0:00 -bash
postgres  7329  0.4  0.2  16972  2644 pts/4    S    01:08
0:00 /usr/local/pg8/bin/postmaster -D pg8
postgres  7331  0.0  0.2  16972  2684 pts/4    S    01:08   0:00
postgres: writer process
postgres  7332  0.0  0.1   7824  1648 pts/4    S    01:08   0:00
postgres: stats buffer process
postgres  7333  0.0  0.1   7032  1764 pts/4    S    01:08   0:00
postgres: stats collector process
postgres  7344  0.0  0.3  17396  3248 pts/4    S    01:08   0:00
postgres: mod_log main 127.0.0.1(60566) idle
postgres  7345  0.0  0.3  17396  3248 pts/4    S    01:08   0:00
postgres: mod_log main 127.0.0.1(60567) idle
postgres  7346  0.0  0.3  17396  3248 pts/4    S    01:08   0:00
postgres: mod_log main 127.0.0.1(60568) idle
postgres  7347  0.0  0.3  17396  3248 pts/4    S    01:08   0:00
postgres: mod_log main 127.0.0.1(60569) idle
postgres  7348  0.0  0.3  17368  3252 pts/4    S    01:08   0:00
postgres: mod_log main 127.0.0.1(60570) idle
postgres  7350  0.0  0.3  17368  3756 pts/4    S    01:08   0:00
postgres: surfer main [local] idle
postgres  7352  0.0  0.3  17368  3692 pts/4    S    01:08   0:00
postgres: surfer main [local] idle
postgres  7356  0.0  0.3  17368  3692 pts/4    S    01:08   0:00
postgres: surfer main [local] idle
postgres  7357  0.0  0.3  17368  3692 pts/4    S    01:08   0:00
postgres: surfer main [local] idle
postgres  7358  0.0  0.3  17368  3692 pts/4    S    01:08   0:00
postgres: surfer main [local] idle
postgres  7372  0.0  0.0   4484   916 pts/4    R+   01:09   0:00 ps -aux
postgres  7373  0.0  0.0   3756   684 pts/4    R+   01:09   0:00 grep
pos
[postgres@www ~]$   pg_ctl -D /bup/pgsql/mod -o "-p5543
-h/bup/pgsql/mod" start
postmaster starting
[postgres@www ~]$ LOG:  could not translate host name "/bup/pgsql/mod",
service "5543" to address: Name or service not known
WARNING:  could not create listen socket for "/bup/pgsql/mod"
LOG:  database system was shut down at 2006-05-21 01:08:21 KST
LOG:  checkpoint record is at 0/A251F0
LOG:  redo record is at 0/A251F0; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 492; next OID: 17228
LOG:  database system is ready[postgres@www ~]$ pg_ctl -D mod -p5543
start
pg_ctl: Another postmaster may be running. Trying to start postmaster
anyway.
sh: 5543: command not found
pg_ctl: cannot start postmaster
Examine the log output
[postgres@www ~]$
[postgres@www ~]$
[postgres@www ~]$ pg_ctl -D mod -p55543 start
pg_ctl: Another postmaster may be running. Trying to start postmaster
anyway.
sh: 55543: command not found
pg_ctl: cannot start postmaster
Examine the log output
[postgres@www ~]$ pg_ctl -D mod -o "-p55543" start
pg_ctl: Another postmaster may be running. Trying to start postmaster
anyway.
FATAL:  lock file "/bup/pgsql/mod/postmaster.pid" already exists
HINT:  Is another postmaster (PID 7381) running in data directory
"/bup/pgsql/mod"?
pg_ctl: cannot start postmaster
Examine the log output
[postgres@www ~]$ ls mod/
base  global  pg_clog  pg_hba.conf  pg_ident.conf  pg_subtrans
pg_tblspc  PG_VERSION  pg_xlog  postgresql.conf  postmaster.opts
postmaster.pid
[postgres@www ~]$ cat mod/postmaster.pid
7381
/bup/pgsql/mod
  5543001   4096012
[postgres@www ~]$ ps -aux | grep 7381
Warning: bad syntax, perhaps a bogus '-'?
See /usr/share/doc/procps-3.2.5/FAQ
postgres  7381  0.0  0.2  18168  2752 pts/4    S    01:09
0:00 /usr/local/pg8/bin/postmaster -D /bup/pgsql/mod -p5543
-h/bup/pgsql/mod
[postgres@www ~]$ pg_ctl -D mod -p5543 stop
LOG:  received smart shutdown request
LOG:  shutting down
waiting for postmaster to shut down....LOG:  database system is shut
down
done
postmaster stopped
[postgres@www ~]$ pg_ctl -D mod -o "-p55543" start
postmaster starting
[postgres@www ~]$ LOG:  database system was shut down at 2006-05-21
01:13:40 KST
LOG:  checkpoint record is at 0/A2522C
LOG:  redo record is at 0/A2522C; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 492; next OID: 17228
LOG:  database system is ready










Re: PG on zeta 1.0

From
Tom Lane
Date:
kmh496 <kmh496@kornet.net> writes:
> 2006-05-20 (��), 11:53 -0400, Tom Lane ���ñ�:
>> It looks to me like you don't have DNS correctly configured on that
>> machine.  Every machine should be able to resolve "localhost" as
>> "127.0.0.1" --- that's standard.  Look at name resolution settings,
>> /etc/resolv.conf, that sort of thing.

> i think it's the port for an unknown reason.  I don't have any port
> number listed for 5543 but it gives me the same error when i try to use
> it.  If I use port 55543 however there is no problem.

Really?  That's very interesting.  Have you tried adding 5432 to
/etc/services and then referencing the port number by the name you
give it there?  I've never heard of a resolver rejecting numerical
specifications for low-numbered ports, but there's a first time for
everything ...

            regards, tom lane

Re: PG on zeta 1.0

From
kmh496
Date:
2006-05-20 (토), 12:39 -0400, Tom Lane 쓰시길:
> kmh496 <kmh496@kornet.net> writes:
> > 2006-05-20 (), 11:53 -0400, Tom Lane ñ:
> >> It looks to me like you don't have DNS correctly configured on that
> >> machine.  Every machine should be able to resolve "localhost" as
> >> "127.0.0.1" --- that's standard.  Look at name resolution settings,
> >> /etc/resolv.conf, that sort of thing.
>
> > i think it's the port for an unknown reason.  I don't have any port
> > number listed for 5543 but it gives me the same error when i try to use
> > it.  If I use port 55543 however there is no problem.
>
> Really?  That's very interesting.  Have you tried adding 5432 to
> /etc/services and then referencing the port number by the name you
> give it there?  I've never heard of a resolver rejecting numerical
> specifications for low-numbered ports, but there's a first time for
> everything ...
>
mr. lane, you are correct.  as it turns out it is the combination of
"-h/mnt/bu/mod -p5543".... actually, it's just the -h part.... somehow i
thought it would take a directory for the hostname.

the problem becomes that it's started and running but you can't connect
to it through the socket (locally), so it's confusing what's going on.

[postgres@www ~]$ cat /etc/services | grep post
pop2            109/tcp         pop-2   postoffice      # POP version 2
postgres        5432/tcp                        # POSTGRES
postgres        5432/udp                        # POSTGRES
[postgres@www ~]$
[postgres@www ~]$ pg_ctl -D pg8 -o "-h/mnt/bu/pg8" start
postmaster starting
[postgres@www ~]$ LOG:  could not translate host name "/mnt/bu/pg8",
service "5432" to address: Name or service not known
WARNING:  could not create listen socket for "/mnt/bu/pg8"
LOG:  database system was shut down at 2006-05-21 01:57:47 KST
LOG:  checkpoint record is at 1/290936C
LOG:  redo record is at 1/290936C; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 7315307; next OID: 11726712
LOG:  database system is ready
[postgres@www ~]$

p.s.  i hope the problem with the encoding (see other email ) was
connecting through the wrong port to the  mod database in another
cluster.






Re: PG on zeta 1.0

From
"sam karush"
Date:
>It looks to me like you don't have DNS correctly configured on that
>machine.  Every machine should be able to resolve "localhost" as
>"127.0.0.1" --- that's standard.  Look at name resolution settings,
>/etc/resolv.conf, that sort of thing.

>(BTW, what in the heck is "zeta"?  I don't think it's really BeOS;
>we dropped support for that thing several PG versions back.)
 
  Thanks for the advice, all. I'll keep you posted.
 
  'Zeta' is just a newer version on BeOS from Yellowtab.com   There is a download of PG on their site, and that is what I'm working with.

Re: PG on zeta 1.0

From
"sam karush"
Date:
> > $  ./pg_ctl -D /boot/home/database -l logfile start
> > postmaster starting
> > 
> the output is going to the logfile.  Can you take off the "-l logfile"
> part and send the list the error message for that portion.
> > Attempts to login with phpPgAdmin fail.
> so, it is running, but you just can't connect?
> > 
 
 
 Well, I have managed to get PG running. I had to copy the file boot/zeta/etc/hosts-sample,  save as 'hosts',  and add the line:
 
127.0.0.1  localhost
 
 Now PG starts reliably. I still can't connect with phpPgAdmin, but a quick trip through the archives of that group shows that to be a very common problem, with no concrete solution.
 

Re: PG on zeta 1.0

From
Mark Campbell
Date:
Hi

Would you not have to start the postmaster with the "-i" switch to allow TCP/IP connections to the DB?

Regards
Mark Campbell


Confidentiality Notice: http://ucs.co.za/conf.html


sam karush wrote:
> > $  ./pg_ctl -D /boot/home/database -l logfile start
> > postmaster starting
> > 
> the output is going to the logfile.  Can you take off the "-l logfile"
> part and send the list the error message for that portion.
> > Attempts to login with phpPgAdmin fail.
> so, it is running, but you just can't connect?
> > 
 
 
 Well, I have managed to get PG running. I had to copy the file boot/zeta/etc/hosts-sample,  save as 'hosts',  and add the line:
 
127.0.0.1  localhost
 
 Now PG starts reliably. I still can't connect with phpPgAdmin, but a quick trip through the archives of that group shows that to be a very common problem, with no concrete solution.
 

Re: PG on zeta 1.0

From
"sam karush"
Date:
>Would you not have to start the postmaster with the "-i" switch to allow TCP/IP connections to the DB?
Being a novice, first timer, i'm not sure what the "-i" switch is, or what the command looks like. Please post.  Thanks!
 

Re: PG on zeta 1.0

From
Mark Campbell
Date:
On my Sco-Openserver Unix machine, I need to start the postmaster like this

nohup pg_ctl -o -i start &

Also keep in mind that I have my environment variables setup eg.

PGDATA=/usr/local/pgsql/data
PGDATABASE=thenameofthedb
PGHOST=thenameofthemachine
PGUSER=postgres

Hope that helps


Mark Campbell


Confidentiality Notice: http://ucs.co.za/conf.html


sam karush wrote:
>Would you not have to start the postmaster with the "-i" switch to allow TCP/IP connections to the DB?
Being a novice, first timer, i'm not sure what the "-i" switch is, or what the command looks like. Please post.  Thanks!
 

Re: PG on zeta 1.0

From
"sam karush"
Date:
>On my Sco-Openserver Unix machine, I need to start the postmaster like this

>nohup pg_ctl -o -i start &
 
 
Heres what I get:
 
/bin/nohup:   appending output to 'nohup. out'
 
and in nohup out:
 
postmaster starting
postmaster cannot access the server configuration file "/boot/home/webserver/databases/postgresql.conf" No such file or directory.
 
My database folder is in boot/home. Should this be moved?

Re: PG on zeta 1.0

From
Mark Campbell
Date:
The DB can be anywhere

Export the PG variables or run the pg_ctl as follows

nohup pg_ctl -o -i -D /wherever/your/data/dir/is start &

My postgresql.conf is located in /usr/local/pgsql/data, so my command would be

nohup pg_ctl -o -i -D /usr/local/pgsql/data start &


Mark Campbell

Confidentiality Notice: http://ucs.co.za/conf.html


sam karush wrote:
>On my Sco-Openserver Unix machine, I need to start the postmaster like this

>nohup pg_ctl -o -i start &
 
 
Heres what I get:
 
/bin/nohup:   appending output to 'nohup. out'
 
and in nohup out:
 
postmaster starting
postmaster cannot access the server configuration file "/boot/home/webserver/databases/postgresql.conf" No such file or directory.
 
My database folder is in boot/home. Should this be moved?

Re: PG on zeta 1.0

From
"sam karush"
Date:
>Export the PG variables or run the pg_ctl as follows

>nohup pg_ctl -o -i -D /wherever/your/data/dir/is start &
 
 
 
>>dont give up on PGADMIN.
>>start a new thread for it. 
>>nothing to lose, right!
 
 
 
Well, I can connect with Pg with this command, but it has no effect on PGADMIN. Interesting exercise, though.
 I'll keep trying. Much thanks. Sam