- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想创建一个postgres-xl
集群。该集群包括 5 个节点、1 个 GTM、2 个 Coordinator 和 2 个 Datanode。以下是节点的详细信息
GTM:
hostname=localhost
nodename=gtm
IP=127.0.0.1
port=20001
Coordinator1:
hostname=localhost
nodename=coord1
IP=127.0.0.1
pooler_port=30011,port=30001
Coordinator2:
hostname=host2
nodename=coord2
IP=10.4.6.36
pooler_port=30012,port=30002
Datanode1:
hostname=localhost
nodename=dn1
IP=127.0.0.1
pooler_port=40011, port=40001
Datanode2:
hostname=host2
nodename=dn2
IP=10.4.6.36
pooler_port=40012, port=40002
我已经安装了 pgxc_ctl 并将 /usr/local/pgsql/bin 添加到 postgres 的 PATH。我已经配置了 ssh 身份验证以避免输入 pgxc_ctl 的密码。我已经在两个节点上编辑了 postgresql.conf 和 pg_hba.conf。
然后我搭建集群如下:
$ pgxc_ctl
PGXC$ add gtm master gtm localhost 20001 $dataDirRoot/gtm
PGXC$ add coordinator master coord1 localhost 30001 30011
$dataDirRoot/coord_master.1 none none
PGXC$ add coordinator master coord2 10.4.6.36 30002 30012
$dataDirRoot/coord_master.2 none none
添加coord2后,得到如下结果
psql: FATAL: Could not obtain a transaction ID from GTM. The GTM might have failed or lost connectivity
PGXC$ add datanode master dn1 localhost 40001 40011
$dataDirRoot/dn_master.1 none none none
PGXC$ add datanode master dn2 10.4.6.36 40002 40012
$dataDirRoot/dn_master.2 none none none
添加dn2后出现如下错误
ERROR: Failed to get pooled connections HINT: This may happen because one or more nodes are currently unreachable, either because of node or network failure. It's also possible that the target node may have hit the connection limit or the pooler is configured with low connections. Please check if all nodes are running fine and also review max_connections and max_pool_size configuration parameters
但是当我监控所有节点时,它显示
PGXC$ monitor all
Running: gtm master
Running: coordinator master coord1
Running: coordinator master coord2
Running: datanode master dn1
Running: datanode master dn2
我无法通过运行连接到 coord2
psql -h 10.4.6.36 -p 30002 -U user -d postgres
显示
psql: FATAL: Could not obtain a transaction ID from GTM. The GTM might have failed or lost connectivity
但我可以通过运行连接到 coord1
psql -p 30001 -U user -d postgres
我可以在没有密码的情况下从本地主机 ping 主机 2。我需要解决上述错误。有什么帮助吗?添加配置:
pgxcInstallDir=$HOME/pgxc
pgxcOwner=$USER
pgxcUser=$pgxcOwner
tmpDir=/tmp
localTmpDir=$tmpDir
configBackup=n
configBackupHost=pgxc-linker
configBackupDir=$HOME/pgxc
configBackupFile=pgxc_ctl.bak
dataDirRoot=$HOME/DATA/pgxl/nodes
#---- Coordinators ----------------------------------------------------------------------------------------------------
coordMasterDir=$dataDirRoot/coord_master
coordSlaveDir=$HOME/coord_slave
coordArchLogDir=$HOME/coord_archlog
coordExtraConfig=coordExtraConfig
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_pool_size=300
max_connections=200
hot_standby = off
EOF
#---- Datanodes -------------------------------------------------------------------------------------------------------
datanodeMasterDir=$dataDirRoot/dn_master
datanodeSlaveDir=$dataDirRoot/dn_slave
datanodeArchLogDir=$dataDirRoot/datanode_archlog
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_pool_size=300
max_connections=200
hot_standby = off
EOF
#---- GTM ------------------------------------------------------------------------------------
gtmName=gtm
gtmMasterServer=localhost
gtmMasterPort=20001
gtmMasterDir=$dataDirRoot/gtm
coordNames=( coord1 coord2 )
coordMasterServers=( localhost 10.4.6.36 )
coordPorts=( 30001 30002 )
poolerPorts=( 30011 30012 )
coordMasterDirs=( $dataDirRoot/coord_master.1 $dataDirRoot/coord_master.2 )
coordMaxWALSenders=( 5 5 )
coordSlave=n
coordSlaveServers=( none none )
coordSlavePorts=( none none )
coordSlavePoolerPorts=( none none )
coordSlaveDirs=( none none )
coordArchLogDirs=( none none )
coordSpecificExtraConfig=( coordExtraConfig coordExtraConfig )
coordSpecificExtraPgHba=( none none )
datanodeNames=( dn1 dn2 )
datanodeMasterServers=( localhost 10.4.6.36 )
datanodePorts=( 40001 40002 )
datanodePoolerPorts=( 40011 40012 )
datanodeMasterDirs=( $dataDirRoot/dn_master.1 $dataDirRoot/dn_master.2 )
datanodeMasterWALDirs=( none none )
datanodeMaxWALSenders=( 5 5 )
datanodeSpecificExtraConfig=( datanodeExtraConfig datanodeExtraConfig )
datanodeSpecificExtraPgHba=( none none )
最佳答案
你能告诉我们你的配置吗?
max_connections
和 max_pool_size
是多少? initdb
为您的内核显示了什么?我的猜测是,当您添加 datanode2 (dn2) 时,您没有足够的连接数。
你有:
cluster includes 5 nodes, 1 GTM, 2 Coordinator and 2 Datanodes. The following are the details of nodes.
Postgres-xl 特定的:max_pool_size=300
max_coordinators=2
max_datanodes=2
如果是协调器(最小设置):max_connections=100
#从应用程序接受的连接数max_prepared_transactions = 100
# 与连接数相同
如果是Datanode(最小设置):max_connections=200
# 2 个协调器max_prepared_transactions=2
#指定至少集群中协调器的总数。
摘自 Postgres(-xl) 文档
Determines the maximum number of concurrent connections to the database server. The default is typically 100 connections, but might be less if your kernel settings will not support it (as determined during initdb). This parameter can only be set at server start.
When running a standby server, you must set this parameter to the same or higher value than on the master server. Otherwise, queries will not be allowed in the standby server.
In the case of the Coordinator, this parameter determines how many connections can each Coordinator accept.
In the case of the Datanode, number of connection to each Datanode may become as large as max_connections multiplied by the number of Coordinators.
Specify the maximum connection pool of the Coordinator to Datanodes. Because each transaction can be involved by all the Datanodes, this parameter should at least be max_connections multiplied by number of Datanodes.
编辑 - 用于更新问题配置
试试这个:
协调员
max_connections=100
max_pool_size=300
Datanode(你定义了 2 个 datanode)
max_connections=200
max_pool_size=500
关于postgresql - psql : FATAL: Could not obtain a transaction ID from GTM. GTM 可能失败或失去连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48764201/
几周前,我将我的 Google 标签管理器容器迁移到 GTM v2(Android 和 iOS)。自从我这样做以来,我一直无法设置任何移动分析实验。 我已将容器连接到分析 View ,并在创建实验时选
我遇到了问题,我似乎无法找到解决方法。情况如下营销部门想整合GTM。这很好,因为他们希望完全控制他们希望集成的不同第三方提供商。但是为了实现这一点,他们希望能够跟踪页面上的所有点击。 他们告诉我,目前
我想创建一个postgres-xl 集群。该集群包括 5 个节点、1 个 GTM、2 个 Coordinator 和 2 个 Datanode。以下是节点的详细信息 GTM: hostname=l
我正在客户网站上实现 Google 跟踪代码管理器脚本。 我遇到了一个随机问题:dataLayer 没有获得它的 gtm.dom 和 gtm.load 对象。它只有两个对象,一个包含我正在传递的一堆变
这是我在这个网站上的第一个问题,我很好奇是否有人可以帮助我。在 Google 跟踪代码管理器中,我尝试使用一些 jQuery 设置自定义 JavaScript 变量,该变量应返回特定数组中所有产品价格
我在我的 chrome 扩展页面中添加了这个 gtm 代码(由内容脚本和 iframe 注入(inject)) // (function(w,d,s,l,i){w[l]=w[l]||[];w[l].
在 GTM 中编写一个小的自定义 javascript 宏以在单击出站链接时设置类别值。大多数内部链接都是相对 URL。 function(){ var eventCat = ""; if({{ele
我在任何地方都找不到这个问题的答案。我正在尝试在 Google 跟踪代码管理器中设置触发器和事件标记,以便在内容存在时触发。本质上,我正在 Google Analytics 中为产品 View 创建一
坐在一个我正忙着标记的网站上,上面有这个凌乱的小面包屑...... li class="home" itemprop="itemListElem
我的目标是在 Firebase Analytics 中获取应用数据,在 Google Universal Analytics 中获取其他自定义数据和应用数据。 我的问题是我是否在我的应用上安装 Fir
GTM 已启动并正在运行,主 UA 标记与 ClickListener 标记一起就位。 为了减少宏的数量,我使用 dataLayer 变量宏来表示事件类别、操作、标签、值和交互,因此它们可以用于许多规
为什么我的 GA View 中没有任何数据?编译 'com.google.android.gms:play-services-location:9.4.0' 所有写入/复制都像手册中一样(https:
我正在尝试跟踪使用 GTM 单击按钮后出现的元素,但使用元素可见性触发器根本不会触发。我为一些点击设置了 GTM,它运行良好,但我对这个可见性触发器感到困惑。我尝试切换 Observe DOM cha
我正在尝试在 GTM 中设置一个悬停事件标记,而不对页面上的代码进行任何更改,因此纯粹是通过 GTM。 我尝试使用 GTM Hover Recipe来自 Bounteous,但我似乎无法触发自定义事件
我有Pageview Google 标签管理器中跟踪 SPA 页面浏览量的标签,与 this guide 中描述的标签相同.基本上它是 Universal Analytics 与在 History C
在网站 GTM 实现中,您可以使用 javascript 创建自己的自定义标签,因此只需使用 GTM 界面即可轻松设置对您自己的系统的 Web 服务调用等。 现在对于 Firebase - GTM 实
我正在尝试发送 screen-view hits至Google Analytics使用 Google Tag Manager ,但在实时 View 中,屏幕名称值显示为 (not set) .实际的屏
我目前有一个带有相关文章元素的表单,该元素在填写表单主题时建议用户相关文章。 我正在 try catch 单击相关文章的所有表单提交。 我创建了 2 个触发器和 2 个标签: 一旦用户点击其中一篇相关
我正在根据 google documentation 实现购买跟踪. 我对购买标签配置有一个小问题。 如果我使用提供的配置创建标签: Tag type : Universal Analytics Tr
我使用 Google 标签管理器已经有几个星期了。最近我有一个特殊的要求,我还没有找到答案。是否有可能多个容器共享同一个数据层?在两个容器的Js代码中,我试图给datalayer一个同名:结果比较出人
我是一名优秀的程序员,十分优秀!