Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XfacU-0001Nd-K3 for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 20:28:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XfacT-00082G-5M for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 20:28:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XfacQ-000827-En for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 20:28:54 +0000 Received: from mail-qc0-x22b.google.com ([2607:f8b0:400d:c01::22b]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XfacH-000500-4m for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 20:28:53 +0000 Received: by mail-qc0-f171.google.com with SMTP id i17so2108008qcy.16 for ; Sat, 18 Oct 2014 13:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=qM+Jl9hZFyVrchpFkMMVI3CjkQJQSu8z4tmHZ0bbgqM=; b=H/Su8VsMcirrW0EQ+dgt6ursitkzORih79OEz/4FRUTbd62gwt8e8NFAUkZdsAb9mk BGZcEEnqvlPptHwOPrXYM3pEWrYfJWCWp2xF8lJNRojky6mXvs1xiHOEM8Nr549TlGrz dCLo7emFP1rc0IZBTCnMTKnhzGPah09ijS27xTH2R5ZghLdJcs+ejpGP5DdiMLEFubFa 8wrmbt6eI/7W5ame3Fmi35E21V5imarJ4OPVLg40NyCHqvVskZMd5oCPMDVV2fUdSTmi jZm6uSDSOQS2DeQKh8+58zae0G89EVJjjwe/3Cgagj7dJf13qnJ9xyxG7mFqbVuaFspb Jq5Q== X-Received: by 10.140.21.199 with SMTP id 65mr21608917qgl.86.1413664122260; Sat, 18 Oct 2014 13:28:42 -0700 (PDT) Received: from [192.168.254.3] (h77.89.102.166.static.ip.windstream.net. [166.102.89.77]) by mx.google.com with ESMTPSA id 18sm3975341qgl.5.2014.10.18.13.28.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 18 Oct 2014 13:28:41 -0700 (PDT) References: <5441945B.6010000@kapotamar.com> <638CECFF-7F53-4BEC-A58E-8939079192E7@gmail.com> <5442AC22.3050402@kapotamar.com> <6C164257-D38C-461E-AE0B-108BCC090297@gmail.com> <5442BB24.9050300@kapotamar.com> Mime-Version: 1.0 (1.0) In-Reply-To: <5442BB24.9050300@kapotamar.com> Content-Type: multipart/alternative; boundary=Apple-Mail-D1D5538B-6147-4652-BB4A-0C9AB4AB5E59 Content-Transfer-Encoding: 7bit Message-Id: <1E79F109-9949-4301-AB9C-0F41F102AEFA@gmail.com> Cc: "pgsql-admin@postgresql.org" X-Mailer: iPad Mail (11D257) From: jayknowsunix@gmail.com Subject: Re: Unable to connect remotely Date: Sat, 18 Oct 2014 16:28:41 -0400 To: Shay Gover X-Pg-Spam-Score: -1.0 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --Apple-Mail-D1D5538B-6147-4652-BB4A-0C9AB4AB5E59 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Be advised, at least my experience, that many linux builds require certain "= undocumented" configuration options. At least some of them are hard to find,= and configure --help doesn't always show them. Without those, things do get= put in different locations than where the rpm's do. Also, make sure you rem= ove the current rpms. You might just want to do the remove, and reinstall th= e binaries anyway at first. Sent from my iPad > On Oct 18, 2014, at 3:10 PM, Shay Gover wrote: >=20 > I've used Ubuntu Repositories to be on the safe side. If this is really th= e source of the problem I'll build from source. >> On 10/18/2014 10:05 PM, jayknowsunix@gmail.com wrote: >> Sounds maybe like a botched installation. The only pg_hba.conf that shoul= d be present is the one in $PGDATA. Also, depending on your configur= ation and how long it's been running, you may not have anything the pg_xlog d= irectory other than a subdirectory. I think, if I'm recalling correctly, tha= t the subdirectory is named archive. WAL segments get written out here based= on the setting for wal_keep_segments in the postgresql.conf file. >>=20 >> Not really certain when pg_clogs get written out, >> -- >> Jay >>=20 >> Sent from my iPad >>=20 >> On Oct 18, 2014, at 2:06 PM, Shay Gover wrote: >>=20 >>> Hi everyone, >>>=20 >>> First of all it's appears that there was something wrong with my Upstart= conf file (Ubuntu is using Upstart instead of SysV init. Next year they'll a= lso move to Systemd). Jay and Raghu: That solved my connection problem and /= var/run problem. >>> So now pg is up (according to ps -aux |grep post). However pg_ctl status= says no server is running. What's wrong?=20 >>>=20 >>> About the logs: I have pg_xlog and pg_clog under PFDATA - nothing there.= >>>=20 >>> Remote connection: When I try to connect to the server I get an error th= at my user is not present at pg_hba.conf. However, I see that I have 2 such f= iles: One in PGDATA and one in /etc/postgresql/9.3/main/. What's the differe= nce between them? >>>=20 >>> Thanks >>>=20 >>>=20 >>>> On 10/18/2014 03:48 AM, jayknowsunix@gmail.com wrote: >>>> Hi Shay, >>>>=20 >>>> Per your questions: >>>> 1) from my experience, /var/run is only used to write a PID file, but t= his file is usually only created by your system's service commands. I don't u= se Ubuntu, only CentOS, so my command is "service postgresql-9.3 [start | st= op | status| ... ] and the script writes the PID file. The CentOS script als= o writes out a /var/subsys/lock file for postgresql. >>>> 2) your logfiles, unless you've butchered the postgresql.conf file, liv= e in the $PGDATA/pg_log directory. Wherever that is on your system. >>>> 3) i probably can't help much here, but first if you're running selinux= , I'd probably turn that off first. Next, check if iptables is running and p= ossibly blocking your response. Either turn that off or add a rule to permit= this port. >>>>=20 >>>> Hope this helps, >>>> Jay >>>>=20 >>>> Sent from my iPad >>>>=20 >>>> On Oct 17, 2014, at 6:12 PM, Shay Gover wrote: >>>>=20 >>>>> Hello everybody, >>>>>=20 >>>>> I've just installed PostgreSQL and I'm unable to connect to it remotel= y from my main desktop (I'm trying to connect with pgAdmin 3). >>>>>=20 >>>>> My setup: >>>>> Ubuntu Server 14.04 x64 (Azure Cloud) >>>>> PostgreSQL v9.3.5-0ubuntu0.14.04.1 >>>>> contrib package is also installed. >>>>> PostgreSQL is started on boot using Upstart. I've modified this script= : https://gist.github.com/haad/6020401 (just version numbers) >>>>>=20 >>>>> My Problems: >>>>> 1) For some reason, when I've installed pg, /var/run/postgresql was mi= ssing. I've manually created this folder and gave my pg user write permissio= ns. Is that a bug? >>>>> 2) I've tried to change the log config in /etc/postgresql/9.3/main/pos= tgresql.conf but it won't work. I think that pg is ignoring that file. I als= o have no idea where is pg log file (I tried /var/log/postgresql - not there= ). I tried starting the DB manually with pg_ctl -l but the log does say much= : >>>>> LOG: database system is ready to accept connections >>>>> LOG: autovacuum launcher started >>>>> LOG: received SIGHUP, reloading configuration files >>>>> LOG: received smart shutdown request >>>>> LOG: autovacuum launcher shutting down >>>>> LOG: shutting down >>>>> LOG: database system is shut down >>>>> LOG: database system was shut down at 2014-10-17 21:22:11 UTC >>>>> LOG: database system is ready to accept connections >>>>> LOG: autovacuum launcher started >>>>> This log contains a single DB run. >>>>> 3) I'm unable to connect from my main desktop. Server is listening acc= ording to netstat. There is no firewall on the server and I've created an Az= ure endpoint for port 5432. Ideas? >>>>>=20 >>>>> Can you help me?=20 >>>>>=20 >>>>> Thanks, >>>>>=20 >>>>> --=20 >>>>> Shay Gover >>>>> IT Consultant >>>>> Kapot Tamar >>>=20 >>> --=20 >>> Shay Gover >>> IT Consultant >>> Kapot Tamar >=20 > --=20 > Shay Gover > IT Consultant > Kapot Tamar --Apple-Mail-D1D5538B-6147-4652-BB4A-0C9AB4AB5E59 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
Be advised, at least my experience, that many linux builds require certain "undocumented" configuration options. At least some of them are hard to find, and configure --help doesn't always show them. Without those, things do get put in different locations than where the rpm's do. Also, make sure you remove the current rpms. You might just want to do the remove, and reinstall the binaries anyway at first.

Sent from my iPad

On Oct 18, 2014, at 3:10 PM, Shay Gover <shay@kapotamar.com> wrote:

I've used Ubuntu Repositories to be on the safe side. If this is really the source of the problem I'll build from source.
On 10/18/2014 10:05 PM, jayknowsunix@gmail.com wrote:
Sounds maybe like a botched installation. The only pg_hba.conf that should be present is the one in $PGDATA. Also, depending on your configuration and how long it's been running, you may not have anything the pg_xlog directory other than a subdirectory. I think, if I'm recalling correctly, that the subdirectory is named archive. WAL segments get written out here based on the setting for wal_keep_segments in the postgresql.conf file.

Not really certain when pg_clogs get written out,
--
Jay

Sent from my iPad

On Oct 18, 2014, at 2:06 PM, Shay Gover <shay@kapotamar.com> wrote:

Hi everyone,

First of all it's appears that there was something wrong with my Upstart conf file (Ubuntu is using Upstart instead of SysV init. Next year they'll also move to Systemd). Jay and Raghu: That solved my connection problem and /var/run problem.
So now pg is up (according to ps -aux |grep post). However pg_ctl status says no server is running. What's wrong?

About the logs: I have pg_xlog and pg_clog under PFDATA - nothing there.

Remote connection: When I try to connect to the server I get an error that my user is not present at pg_hba.conf. However, I see that I have 2 such files: One in PGDATA and one in /etc/postgresql/9.3/main/. What's the difference between them?

Thanks


On 10/18/2014 03:48 AM, jayknowsunix@gmail.com wrote:
Hi Shay,

Per your questions:
1) from my experience, /var/run is only used to write a PID file, but this file is usually only created by your system's service commands. I don't use Ubuntu, only CentOS, so my command is "service postgresql-9.3 [start | stop | status| ... ] and the script writes the PID file. The CentOS script also writes out a /var/subsys/lock file for postgresql.
2) your logfiles, unless you've butchered the postgresql.conf file, live in the $PGDATA/pg_log directory. Wherever that is on your system.
3) i probably can't help much here, but first if you're running selinux, I'd probably turn that off first. Next, check if iptables is running and possibly blocking your response. Either turn that off or add a rule to permit this port.

Hope this helps,
Jay

Sent from my iPad

On Oct 17, 2014, at 6:12 PM, Shay Gover <shay@kapotamar.com> wrote:

Hello everybody,

I've just installed PostgreSQL and I'm unable to connect to it remotely from my main desktop (I'm trying to connect with pgAdmin 3).

My setup:
Ubuntu Server 14.04 x64 (Azure Cloud)
PostgreSQL v9.3.5-0ubuntu0.14.04.1
contrib package is also installed.
PostgreSQL is started on boot using Upstart. I've modified this script: https://gist.github.com/haad/6020401 (just version numbers)

My Problems:
1) For some reason, when I've installed pg, /var/run/postgresql was missing. I've manually created this folder and gave my pg user write permissions. Is that a bug?
2) I've tried to change the log config in /etc/postgresql/9.3/main/postgresql.conf but it won't work. I think that pg is ignoring that file. I also have no idea where is pg log file (I tried /var/log/postgresql - not there). I tried starting the DB manually with pg_ctl -l but the log does say much:
    LOG:  database system is ready to accept connections
    LOG:  autovacuum launcher started
    LOG:  received SIGHUP, reloading configuration files
    LOG:  received smart shutdown request
    LOG:  autovacuum launcher shutting down
    LOG:  shutting down
    LOG:  database system is shut down
    LOG:  database system was shut down at 2014-10-17 21:22:11 UTC
    LOG:  database system is ready to accept connections
    LOG:  autovacuum launcher started
This log contains a single DB run.
3) I'm unable to connect from my main desktop. Server is listening according to netstat. There is no firewall on the server and I've created an Azure endpoint for port 5432. Ideas?

Can you help me?

Thanks,

--

Shay Gover
IT Consultant
Kapot Tamar


--

Shay Gover
IT Consultant
Kapot Tamar


--

Shay Gover
IT Consultant
Kapot Tamar

--Apple-Mail-D1D5538B-6147-4652-BB4A-0C9AB4AB5E59--