Announcement

Collapse
No announcement yet.

[solved] postgresql-8.4 broken?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [solved] postgresql-8.4 broken?

    I was running some routine system admin checks, and found all of a sudden I can't log in to phpPgAdmin. When I try and postgresql commands, I get the message
    Code:
    could not connect to database postgres: 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"?
    Well, it worked a couple of weeks ago. I am no longer getting any messages in dmesg about it starting up. I did a manual start, but I still can't get anything working. I don't have any actual databases installed (other than tutorial examples). There is a postgresql process running, but apparently not doing anything.

    I may have forgotten the password, but as I don't seem to be able to connect to the server, I can't change it. Any ideas or observations?
    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

    #2
    Re: postgresql-8.4 broken?

    I am running a fully updated Lucid and I just checked ... it is working well for me. I use pgAdmin3.

    It looks like an update didn't turn the daemon back on. You can use sysv-rc-conf to turn the daemon back on.

    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: postgresql-8.4 broken?

      In sysv-rc-conf, I have two entries that say postresq$ , and both are active for runlevels 2-5.

      Also the following:
      Code:
      greenman@Wolfenstein:~$ ps aux | grep postgre
      postgres 1516 0.0 0.0 102008 6664 ?    S  18:17  0:00 /usr/lib/postgresql/8.4/bin
      /postgres -D /var/lib/postgresql/8.4/main -c config_file=/etc/postgresql/8.4/main/postgresql.conf
      postgres 1552 0.0 0.0 102008 1780 ?    Ss  18:17  0:00 postgres: writer process                                                  
      postgres 1553 0.0 0.0 102008 1560 ?    Ss  18:17  0:00 postgres: wal writer process                                                
      postgres 1554 0.0 0.0 102144 1796 ?    Ss  18:17  0:00 postgres: autovacuum launcher process                                            
      postgres 1555 0.0 0.0 73548 1496 ?    Ss  18:17  0:00 postgres: stats collector process                                              
      greenman 13569 0.0 0.0  8700  948 pts/1  S+  18:32  0:00 grep postgre
      Is the first entry the demon? It sure is acting like the server is not there, and trying to
      connect to port 5432 with a browser (which I realize won't give useful results) gived an 'unable
      to connect' message, which says to me the server isn't running.


      Edit: my mistake, it should be port 5433, and it does appear to be running. So why can't psql
      find it? My passwords are probably messed up, but without psql making a connection, how do I
      fix them?

      Edit further: Results for the following command:

      Code:
      greenman@Wolfenstein:~$ sudo su postgres
      [sudo] password for greenman: 
      postgres@Wolfenstein:/home/greenman$ 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.5433"?
      There is no "/var/run/postgresql/.s.PGSQL.5433"
      We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

      Comment


        #4
        Re: postgresql-8.4 broken?

        The default port is 5432.

        Did you change that to 5433 in /etc/postgresql/8.4/main/postgresql.conf ??

        What does sudo netstat -lp | grep postgresql show? Mine show:

        jerry@vgnfw140e:~$ sudo netstat -lp | grep postgresql
        tcp 0 0 localhostostgresql *:* LISTEN 1043/postgres
        tcp6 0 0 localhostostgresql [::]:* LISTEN 1043/postgres
        unix 2 [ ACC ] STREAM LISTENING 5368 1043/postgres /var/run/postgresql/.s.PGSQL.5432
        jerry@vgnfw140e:~$
        You can edit that file, change "port = 5433" to "port = 5432", save it, and bounce the daemon.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Re: postgresql-8.4 broken?

          What does sudo netstat -lp | grep postgresql show? Mine show:
          I did look at postgresql.conf, changed the port from 5433 to 5432, and restarted the system.
          It's completely different, and as far as I know, I have not changed anything from the default installation:

          Code:
          greenman@Wolfenstein:~$ sudo netstat -lp | grep postgresql
          unix 2   [ ACC ]   STREAM   LISTENING   10329  3450/pgpool     /var/run/postgresql/.s.PGSQL.5433
          unix 2   [ ACC ]   STREAM   LISTENING   10343  3450/pgpool     /var/run/postgresql/.s.PGSQL.9898
          I'm beginning to think this is fubar'd, and needs a purge and reinstall. It's not making any sense.

          We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

          Comment


            #6
            Re: postgresql-8.4 broken?

            Yup, it looks corrupted to me.

            Strange. I've been using PostgreSQL for nearly 10 years and I've never seen a mess like that.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Re: [solved] postgresql-8.4 broken?

              Yep, the installation must have been corrupted. A purge and reinstall allowed me to get into psql, and fix the passwords.
              phppgadmin works now, too. Man I hope this doesn't become a regular thing...
              We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

              Comment


                #8
                Re: [solved] postgresql-8.4 broken?

                I doubt that it will. Must be something specific to your installation at that moment... glitch, electrical daemon, Moon in the wrong phase ...

                I've installed PostgreSQL for years using RPMs, deb's, tar's and binaries. I've never had the problem, or any other problem. PostgreSQL has been lightening fast and rock sold stable for me. At work I used it as a test back end for client-server apps written against Oracle. PostgreSQL was always faster than Oracle and a LOT easier to tune.

                But, alas, you can't convince the pointy-haired boss types that something that good was free and so was the excellent support (not that I needed anything beyond the excellent documentation that always comes with PostgreSQL).
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment

                Working...
                X