pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marc Mitchell <marcm@eisolution.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Ross J. Reedstrom <reedstrm@rice.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: Remote monitoring
Date: Fri, 6 Sep 2002 13:49:20 -0500
Message-ID: <00e101c255d6$1c615ba0$7501050a@eisolution.com> (raw)
References: <200209061823.g86INHP16111@candle.pha.pa.us>

Setting the DISPLAY on the remote machine works fine if the remote machine
can directly access the local/client machine.  It cannot in our case due to
firewall and NAT issues.

In this case we (thanks to Ross) use ssh (instead of the simpler slogin)
from client to remote server.  However, you set DISPLAY on the local
machine, not the remote machine.  The server side of ssh (sshd) sets up all
the required settings to send the X11 traffic back over the established
link.  In fact, the ssh man page on our box explicitly states: "The user
should not manually set DISPLAY." meaning on the remote side.

One thing that was hampering this, at least within our install, was that
the postgres home directory on the remote server was owned by root and not
postgres.  When ssh'ing into the box with the X11 forwarding enabled, the
daemon wants to create a file (".Xauthority") in the home directory of the
user on the remote machine.  When this directory isn't writeable by the
user, the creation of this file fails and the X11 forwarding doesn't work
(and in fact screws up a lot of basic UI-rich apps like vi).  Our solution
was to make that directory writeable by everyone.  We tried pre-creating
just the file and chmod'ing but that didn't work apparently indicating the
process wants to re-create the file as opposed to appending to it.

Also, wasn't able to make this work in the situation where to ssh as user
"X" and then on the remote machine su to user "postgres".  But I didn't try
very hard to figure it out once I got it working under the "postgres"
account.  I suspect it would be do-able.  This might be important if ssh
logins are restricted to certain accounts and those accounts don't include
"postgres" which would be needed to enable the query view functionality as
well as others.

Marc

----- Original Message -----
From: "Bruce Momjian" <pgman@candle.pha.pa.us>
To: "Marc Mitchell" <marcm@eisolution.com>
Cc: "Ross J. Reedstrom" <reedstrm@rice.edu>; <pgsql-admin@postgresql.org>
Sent: Friday, September 06, 2002 1:23 PM
Subject: Re: [ADMIN] Remote monitoring


> Marc Mitchell wrote:
> > Ross,
> >
> > You rock!  This works perfectly!  Thank you very much!
>
> The pgmonitor README does have this paragraph:
>
> Pgmonitor only works when run on the database server machine.  To use it
> remotely, log into the remote machine, set the DISPLAY variable to point
> to your local X server, and start pgmonitor.  Pgmonitor will then run on
> the remote machine, but will display on your local machine.
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania
19073




view thread (10+ messages)

Message-ID: <00e101c255d6$1c615ba0$7501050a@eisolution.com>
Permalink:  ../00e101c255d6$1c615ba0$7501050a@eisolution.com/
Also on:    postgresql.org/message-id/00e101c255d6$1c615ba0$7501050a@eisolution.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: marcm@eisolution.com, pgman@candle.pha.pa.us, reedstrm@rice.edu
  Subject: Re: Remote monitoring
  In-Reply-To: <00e101c255d6$1c615ba0$7501050a@eisolution.com>
  References: <200209061823.g86INHP16111@candle.pha.pa.us> <00e101c255d6$1c615ba0$7501050a@eisolution.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox