glassfish 集群启动时失败

glassfish 集群启动时失败

我在尝试设置集群时遇到了问题。

我将描述详细的配置(因为我找不到在两台不同的电脑上制作的集群示例,所以它们都是在一个本地主机上制作的):

3 个 ubuntu 虚拟机:1 个域管理员和 2 个实例。

我在每个实例上安装(解压)了 1 个 glassfish 服务器并启动它们。然后我在域管理员上为每个服务器创建了一个 ssh 节点(也是 glassfish)

所以我有

节点1 192.168.193.134 SSH 节点
节点2 192.168.193.133 SSH 节点

均成功连接。

最后我通过命令行创建了集群,如下所示

:~$ asadmin 创建集群 clusterm
:~$ asadmin 创建实例 --node node1 --cluster clusterm inst1
:~$ asadmin 创建实例 --node node2 --cluster clusterm inst2

但是当我尝试启动集群(:~$ asadmin start-cluster clusterm)时,它失败并抛出此错误:

    remote failure: inst1: Could not start instance inst1 on node node1 (192.168.193.134).

    Command failed on node node1 (192.168.193.134): Previous synchronization failed at May 20, 2013 12:16:45 AM
    Will perform full synchronization.
    Removing all cached state for instance inst1.
    Command start-local-instance failed.
    CLI802 Synchronization failed for directory config, caused by:
      remote failure: Unknown server instance: inst1

    To complete this operation run the following command locally on host 192.168.193.134 from the GlassFish install location /opt/glassfish3:

     bin/asadmin  start-local-instance --node node1 --sync normal inst1
    inst2: Could not start instance inst2 on node node2 (192.168.193.133).

    Command failed on node node2 (192.168.193.133): Previous synchronization failed at May 20, 2013 12:18:09 AM
    Will perform full synchronization.
    Removing all cached state for instance inst2.
    CLI802 Synchronization failed for directory config, caused by:
      remote failure: Unknown server instance: inst2
    Command start-local-instance failed.

    To complete this operation run the following command locally on host 192.168.193.133 from the GlassFish install location /opt/glassfish3:

     bin/asadmin  start-local-instance --node node2 --sync normal inst2

    The command start-instance failed for: inst1 inst2 
    Command start-cluster failed.

感谢您帮助我弄清楚为什么会发生这种情况(或者我做错了什么)。

答案1

你必须跑

asadmin start-local-instance --node node2 --sync normal i1

然后您可以停止实例并再次运行集群。

答案2

我知道这是一篇老帖子,但我遇到了同样的问题并花了一些时间。

就我而言,我必须修改/路径/到/节点/代理/配置/das.properties每个节点的文件。

改变价值观应该可以解决问题

agent.das.port=das_port
agent.das.host=das_hostname

相关内容