Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0vUH-0004dO-Ib for pgsql-general@arkaria.postgresql.org; Tue, 27 Mar 2018 20:46:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f0vUF-0004Ls-IC for pgsql-general@arkaria.postgresql.org; Tue, 27 Mar 2018 20:46:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0vUF-0004Li-3i for pgsql-general@lists.postgresql.org; Tue, 27 Mar 2018 20:46:31 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f0vUC-0008GP-EQ for pgsql-general@postgresql.org; Tue, 27 Mar 2018 20:46:29 +0000 Received: by mail-pg0-x241.google.com with SMTP id t10so87512pgv.8 for ; Tue, 27 Mar 2018 13:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=o+W2u54AlDSbJgadkBa8fOa4Sl6GhgU1VcAXuHO0pvM=; b=rWdpcMOf9Y/btrkIBdRbXB+XEOlDJaT9ksN1HsV4/kSIw4SIklfDpDR1SEjgbC5srf xR1RfLpKljx/3uo4vD7P/7SGWl0AlS69oIzdOxh6Lni8cnvsz00TvGbHpursVfXkFacc qovpaSIDwXJ+RR/rVjs35EsSYfpo4IMeQj1j7GHrd4rZX3wUZku922RiMyR+DODMIrqY w5CiUKKJduOsZp55yVyh2RBsx7foVHwLkJTX+T37rA3TVR2d6ZBEw4ib73SRIVMlDXfe 6Vyq6QhHzhKwvvP+AbHf4TiEcHpkdmvsaMOON3s5DoZPlzc1hAauOXI0ANSQYiIxsKiN focw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=o+W2u54AlDSbJgadkBa8fOa4Sl6GhgU1VcAXuHO0pvM=; b=DBN9v04mFopI0upL+BFOlZBgOGuhpZXpqhETUO6zfaxvG19QiU2MxFZSBVGa3uNZsP kX6fohUsCf8kjk4b4lhHjSkLpWaacAmEUlFoV6zPbvm+QDDBHUh3/oN0zFgmpx3F5rUt fH+zaGGKs+YXcuQfvNBV89jeHXZhTloMp53ByADyP0062JTglwk38qyp9tDhWRvOQBtH 4zx3urBh8Y0jgEA1JX/2lzfIRgFHJD54RQZ7XY8++UJLGORfxsodwKqeZ9/AsswX8xp/ BxJhq4M3AejtL6f28eljJI8Z9rwzdi62K6gEiP5pHuev7DnApmmzkgMENPmnc5/9L3u8 Mo0Q== X-Gm-Message-State: AElRT7GrF9xxLCuhXMwmiKB3DsrTMUMOZhbO/VBV3PIV7OHjKxv08Y3f DpWTcXrLYPRdI6ccFEaMjfWyvtu1 X-Google-Smtp-Source: AIpwx48YVB1MMC0G2M6HviAmALyj3XNb+/eevpQq2Uatsh1y/paRHJoFTPvf0zoHTKy1ovq0a+LI+w== X-Received: by 10.101.96.134 with SMTP id t6mr559494pgu.58.1522183586356; Tue, 27 Mar 2018 13:46:26 -0700 (PDT) Received: from [10.0.2.15] (207.sub-174-208-12.myvzw.com. [174.208.12.207]) by smtp.gmail.com with ESMTPSA id 67sm4337718pfd.134.2018.03.27.13.46.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 13:46:26 -0700 (PDT) Subject: Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade To: Adrian Klaver , pgsql-general@postgresql.org References: <5b3cabbb-e901-ef61-4363-ee77517e07dc@gmail.com> From: Ken Beck Message-ID: <6f43a166-39ef-b821-00b9-63e14723e74e@gmail.com> Date: Tue, 27 Mar 2018 14:46:24 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I am working on two systems, one running in Oracle VirtualBox on my laptop, the other in a DigitalOcean droplet. I know on one of them I tried to remove the postgres-9.6, and it must have been my laptop, here is the output from pg_lsclusters: Ver Cluster Port Status Owner    Data directory               Log file 9.3 main    5432 down   postgres /var/lib/postgresql/9.3/main /var/log/postgresql/postgresql-9.3-main.log Is it possible my effort to remove 9.6 was not complete or otherwise screwed things up? (I dont remember the commands I used to do that, sorry) Ken Beck Liberty, Utah, USA On 03/27/2018 12:17 PM, Adrian Klaver wrote: > On 03/27/2018 11:00 AM, Ken Beck wrote: >> I recently upgraded my OS from Ubuntu 14.04 LTS to 16.04 LTS and since, >> postgresql refuses to re-start. I am concerned that if I poke around too >> much, I may lose my old data. I have consulted various web postings here >> and in ubuntu forums, and have not found an obvious solution. But please >> excuse me, I am not a Linux expert, and I had a friend help me with >> setup issues several years ago. They are no longer available, and I am >> having trouble getting things to run. > > At a guess when you did the dist-upgrade(14.04 --> 16.04) you got the > default version of Postgres for 16.04(9.6) > > Try, at the command line: > > pg_lsclusters > > >> >> Again, this is after upgrading from ubuntu 14.04 LTS to 16.04 LTS. >> Consulting the book "PostgreSQL: Up and Running", I have looked at my >> .conf files in /etc/postgresql/9.3/main, things seem to be in order. >> >> Here are the un-commented lines of postgresql.conf: (I have NOT changed >> these, they are the settings that used to work in ubuntu 14.04) >> >> NOTE: my comments have // at beginning of the line, these lines are NOT >> in the .conf file >> >> data_directory = '/var/lib/postgresql/9.3/main'        # use data in >> another directory >> hba_file = '/etc/postgresql/9.3/main/pg_hba.conf'    # host-based >> authentication file >> ident_file = '/etc/postgresql/9.3/main/pg_ident.conf'    # ident >> configuration file >> >> external_pid_file = '/var/run/postgresql/9.3-main.pid'            # >> write an extra PID file >> >> listen_addresses = 'localhost'        # what IP address(es) to listen >> on; >> port = 5432                # (change requires restart) >> max_connections = 100            # (change requires restart) >> unix_socket_directories = '/var/run/postgresql'    # comma-separated >> list of directories >> ssl = false                # (change requires restart) >> ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'        # (change >> requires restart) >> ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'        # (change >> requires restart) >> >> // In the logging section, these are the only entries (is this why I >> cant see any log files when I try to start the server??) >> log_line_prefix = '%t '            # special values: >> log_timezone = 'Navajo' >> >> // In Client Connections section, these are the only items active: >> datestyle = 'iso, mdy' >> timezone = 'Navajo' >> lc_messages = 'en_US.UTF-8'            # locale for system error message >>                      # strings >> lc_monetary = 'en_US.UTF-8'            # locale for monetary formatting >> lc_numeric = 'en_US.UTF-8'            # locale for number formatting >> lc_time = 'en_US.UTF-8'                # locale for time formatting >> default_text_search_config = 'pg_catalog.english' >> >> The pg_ctl.conf file is basically empty >> >> The pg_hba.conf file has these active lines: >> local   all             postgres                                trust >> local   all             all                                     peer >> host    all             all             127.0.0.1/32            trust >> host    all             all             ::1/128                 md5 >> >> The start.conf file has one active line, 'auto' >> >> The pg_ident.conf file has no entries. >> >> When I try to start postgresql service using this line: >> service postgresql reload >> >> then check running services using this: >> systemctl list-units --type service --all >> I see the lines related to postgres as follows: >> postgresql.service                 loaded    active   exited  PostgreSQL >> RDBMS >> ● postgresql@9.3-main.service        loaded    failed   failed >> PostgreSQL Cluster 9.3-main >> >> And, looking for log files, I find none. >> >> If I try to start pgAdmin, I see two servers on localhost, when I tried >> to connect, I get an error first that says it can not open the log file, >> on clicking that I get an error can't open file /home/XXX/.pgpass, >> permission denied. Then I get a prompt for the password for postgres, >> and when I enter the known password for the user, I then get a big 'Guru >> Error' box with a message: >> could not connect to server: Connection refused Is the server running on >> host "127.0.0.1" and accepting TCP/IP connections on port 5432? >> Note that the postgresql.conf file does list 5432 as the port number. >> >> I hope someone has the patience to look this over and suggest >> remedies. -- >> >> Ken Beck >> Liberty, Utah, USA >> >> > >