From shay@kapotamar.com Fri Oct 17 22:13:11 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XfFln-0007Kc-RL for pgsql-admin@arkaria.postgresql.org; Fri, 17 Oct 2014 22:13:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XfFln-0004oK-Ae for pgsql-admin@arkaria.postgresql.org; Fri, 17 Oct 2014 22:13:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XfFll-0004lK-Ft for pgsql-admin@postgresql.org; Fri, 17 Oct 2014 22:13:09 +0000 Received: from gateway16.websitewelcome.com ([69.93.35.23]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XfFld-0003q7-Qg for pgsql-admin@postgresql.org; Fri, 17 Oct 2014 22:13:07 +0000 Received: by gateway16.websitewelcome.com (Postfix, from userid 5007) id E03B986F603B7; Fri, 17 Oct 2014 17:13:00 -0500 (CDT) Received: from gator4123.hostgator.com (gator4123.hostgator.com [192.185.4.135]) by gateway16.websitewelcome.com (Postfix) with ESMTP id D66EB86F6037B for ; Fri, 17 Oct 2014 17:13:00 -0500 (CDT) Received: from [31.210.186.120] (port=57534 helo=[192.168.2.18]) by gator4123.hostgator.com with esmtpsa (UNKNOWN:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XfFlc-0003Ii-Dk for pgsql-admin@postgresql.org; Fri, 17 Oct 2014 17:13:00 -0500 Message-ID: <5441945B.6010000@kapotamar.com> Date: Sat, 18 Oct 2014 01:12:43 +0300 From: Shay Gover User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Unable to connect remotely Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4123.hostgator.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kapotamar.com X-BWhitelist: no X-Source-IP: 31.210.186.120 X-Exim-ID: 1XfFlc-0003Ii-Dk X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.2.18]) [31.210.186.120]:57534 X-Source-Auth: shay@kapotamar.com X-Email-Count: 1 X-Source-Cap: a3Q7a3Q7Z2F0b3I0MTIzLmhvc3RnYXRvci5jb20= X-Pg-Spam-Score: -1.4 (-) 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 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

From raghuchennuru@gmail.com Sat Oct 18 02:24:26 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XfJgw-0000Hk-3e for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 02:24:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XfJgv-0000dU-FI for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 02:24:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XfJgt-0000cx-2U for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 02:24:23 +0000 Received: from mail-ob0-x22d.google.com ([2607:f8b0:4003:c01::22d]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XfJgl-00008L-PB for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 02:24:21 +0000 Received: by mail-ob0-f173.google.com with SMTP id wp4so1547920obc.32 for ; Fri, 17 Oct 2014 19:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=JUBUJto7Hz/3zj2QrR6r/F1mKbelWd6ACGSIY3FQjUY=; b=b14zoFx6AZ3UJy295Ybpu+gYxVFo07aGVWwGh9F8J0T5EeUmYnDFrE93YJ4pLMeAkz 0aMq6NMHUvfEcubIoRMIScF0ikdm2CMwczMMlaj0AFQ5Tt1NJzIyXkTVbscYZcQWdQrJ lE8otCEpYAYCUpe5XEWVDVxTtsSwc+n8XpIzA77vGff6bGymjWm9cwPM1cpi/fPSwhaJ ZPV2VzjYwYlnlcFyxMGDU1Ed7lDw4j416wUMQsN8dNCQtOQX3dFtUft/hFAnFsSEvXZH 3edIUk19ORRe9vkEbMf1J+Zlp4XHnrdMGpIm9VycTYtEL+6y4h8nLDJ62/SER0BhNf8i KpXQ== X-Received: by 10.202.215.70 with SMTP id o67mr9525942oig.15.1413599055135; Fri, 17 Oct 2014 19:24:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.105.6 with HTTP; Fri, 17 Oct 2014 19:23:54 -0700 (PDT) In-Reply-To: <5441945B.6010000@kapotamar.com> References: <5441945B.6010000@kapotamar.com> From: Raghu Ram Date: Sat, 18 Oct 2014 07:53:54 +0530 Message-ID: Subject: Re: Unable to connect remotely To: Shay Gover Cc: "pgsql-admin@postgresql.org" Content-Type: multipart/alternative; boundary=001a113d42dc894a340505a92d21 X-Pg-Spam-Score: -2.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 --001a113d42dc894a340505a92d21 Content-Type: text/plain; charset=UTF-8 On Sat, Oct 18, 2014 at 3:42 AM, Shay Gover 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. > > 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? > > Could you please share ERROR message,when you are connecting the database server from Client ? Thanks & Regards Raghu Ram --001a113d42dc894a340505a92d21 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Sat, Oct 18, 2014 at 3:42 AM, Shay Gove= r <shay@kapotamar.com>= wrote:
=20 =20 =20 =20
Hello everybody,

I've just installed PostgreSQL and I'm unable to connect to i= t 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.
= =C2=A0
3) I'm unabl= e 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?



=C2= =A0Could you please share ERROR message,when you are connecting the databas= e server from Client ?

Thanks & Regards
<= div>Raghu Ram =C2=A0
--001a113d42dc894a340505a92d21-- From shay@kapotamar.com Sat Oct 18 18:06:57 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XfYP3-0004hR-1l for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 18:06:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XfYP2-0005Hj-DC for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 18:06:56 +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 1XfYP0-0005Hc-Tc for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 18:06:54 +0000 Received: from gateway06.websitewelcome.com ([67.18.39.7]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XfYOv-0002au-Hd for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 18:06:53 +0000 Received: by gateway06.websitewelcome.com (Postfix, from userid 5007) id D5282ED924E60; Sat, 18 Oct 2014 13:06:45 -0500 (CDT) Received: from gator4123.hostgator.com (gator4123.hostgator.com [192.185.4.135]) by gateway06.websitewelcome.com (Postfix) with ESMTP id CAA47ED924E3F for ; Sat, 18 Oct 2014 13:06:45 -0500 (CDT) Received: from [31.210.186.120] (port=57545 helo=[192.168.2.18]) by gator4123.hostgator.com with esmtpsa (UNKNOWN:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XfYOr-0006LQ-A7 for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 13:06:45 -0500 Message-ID: <5442AC22.3050402@kapotamar.com> Date: Sat, 18 Oct 2014 21:06:26 +0300 From: Shay Gover User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Unable to connect remotely References: <5441945B.6010000@kapotamar.com> <638CECFF-7F53-4BEC-A58E-8939079192E7@gmail.com> In-Reply-To: <638CECFF-7F53-4BEC-A58E-8939079192E7@gmail.com> Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4123.hostgator.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kapotamar.com X-BWhitelist: no X-Source-IP: 31.210.186.120 X-Exim-ID: 1XfYOr-0006LQ-A7 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.2.18]) [31.210.186.120]:57545 X-Source-Auth: shay@kapotamar.com X-Email-Count: 1 X-Source-Cap: a3Q7a3Q7Z2F0b3I0MTIzLmhvc3RnYXRvci5jb20= X-Pg-Spam-Score: -1.5 (-) 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 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

From jayknowsunix@gmail.com Sat Oct 18 19:05:41 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XfZJt-0006rG-5O for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 19:05:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XfZJs-0007pg-DN for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 19:05:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XfZJq-0007pZ-SY for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 19:05:39 +0000 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XfZJm-0004Bs-SN for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 19:05:36 +0000 Received: by mail-qg0-f48.google.com with SMTP id i50so1916221qgf.21 for ; Sat, 18 Oct 2014 12:05:33 -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=yly/kNAyiyqgB/M0ovp53dusefMn38Ix/GnDXIl78fE=; b=BPgm4KQxqbPporIc0LtSuUeI2ysw6dRCVyreQPlPGkSL1pyg1SfUkeb4CD6bs3tB52 6JmXS/7y4KKb/w/3NUJ8s1DiMkaoZ6gEU3Zbc4r1P4biKZwCft7t6uNaeCmbNz7cdLGf ki9dXamz0Y8lMArxsCm3wM6QAp9xepsbQC+fg3J+qa0TAXdjAx1xS2EVCRLSFl+nsRxW 5MuXkU4YMYhhw4v+CrB93hIhBO9hS2m0mzEzu4SxjZw4dnOPfs4CJvlAAaASVcxHNZ5K H9362MkEG7TTcqAJQkN9Tswv+zucUIEWrnXK2bfJD5Tz5y3BdU66CRlLS54LrE3fdwZX yn1A== X-Received: by 10.140.20.82 with SMTP id 76mr21298255qgi.29.1413659131781; Sat, 18 Oct 2014 12:05:31 -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 11sm3841763qgp.2.2014.10.18.12.05.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 18 Oct 2014 12:05:31 -0700 (PDT) References: <5441945B.6010000@kapotamar.com> <638CECFF-7F53-4BEC-A58E-8939079192E7@gmail.com> <5442AC22.3050402@kapotamar.com> Mime-Version: 1.0 (1.0) In-Reply-To: <5442AC22.3050402@kapotamar.com> Content-Type: multipart/alternative; boundary=Apple-Mail-2176B22B-25DB-475F-8124-31566592D985 Content-Transfer-Encoding: 7bit Message-Id: <6C164257-D38C-461E-AE0B-108BCC090297@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 15:05:30 -0400 To: Shay Gover X-Pg-Spam-Score: -2.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-2176B22B-25DB-475F-8124-31566592D985 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Sounds maybe like a botched installation. The only pg_hba.conf that should b= e present is the one in $PGDATA. Also, depending on your configuration and h= ow long it's been running, you may not have anything the pg_xlog directory o= ther than a subdirectory. I think, if I'm recalling correctly, that the subd= irectory is named archive. WAL segments get written out here based on the se= tting 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 wrote: >=20 > Hi everyone, >=20 > First of all it's appears that there was something wrong with my Upstart c= onf file (Ubuntu is using Upstart instead of SysV init. Next year they'll al= so move to Systemd). Jay and Raghu: That solved my connection problem and /v= ar/run problem. > So now pg is up (according to ps -aux |grep post). However pg_ctl status s= ays 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 that= my user is not present at pg_hba.conf. However, I see that I have 2 such fi= les: One in PGDATA and one in /etc/postgresql/9.3/main/. What's the differen= ce 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 thi= s file is usually only created by your system's service commands. I don't us= e Ubuntu, only CentOS, so my command is "service postgresql-9.3 [start | sto= p | 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 i= n 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 poss= ibly blocking your response. Either turn that off or add a rule to permit th= is 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 remotely f= rom 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: h= ttps://gist.github.com/haad/6020401 (just version numbers) >>>=20 >>> My Problems: >>> 1) For some reason, when I've installed pg, /var/run/postgresql was miss= ing. 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/postg= resql.conf but it won't work. I think that pg is ignoring that file. I also h= ave 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 accor= ding to netstat. There is no firewall on the server and I've created an Azur= e 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 --Apple-Mail-2176B22B-25DB-475F-8124-31566592D985 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
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

--Apple-Mail-2176B22B-25DB-475F-8124-31566592D985-- From shay@kapotamar.com Sat Oct 18 19:10:59 2014 Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XfZP1-00072Q-Gi for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 19:10:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XfZP0-0001NP-Tr for pgsql-admin@arkaria.postgresql.org; Sat, 18 Oct 2014 19:10:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XfZOz-0001NI-GK for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 19:10:57 +0000 Received: from gateway06.websitewelcome.com ([67.18.124.13]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XfZOs-0004HS-37 for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 19:10:55 +0000 Received: by gateway06.websitewelcome.com (Postfix, from userid 5007) id ADC49EDAB015D; Sat, 18 Oct 2014 14:10:48 -0500 (CDT) Received: from gator4123.hostgator.com (gator4123.hostgator.com [192.185.4.135]) by gateway06.websitewelcome.com (Postfix) with ESMTP id A59B0EDAB013F for ; Sat, 18 Oct 2014 14:10:48 -0500 (CDT) Received: from [31.210.186.120] (port=57534 helo=[192.168.2.18]) by gator4123.hostgator.com with esmtpsa (UNKNOWN:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XfZOp-0004dL-M7 for pgsql-admin@postgresql.org; Sat, 18 Oct 2014 14:10:48 -0500 Message-ID: <5442BB24.9050300@kapotamar.com> Date: Sat, 18 Oct 2014 22:10:28 +0300 From: Shay Gover User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: "pgsql-admin@postgresql.org" Subject: Re: Unable to connect remotely References: <5441945B.6010000@kapotamar.com> <638CECFF-7F53-4BEC-A58E-8939079192E7@gmail.com> <5442AC22.3050402@kapotamar.com> <6C164257-D38C-461E-AE0B-108BCC090297@gmail.com> In-Reply-To: <6C164257-D38C-461E-AE0B-108BCC090297@gmail.com> Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4123.hostgator.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kapotamar.com X-BWhitelist: no X-Source-IP: 31.210.186.120 X-Exim-ID: 1XfZOp-0004dL-M7 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.2.18]) [31.210.186.120]:57534 X-Source-Auth: shay@kapotamar.com X-Email-Count: 1 X-Source-Cap: a3Q7a3Q7Z2F0b3I0MTIzLmhvc3RnYXRvci5jb20= X-Pg-Spam-Score: -0.5 (/) 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 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

From jayknowsunix@gmail.com Sat Oct 18 20:28:58 2014 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--