Jboss分布式事务恢复



我在此链接中遵循以下说明:https://github.com/jboss-developer/jboss-eap-quickstarts/tree/7.3.x/jts.

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

我按照说明设置了postgresql。

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

我不知道如何使用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_NODE_ID_1,我仍然会得到相同的错误。

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

JBAS010153:Node identifier属性设置为默认值。请确保它是唯一的

https://developer.jboss.org/message/880136#880136.

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

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

我对standalone-full-ha.xml做了一个小的更改,但又恢复了更改。但即使在恢复更改后,我仍然会得到相同的错误。

请引导。

谢谢。

如果将命令
standalone.bat --server-config=standalone-full-ha.xml -Djboss.tx.node.id=UNIQUE_NODE_ID_1
替换为
standalone.bat -c standalone-full.xml -Djboss.tx.node.id=UNIQUE_NODE_ID_1,效果良好。

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

根据我的理解,我将尽力回答这个问题。如果您查看此链接:https://access.redhat.com/documentation/en-us/jboss_enterprise_application_platform/6.3/html/administration_and_configuration_guide/sect-configuration_files

它清楚地提到了使用两个xml文件:

standalone-full.xml

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

standalone-full-ha.xml

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

正如您所看到的,standalone-full-ha.xml支持高可用性,而standalone-full.xml不支持高可用。

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

最新更新