Jboss分布式事务恢复

Jboss分布式事务恢复,jboss,distributed-transactions,xa,failovercluster,Jboss,Distributed Transactions,Xa,Failovercluster,我在此链接上遵循以下说明: 我正在使用JBoss-Server-EAP-7.3.0 我按照说明设置了postgresql 现在,当我尝试使用以下命令运行jboss时,${jbossHomeName}/bin/standalone.bat--server config=standalone-full-ha.xml-Djboss.tx.node.id=UNIQUE\u node\u id\u 1 我不知道如何使用Djboss.tx.node.id,所以我向它传递了一个值,如上面的命令所示 我在ser

我在此链接上遵循以下说明:

我正在使用
JBoss-Server-EAP-7.3.0

我按照说明设置了postgresql

现在,当我尝试使用以下命令运行jboss时,
${jbossHomeName}/bin/standalone.bat--server config=standalone-full-ha.xml-Djboss.tx.node.id=UNIQUE\u node\u id\u 1

我不知道如何使用
Djboss.tx.node.id
,所以我向它传递了一个值,如上面的命令所示

我在server.log中发现以下错误:

2020-10-02 15:25:53,323 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 88) MSC000001: Failed to start service org.wildfly.clustering.jgroups.channel.ee: org.jboss.msc.service.StartException in service org.wildfly.clustering.jgroups.channel.ee: java.lang.IllegalStateException: java.lang.IllegalArgumentException: failed to start server socket
    at org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:70)
    at org.wildfly.clustering.service.AsyncServiceConfigurator$AsyncService.lambda$start$0(AsyncServiceConfigurator.java:117)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.lang.Thread.run(Thread.java:748)
    at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.IllegalStateException: java.lang.IllegalArgumentException: failed to start server socket
    at org.jboss.as.clustering.jgroups.subsystem.ChannelServiceConfigurator.get(ChannelServiceConfigurator.java:116)
    at org.jboss.as.clustering.jgroups.subsystem.ChannelServiceConfigurator.get(ChannelServiceConfigurator.java:58)
    at org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:67)
    ... 7 more
Caused by: java.lang.IllegalArgumentException: failed to start server socket
    at org.jgroups.protocols.FD_SOCK.down(FD_SOCK.java:339)
    at org.jgroups.protocols.FD_ALL.down(FD_ALL.java:235)
    at org.jgroups.protocols.VERIFY_SUSPECT.down(VERIFY_SUSPECT.java:102)
    at org.jgroups.protocols.pbcast.NAKACK2.down(NAKACK2.java:553)
    at org.jgroups.protocols.UNICAST3.down(UNICAST3.java:581)
    at org.jgroups.protocols.pbcast.STABLE.down(STABLE.java:347)
    at org.jgroups.protocols.pbcast.GMS.down(GMS.java:1037)
    at org.jgroups.protocols.FlowControl.down(FlowControl.java:295)
    at org.jgroups.protocols.FlowControl.down(FlowControl.java:295)
    at org.jgroups.protocols.FRAG3.down(FRAG3.java:135)
    at org.jgroups.protocols.FORK.down(FORK.java:109)
    at org.jgroups.stack.ProtocolStack.down(ProtocolStack.java:928)
    at org.jgroups.JChannel.down(JChannel.java:627)
    at org.jgroups.JChannel._connect(JChannel.java:855)
    at org.jgroups.JChannel.connect(JChannel.java:352)
    at org.jgroups.JChannel.connect(JChannel.java:343)
    at org.jboss.as.clustering.jgroups.subsystem.ChannelServiceConfigurator.get(ChannelServiceConfigurator.java:112)
    ... 9 more
Caused by: java.net.BindException: no port available in range [54200 .. 54250] (bind_addr=/127.0.0.1)
    at org.jgroups.util.Util.createServerSocket(Util.java:3498)
    at org.jgroups.protocols.FD_SOCK.startServerSocket(FD_SOCK.java:582)
    at org.jgroups.protocols.FD_SOCK.down(FD_SOCK.java:336)
    ... 25 more

2020-10-02 15:25:53,471 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "jgroups"),
    ("channel" => "ee")
]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.clustering.jgroups.channel.ee" => "java.lang.IllegalStateException: java.lang.IllegalArgumentException: failed to start server socket
    Caused by: java.lang.IllegalStateException: java.lang.IllegalArgumentException: failed to start server socket
    Caused by: java.lang.IllegalArgumentException: failed to start server socket
    Caused by: java.net.BindException: no port available in range [54200 .. 54250] (bind_addr=/127.0.0.1)"}}
2020-10-02 15:25:53,518 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service org.wildfly.clustering.jgroups.channel.ee: java.lang.IllegalStateException: java.lang.IllegalArgumentException: failed to start server socket
现在,如果我运行以下命令,
standalone.bat--server config=standalone full ha.xml
而不运行
Djboss.tx.node.id=UNIQUE\u node\u id\u 1
,我仍然会得到相同的错误

我在谷歌上搜索了一下,但没有找到任何有用的信息

除了这些链接外,我还在谷歌上搜索了一个新的链接,但无法解决这个问题

如何消除此错误,以及在分布式环境中运行jboss时如何使用
Djboss.tx.node.id
参数

我对独立完整ha.xml做了一个小改动,但恢复了改动。但即使恢复了更改,我仍然会得到相同的错误

请导游


谢谢。

如果您替换命令
standalone.bat--server config=standalone-full-ha.xml-Djboss.tx.node.id=UNIQUE\u node\u id\u 1


standalone.bat-c standalone-full.xml-Djboss.tx.node.id=UNIQUE\u node\u id\u 1
它工作正常

基本上,我已经用
standalone full.xml
文件替换了
standalone full.xml
文件

基于我的理解,我将尝试回答这个问题。如果您查看此链接:

它明确提到了两个xml文件的使用:

standalone full.xml

这是独立服务器的示例配置。它包括对除高可用性所需子系统之外的所有可能子系统的支持

独立完整ha.xml

这是独立服务器的示例配置。它包括对每个可能的子系统的支持,包括高可用性所需的子系统

如您所见,
standalone full ha.xml
支持高可用性,
standalone full.xml
不支持高可用性


通过使用
-Djboss.tx.node.id=UNIQUE\u node\u id\u 1
我试图显式地设置集群/高可用性,因此我需要使用
standalone full.xml

jboss.tx.node.id
只需要对集群中的每台服务器进行区分。您当前的问题是[54200..54250]范围内没有可用的端口。