问题描述
我在此链接上遵循以下说明: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
我不知道如何使用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
,我仍然会遇到相同的错误。
我用Google搜索,但是没有找到任何有用的信息。
JBAS010153: Node identifier property is set to the default value. Please make sure it is unique
https://developer.jboss.org/message/880136#880136。
除了这些链接之外,我在Google上搜索了一个新的链接,但无法解决此问题。
如何消除此错误,以及在分布式环境中运行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-ha.xml
文件替换为standalone-full.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
。