[Postgres-xl-general] ERROR: gtmName is not configured. (from 10/12/16 git clone)

Rob Reinhardt rreinhardt at healytics.com
Thu Oct 13 08:26:44 PDT 2016


This is the full cmd/path I used to clone the repo. I currently have down.
Is that the right path for the XL9_5_STABLE, or something else?

git clone git://git.postgresql.org/git/postgres-xl.git

Another question is, does this stable version support PostgreSQL 9.5.4?

This is another area that has confused me a bit.  I already had 9.5.4 on
the two servers I'm trying to cluster, and previously I thought that pgxl
was just going to use the version of PostgreSQL that I already had on the
box.

Then further troubleshooting today I realized that having put the pgxl bin
directory in my path I'm actually getting another version of psql.  And my
original install is still there as well.  So, now I realize I never had to
install the latest postgreSQL as a pre-requisite since it appears pgxl
brings its own distribution of it.  But, then I don't know what is
9.5alpha1, is that some kind of 9.5.0-1 or something?

/usr/local/pgsql/bin/psql --version
psql (Postgres-XL) 9.5alpha1

/usr/bin/psql --version
psql (PostgreSQL) 9.5.4

As for my original setup, I followed the instructions and configuration
example at:

https://ruihaijiang.wordpress.com/2015/09/17/postgres-xl-installation-example-on-linux/

The only thing I had to different than his example was I put everything on
2 nodes instead of 4

and even though he didn't say it I had to run a PGXC$ prepare config empty
to get a full empty config file because his example was missing a number of
other default variables that were set.  With the rest simply being null's
though, I just appended my localized version of that empty template to the
end and had the following config file (which did work like I said, before I
did the git clone and tried to upgrade).

The attached is my config file




Rob Reinhardt
Vice President, Operations
Healytics, Inc.

On Thu, Oct 13, 2016 at 1:04 AM, Pavan Deolasee <pavan.deolasee at gmail.com>
wrote:

>
>
> On Thu, Oct 13, 2016 at 1:46 AM, Rob Reinhardt <rreinhardt at healytics.com>
> wrote:
>
>>
>>
>> So, I created a git clone (previous install was not based on git clone
>> but from the sourceforge download link in the above example), the new
>> version is then
>>
>> git clone git://git.postgresql.org/git/postgres-xl.git
>>
>> as of today 10/12/16, therefore the latest and greatest "stable" release
>> I believe.
>>
>>
> XL9_5_STABLE is the latest stable branch of the code. So I would suggest
> to build/install from that branch. All Postgres-XL 9.5 releases are cut
> from that branch.
>
> You should also compile and install pgxc_ctl contrib module, if you've
> done that already.
>
>
>> That compiled and installed ok, also recompiled and reinstalled the
>> pgcx_ctl piece.
>>
>> Now when I try to start the environment back up, I get the following
>> error:
>>
>> -bash-4.2$ pgxc_ctl start all
>> /bin/bash
>> Installing pgxc_ctl_bash script as /var/lib/pgsql/pgxc_ctl/pgxc_ctl_bash.
>> Installing pgxc_ctl_bash script as /var/lib/pgsql/pgxc_ctl/pgxc_ctl_bash.
>> Reading configuration using /var/lib/pgsql/pgxc_ctl/pgxc_ctl_bash --home
>> /var/lib/pgsql/pgxc_ctl --configuration /var/lib/pgsql/pgxc_ctl/pgxc_c
>> tl.conf
>> Finished to read configuration.
>> ERROR: gtmName is not configured.
>> ERROR: Found fundamental configuration error.
>>
>>
> Hmm.. Can you attach the pgxc_ctl.conf file used to setup the cluster in
> the first place? Or may I actually ask how did you set up the cluster
> initially?
>
>
>>
>> But, at least I am on the latest build now I think.   Except that if I do:
>>
>> -bash-4.2$ pgxc_ctl --version
>> /bin/bash
>> Pgxc_ctl V9.2 for Postgres-XL 9.2
>>
>>
> Ouch. That's an oversight. The version string for somehow hardcoded in
> pgxc_ctl when it should really be using the server version that it belongs
> to. Let me fix that, but given that you never installed the old XL 9.2, I
> don't think you would be using very old version of pgxc_ctl.
>
>
>>
>> https://git.postgresql.org/gitweb/?p=postgres-xl.git;a=summary
>>
>> Is there another official / better source I'm supposed to go to?
>>
>>
> That's the official source code. I would only suggest to use XL9_5_STABLE
> branch though.
>
> Thanks,
> Pavan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.postgres-xl.org/pipermail/postgres-xl-general-postgres-xl.org/attachments/20161013/d97b5d3b/attachment.htm>
-------------- next part --------------
#!/usr/bin/env bash
#
# Postgres-XC Configuration file for pgxc_ctl utility.
#
# Configuration file can be specified as -c option from pgxc_ctl command.   Default is
# $PGXC_CTL_HOME/pgxc_ctl.org.
#
# This is bash script so you can make any addition for your convenience to configure
# your Postgres-XC cluster.
#
# Please understand that pgxc_ctl provides only a subset of configuration which pgxc_ctl
# provide.  Here's several several assumptions/restrictions pgxc_ctl depends on.
#
# 1) All the resources of pgxc nodes has to be owned by the same user.   Same user means
#    user with the same user name.  User ID may be different from server to server.
#    This must be specified as a variable $pgxcOwner.
#
# 2) All the servers must be reacheable via ssh without password.   It is highly recommended
#    to setup key-based authentication among all the servers.
#
# 3) All the databases in coordinator/datanode has at least one same superuser.  Pgxc_ctl
#    uses this user to connect to coordinators and datanodes.   Again, no password should
#    be used to connect.  You have many options to do this, pg_hba.conf, pg_ident.conf and
#    others.  Pgxc_ctl provides a way to configure pg_hba.conf but not pg_ident.conf.   This
#    will be implemented in the later releases.
#
# 4) Gtm master and slave can have different port to listen, while coordinator and datanode
#    slave should be assigned the same port number as master.
#
# 5) Port nuber of a coordinator slave must be the same as its master.
#
# 6) Master and slave are connected using synchronous replication.  Asynchronous replication
#    have slight (almost none) chance to bring total cluster into inconsistent state.
#    This chance is very low and may be negligible.  Support of asynchronous replication
#    may be supported in the later release.
#
# 7) Each coordinator and datanode can have only one slave each.  Cascaded replication and
#    multiple slave are not supported in the current pgxc_ctl.
#
# 8) Killing nodes may end up with IPC resource leak, such as semafor and shared memory.
#    Only listening port (socket) will be cleaned with clean command.
#
# 9) Backup and restore are not supported in pgxc_ctl at present.   This is a big task and
#    may need considerable resource.
#
#========================================================================================
#
#
# pgxcInstallDir variable is needed if you invoke "deploy" command from pgxc_ctl utility.
# If don't you don't need this variable.
pgxcInstallDir=$HOME/pgxc
#---- OVERALL -----------------------------------------------------------------------------
#
pgxcOwner=$USER         # owner of the Postgres-XC databaseo cluster.  Here, we use this
                                                # both as linus user and database user.  This must be
                                                # the super user of each coordinator and datanode.
pgxcUser=$pgxcOwner             # OS user of Postgres-XC owner

tmpDir=/tmp                                     # temporary dir used in XC servers
localTmpDir=$tmpDir                     # temporary dir used here locally

configBackup=n                                  # If you want config file backup, specify y to this value.
configBackupHost=pgxc-linker    # host to backup config file
configBackupDir=$HOME/pgxc              # Backup directory
configBackupFile=pgxc_ctl.bak   # Backup file name --> Need to synchronize when original changed.

dataDirRoot=$HOME/DATA/pgxl/nodes

#---- GTM ------------------------------------------------------------------------------------

# GTM is mandatory.  You must have at least (and only) one GTM master in your Postgres-XC cluster.
# If GTM crashes and you need to reconfigure it, you can do it by pgxc_update_gtm command to update
# GTM master with others.   Of course, we provide pgxc_remove_gtm command to remove it.  This command
# will not stop the current GTM.  It is up to the operator.

#---- Overall -------
gtmName=()

#---- GTM Master -----------------------------------------------

#---- Overall ----
gtmMasterServer=()
gtmMasterPort=()
gtmMasterDir=()

#---- Configuration ---
gtmExtraConfig=() # Will be added gtm.conf for both Master and Slave (done at initilization only)
gtmMasterSpecificExtraConfig=() # Will be added to Master's gtm.conf (done at initialization only)

#---- GTM Slave -----------------------------------------------

# Because GTM is a key component to maintain database consistency, you may want to configure GTM slave
# for backup.

#---- Overall ------
gtmSlave=n                                      # Specify y if you configure GTM Slave.   Otherwise, GTM slave will not be configured and
                                                        # all the following variables will be reset.
gtmSlaveName=()
gtmSlaveServer=()               # value none means GTM slave is not available.  Give none if you don't configure GTM Slave.
gtmSlavePort=()                 # Not used if you don't configure GTM slave.
gtmSlaveDir=()  # Not used if you don't configure GTM slave.
# Please note that when you have GTM failover, then there will be no slave available until you configure the slave
# again. (pgxc_add_gtm_slave function will handle it)

#---- Configuration ----
gtmSlaveSpecificExtraConfig=() # Will be added to Slave's gtm.conf (done at initialization only)

#---- GTM Proxy -------------------------------------------------------------------------------------------------------
# GTM proxy will be selected based upon which server each component runs on.
# When fails over to the slave, the slave inherits its master's gtm proxy.  It should be
# reconfigured based upon the new location.
#
# To do so, slave should be restarted.   So pg_ctl promote -> (edit postgresql.conf and recovery.conf) -> pg_ctl restart
#
# You don't have to configure GTM Proxy if you dont' configure GTM slave or you are happy if every component connects
# to GTM Master directly.  If you configure GTL slave, you must configure GTM proxy too.

#---- Shortcuts ------
gtmProxyDir=()

#---- Overall -------
gtmProxy=()                             # Specify y if you conifugre at least one GTM proxy.   You may not configure gtm proxies
                                                # only when you dont' configure GTM slaves.
                                                # If you specify this value not to y, the following parameters will be set to default empty values.
                                                # If we find there're no valid Proxy server names (means, every servers are specified
                                                # as none), then gtmProxy value will be set to "n" and all the entries will be set to
                                                # empty values.
gtmProxyNames=()        # No used if it is not configured
gtmProxyServers=()                      # Specify none if you dont' configure it.
gtmProxyPorts=()                                # Not used if it is not configured.
gtmProxyDirs=() # Not used if it is not configured.

#---- Configuration ----
gtmPxyExtraConfig=n             # Extra configuration parameter for gtm_proxy.  Coordinator section has an example.

#---- Coordinators ----------------------------------------------------------------------------------------------------

#---- shortcuts ----------
coordMasterDir=$dataDirRoot/coord_master
coordSlaveDir=$HOME/coord_slave
coordArchLogDir=$HOME/coord_archlog

#---- Overall ------------
coordNames=()           # Master and slave use the same name
coordPorts=()                   # Master server listening ports
poolerPorts=()                  # Master pooler ports
coordPgHbaEntries=(::1/128)     # Assumes that all the coordinator (master/slave) accepts
                                                                                                # the same connection
                                                                                                # This entry allows only $pgxcOwner to connect.
                                                                                                # If you'd like to setup another connection, you should
                                                                                                # supply these entries through files specified below.
#coordPgHbaEntries=(127.0.0.1/32)       # Same as above but for IPv4 connections

#---- Master -------------
coordMasterServers=()           # none means this master is not available
coordMasterDirs=()
coordMaxWALsender=5     # max_wal_senders: needed to configure slave. If zero value is specified,
                                                # it is expected to supply this parameter explicitly by external files
                                                # specified in the following.   If you don't configure slaves, leave this value to zero.
coordMaxWALSenders=()
                                                # max_wal_senders configuration for each coordinator.

#---- Slave -------------
coordSlave=n                    # Specify y if you configure at least one coordiantor slave.  Otherwise, the following
                                                # configuration parameters will be set to empty values.
                                                # If no effective server names are found (that is, every servers are specified as none),
                                                # then coordSlave value will be set to n and all the following values will be set to
                                                # empty values.
coordSlaveSync=n                # Specify to connect with synchronized mode.
coordSlaveServers=()                    # none means this slave is not available
coordSlavePorts=()                      # coordinator slave listening ports
coordSlavePoolerPorts=()                        # coordinator slave pooler ports
coordSlaveDirs=()
coordArchLogDirs=()

#---- Configuration files---
# Need these when you'd like setup specific non-default configuration
# These files will go to corresponding files for the master.
# You may supply your bash script to setup extra config lines and extra pg_hba.conf entries
# Or you may supply these files manually.
coordExtraConfig=coordExtraConfig       # Extra configuration file for coordinators.
                                                # This file will be added to all the coordinators'
                                                # postgresql.conf
# Pleae note that the following sets up minimum parameters which you may want to change.
# You can put your postgresql.conf lines here.
cat > $coordExtraConfig <<EOF
#================================================
# Added to all the coordinator postgresql.conf
# Original: $coordExtraConfig
log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
listen_addresses = '*'
max_connections = 100
hot_standby = off
EOF

# Additional Configuration file for specific coordinator master.
# You can define each setting by similar means as above.
coordSpecificExtraConfig=()
coordSpecificExtraPgHba=()

#---- Datanodes -------------------------------------------------------------------------------------------------------

#---- Shortcuts --------------
datanodeMasterDir=$dataDirRoot/dn_master
datanodeSlaveDir=$dataDirRoot/dn_slave
datanodeArchLogDir=$dataDirRoot/datanode_archlog

#---- Overall ---------------
primaryDatanode= # Primary Node.
datanodeNames=()
datanodePorts=()        # Master and slave use the same port!
datanodePoolerPorts=()  # Master and slave use the same port!
datanodePgHbaEntries=(::1/128)  # Assumes that all the coordinator (master/slave) accepts
                                                                                # the same connection
                                                                                # This list sets up pg_hba.conf for $pgxcOwner user.
                                                                                # If you'd like to setup other entries, supply them
                                                                                # through extra configuration files specified below.
#datanodePgHbaEntries=(127.0.0.1/32)    # Same as above but for IPv4 connections

#---- Master ----------------
datanodeMasterServers=()        # none means this master is not available.
                                                                                                        # This means that there should be the master but is down.
                                                                                                        # The cluster is not operational until the master is
                                                                                                        # recovered and ready to run.
datanodeMasterDirs=()
datanodeMaxWalSender=5                                                          # max_wal_senders: needed to configure slave. If zero value is
                                                                                                        # specified, it is expected this parameter is explicitly supplied
                                                                                                        # by external configuration files.
                                                                                                        # If you don't configure slaves, leave this value zero.
datanodeMaxWALSenders=()
                                                # max_wal_senders configuration for each datanode

#---- Slave -----------------
datanodeSlave=n                 # Specify y if you configure at least one coordiantor slave.  Otherwise, the following
                                                # configuration parameters will be set to empty values.
                                                # If no effective server names are found (that is, every servers are specified as none),
                                                # then datanodeSlave value will be set to n and all the following values will be set to
                                                # empty values.
datanodeSlaveServers=() # value none means this slave is not available
datanodeSlavePorts=()   # Master and slave use the same port!
datanodeSlavePoolerPorts=()     # Master and slave use the same port!
#datanodeSlaveSync=y            # If datanode slave is connected in synchronized mode
datanodeSlaveDirs=()
datanodeArchLogDirs=()

# ---- Configuration files ---
# You may supply your bash script to setup extra config lines and extra pg_hba.conf entries here.
# These files will go to corresponding files for the master.
# Or you may supply these files manually.
datanodeExtraConfig=datanodeExtraConfig
cat > $datanodeExtraConfig <<EOF
#================================================
# Added to all the datanode postgresql.conf
# Original: $datanodeExtraConfig
log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
listen_addresses = '*'
max_connections = 100
hot_standby = off
EOF
# Additional Configuration file for specific datanode master.
# You can define each setting by similar means as above.
datanodeSpecificExtraConfig=()
datanodeSpecificExtraPgHba=()
###
### MY LOCAL CONFIG STARTS HERE THE REST ABOVE ARE THE DEFAULTS AND NULL SETTINGS
###
###
#user and path
pgxcOwner=postgres
pgxcUser=$pgxcOwner
pgxcInstallDir=/usr/local/pgsql

#gtm and gtmproxy
gtmMasterDir=$HOME/pgxc/nodes/gtm
gtmMasterPort=6666
gtmMasterServer=172.16.12.124
gtmSlave=n

#gtm proxy
gtmProxy=n

#coordinator
coordMasterDir=$HOME/pgxc/nodes/coord
coordNames=(coord1)
coordPorts=(5432)
poolerPorts=(6668)
coordPgHbaEntries=(172.16.12.0/24)
coordMasterServers=(172.16.12.134)
coordMasterDirs=($coordMasterDir/coord1)
coordMaxWALsernder=0
coordMaxWALSenders=($coordMaxWALsernder)
coordSlave=n
coordSpecificExtraConfig=(none none none)
coordSpecificExtraPgHba=(none none none)

#datanode
datanodeNames=(datanode1 datanode2)
datanodePorts=(15432 15433)
datanodePoolerPorts=(6669 6670)
datanodePgHbaEntries=(172.16.12.0/24)
datanodeMasterServers=(172.16.12.124 172.16.12.134)
datanodeMasterDir=$HOME/pgxc/nodes/dn_master
datanodeMasterDirs=($datanodeMasterDir/datanode1 $datanodeMasterDir/datanode2)
datanodeMaxWalSender=0
datanodeMaxWALSenders=($datanodeMaxWalSender $datanodeMaxWalSender)
datanodeSlave=n
primaryDatanode=datanode1


More information about the postgres-xl-general mailing list