标签: cluster-computing

Docker容器集群中的Elasticsearch

我想在2个不同的主机上运行2个ElasticSeach实例.我已经基于Ubuntu 14.04和elasticsearch的1.3.2版本构建了我自己的docker镜像.如果我在1个主机上运行2个ES'容器,则每个实例都会看到另一个实例并且可以进行通信,但是当我在2个不同的主机上运行2个ES实例时,它无效.容器的9300端口绑定到9300主机的端口.

我的问题是:可以用我的配置创建一个ES'集群吗?

最诚挚的问候,Lucas Rival

cluster-computing elasticsearch docker

21
推荐指数
3
解决办法
2万
查看次数

如何通知Glassfish 3.1集群中的所有(相同)Singleton bean?

我有一个在Glassfish 3.1.2集群上运行的JEE6应用程序.一个@Singleton Bean包含某种(readolny)缓存.用户可以按下GUI中的按钮,用数据库中的(更新的)内容更新缓存.

这在非集群环境中运行良好,但现在我们需要切换到集群.

所以我面临的问题是,当用户按下该更新按钮时,只更新其服务器节点中的Cache Singleton.我的问题是,让其他Singletons(在其他节点中)更新数据的最简单方法是什么?

我知道群集环境中的Singleton问题,但我的问题是针对Glassfish的(因为我希望有一些内置支持),另一个是用"Websphere"进行分类.我的问题是关于JEE6,另一个比JEE6旧.

java synchronization glassfish cluster-computing java-ee

20
推荐指数
2
解决办法
2837
查看次数

分布式系统中的故障转移有哪些算法?

我打算使用无共享架构多版本并发控制来创建分布式数据库系统.冗余将通过异步复制实现(只要系统中的数据保持一致,就可以在发生故障时丢失一些最近的更改).对于每个数据库条目,一个节点具有主副本(仅该节点具有对其的写访问权),此外,一个或多个节点具有该条目的辅助副本以用于可伸缩性和冗余目的(辅助副本是只读的) .更新条目的主副本时,它会加上时间戳并异步发送到具有辅助副本的节点,以便最终获得最新版本的条目.具有主副本的节点可以随时更改 - 如果另一个节点需要写入该条目,它将请求主副本的当前所有者为该节点提供该条目的主副本的所有权,

最近我一直在考虑当集群中的节点发生故障时该怎么做,以及用于故障转移的策略.这是一些问题.我希望你能知道至少其中一些的可用替代品.

  • 在分布式系统中进行故障转移有哪些算法?
  • 在分布式系统中有哪些算法可以达成共识?
  • 群集中的节点应如何确定节点已关闭?
  • 如何在发生故障时节点确定哪些数据库条目在故障节点上具有主副本,以便其他节点可以恢复这些条目?
  • 如何确定哪个节点具有某些条目的最新辅助副本?
  • 如何确定应将哪个节点的辅助副本提升为新的主副本?
  • 怎么处理它,如果那个虽然要关闭的节点突然回来,好像什么也没发生?
  • 如何避免裂脑情况,网络暂时分成两部分,双方都认为对方已经死亡?

database algorithm failover distributed cluster-computing

19
推荐指数
3
解决办法
4238
查看次数

ORA-01654:无法扩展索引

召集所有Oracle大师!

我正在将经过良好测试的应用程序集群到WebSphere上.有问题的应用程序使得在发生这种情况之前从队列中处理1k个JMS消息的过程中有一半.

---- Begin backtrace for Nested Throwables
java.sql.SQLException: ORA-01654: unable to extend index DABUAT.INDEX1 by 128 in tablespace DABUAT_TBLSP

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
Run Code Online (Sandbox Code Playgroud)

我已经在网上快速浏览了一下,并找到了一些可能的建议,为什么会发生这种情况,如果有人能够清楚地解释为什么现在我的应用程序已被集群化,我将非常感激.

关心卡尔

java oracle cluster-computing

19
推荐指数
1
解决办法
5万
查看次数

使用cluster.fork()调试Node.js进程

我有一些代码看起来非常像http://nodejs.org/docs/v0.6.0/api/cluster.html上的集群文档中的示例,即:

var cluster = require('cluster');
var server = require('./mycustomserver');
var numCPUs = require('os').cpus().length;

if (cluster.isMaster) {
  var i;
  // Master process
  for (i = 0; i < numCPUs; i++) {
    cluster.fork();
  }
  cluster.on('death', function (worker) {
    console.log('Worker ' + worker.pid + ' died');
  });
} else {
  // Worker process
  server.createServer({port: 80}, function(err, result) {
    if (err) {
      throw err;
    } else {
      console.log('Thread listening on port ' + result.port);
    }
  });
}
Run Code Online (Sandbox Code Playgroud)

我安装了node-inspector并尝试使用它和https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger中详细介绍的Eclipse V8插件来调试我的应用程序,但是看起来我无法将调试器挂钩到分叉集群实例以将断点放在有趣的服务器逻辑上 - …

debugging fork cluster-computing node.js

19
推荐指数
3
解决办法
6767
查看次数

Nodejs应用程序错误:使用pm2部署时绑定EADDRINUSE

使用pm2部署Express应用程序

数据库是mongodb

使用命令运行app时:

NODE_ENV=production pm2 start app.js -i max

aften有错误:绑定EADDRINUSE,这是日志,当出错时,

[app err (l0)] js:1073:26
[app err (l1)]     at Object.30:1 (cluster.js:587:5)
[app err (l2)]     at handleResponse (cluster.js:171:41)
[app err (l3)]     at respond (cluster.js:192:5)
[app err (l4)]     at handleMessage (cluster.js:202:5)
[app err (l5)]     at process.EventEmitter.emit (events.js:117:20)
[app err (l6)]     at handleMessage (child_process.js:318:10)
[app err (l7)]     at child_process.js:392:7
[app err (l8)]     at process.handleConversion.net.Native.got (child_process.js:91:7)Error: bind EADDRINUSE
[app err (l9)]     at errnoException (net.js:901:11)
[app err (l10)]     at net.js:1073:26
[app err (l11)]     at …
Run Code Online (Sandbox Code Playgroud)

deployment cluster-computing mongodb node.js express

19
推荐指数
2
解决办法
3万
查看次数

Tomcat的群集/会话复制无法正确复制

我正在本地计算机上的Tomcat 7上设置群集/复制,以评估它是否与我的环境/代码库一起使用.

建立

我在不同端口上运行的兄弟目录中有两个相同的tomcat服务器.我有httpd侦听其他两个端口并连接到两个tomcat实例作为VirtualHosts.我可以在配置的端口上访问和交互两个环境; 一切都按预期工作.

tomcat服务器在server.xml中启用了这样的集群:

   <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
             channelSendOptions="8">

      <Manager className="org.apache.catalina.ha.session.DeltaManager"
               expireSessionsOnShutdown="false"
               notifyListenersOnReplication="true"/>

      <Channel className="org.apache.catalina.tribes.group.GroupChannel">
        <Membership className="org.apache.catalina.tribes.membership.McastService"
                    address="228.0.0.4"
                    port="45564"
                    frequency="500"
                    dropTime="3000"/>
        <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                  address="auto"
                  port="4001"
                  autoBind="100"
                  selectorTimeout="5000"
                  maxThreads="6"/>

        <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
          <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
        </Sender>
        <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
        <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
      </Channel>

      <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
             filter=""/>
      <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>

      <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
                tempDir="/tmp/war-temp/"
                deployDir="/tmp/war-deploy/"
                watchDir="/tmp/war-listen/"
                watchEnabled="false"/>

      <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
      <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
   </Cluster>
Run Code Online (Sandbox Code Playgroud)

我将distributable标记添加到web.xml的最开头:

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  version="3.0">
  <distributable />

  (lots more...)

</web-app>
Run Code Online (Sandbox Code Playgroud)

什么工作

当服务器启动时,它们会记录

Sep 16, 2013 1:44:23 PM org.apache.catalina.ha.tcp.SimpleTcpCluster startInternal
INFO: Cluster is about to …
Run Code Online (Sandbox Code Playgroud)

java tomcat session-replication cluster-computing

19
推荐指数
2
解决办法
3万
查看次数

如何使用降雪和多个Windows节点为R中的并行处理设置工作人员?

我已成功使用降雪在具有16个处理器的单个服务器上设置群集.

require(snowfall)
if (sfIsRunning() == TRUE) sfStop()

number.of.cpus <- 15
sfInit(parallel = TRUE, cpus = number.of.cpus)
stopifnot( sfCpus() == number.of.cpus )
stopifnot( sfParallel() == TRUE )

# Print the hostname for each cluster member
sayhello <- function()
{
    info <- Sys.info()[c("nodename", "machine")]
    paste("Hello from", info[1], "with CPU type", info[2])
}
names <- sfClusterCall(sayhello)
print(unlist(names))
Run Code Online (Sandbox Code Playgroud)

现在,我正在寻找有关如何迁移到分布式模型的完整说明.我有4台不同的Windows机器,总共16个核心,我想用于16节点集群.到目前为止,我了解到我可以手动设置SOCK连接或利用MPI.虽然看起来有可能,但我还没有找到明确和完整的方向.

SOCK路由似乎依赖于snowlib脚本中的代码.我可以使用以下代码从主端生成存根:

winOptions <-
    list(host="172.01.01.03",
         rscript="C:/Program Files/R/R-2.7.1/bin/Rscript.exe",
         snowlib="C:/Rlibs")

cl <- makeCluster(c(rep(list(winOptions), 2)), type = "SOCK", manual = T)
Run Code Online (Sandbox Code Playgroud)

它产生以下结果:

Manually start worker on …
Run Code Online (Sandbox Code Playgroud)

windows parallel-processing r cluster-computing snowfall

19
推荐指数
1
解决办法
1325
查看次数

AttributeError: 'Graph' 对象没有属性 'node'

我有以下 python 代码来构建 knn 图,但我有一个错误:AttributeError: 'Graph' object has no attribute 'node'。似乎 nx.Graph() 没有节点属性,但我不知道我应该用它替换什么。

import networkx as nx
def knn_graph(df, k, verbose=False):
    points = [p[1:] for p in df.itertuples()]
    g = nx.Graph()
    if verbose: print ("Building kNN graph (k = %d)" % (k))
    iterpoints = tqdm(enumerate(points), total=len(points)) if verbose else enumerate(points)
    for i, p in iterpoints:
        distances = map(lambda x: euclidean_distance(p, x), points)
        closests = np.argsort(distances)[1:k+1] # second trough kth closest
        for c in closests:
            g.add_edge(i, c, weight=distances[c])
        g.node[i]['pos'] = p …
Run Code Online (Sandbox Code Playgroud)

python graph cluster-computing knn networkx

19
推荐指数
1
解决办法
2万
查看次数

Websphere Cluster中的群集范围单例

我需要在WAS ND 8.0集群下使用Apache Camel(或Spring Integration)运行组件.它们都在启动时运行一些线程,并在正常关闭时停止它们.提供WAS托管的线程池没问题.但是这些线程必须同时在单个集群的节点上运行.此外,它必须是高可用的,即当活动节点下降时切换到其他节点.

我找到的解决方案 - 是WAS Partitioning Facility.它需要额外的扩展部署许可证.这是唯一的方法,还是只有一些方法可以使用Network Deployment许可证来实现这一点?

提前致谢.

websphere singleton cluster-computing apache-camel spring-integration

18
推荐指数
1
解决办法
1358
查看次数