Jboss Distributed Transaction Recovery

472 views Asked by At

I am following the following instructions at this link: https://github.com/jboss-developer/jboss-eap-quickstarts/tree/7.3.x/jts.

I am using JBoss-Server-EAP-7.3.0

I followed the instructions and set up postgresql.

Now when I try to run my jboss using following command $ {jbossHomeName}/bin/standalone.bat --server-config=standalone-full-ha.xml -Djboss.tx.node.id=UNIQUE_NODE_ID_1

I did not know how to use Djboss.tx.node.id, so i passed it a values as shown in above command.

I get the following error in 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

Now if i run the following command, standalone.bat --server-config=standalone-full-ha.xml without Djboss.tx.node.id=UNIQUE_NODE_ID_1, I still get the same error.

I googled but did not find any useful information.

JBAS010153: Node identifier property is set to the default value. Please make sure it is unique

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

Apart from these links, I have googled a new of link, but not able to solve this problem.

How to get rid of this error, and how to use Djboss.tx.node.id argument while running jboss in distributed environment.

I made a minor change to standalone-full-ha.xml, but reverted the change. But even after reverting the changes, I still get the same error.

Please guide.

Thanks.

1

There are 1 answers

0
Naresh Chaurasia On

If you replace the command
standalone.bat --server-config=standalone-full-ha.xml -Djboss.tx.node.id=UNIQUE_NODE_ID_1
with
standalone.bat -c standalone-full.xml -Djboss.tx.node.id=UNIQUE_NODE_ID_1 it works fine.

Basically I have replaced standalone-full-ha.xml file with standalone-full.xml file.

Bases upon my understanding, I will try to answer this. If you check out this link: https://access.redhat.com/documentation/en-us/jboss_enterprise_application_platform/6.3/html/administration_and_configuration_guide/sect-configuration_files

It clearly mentions about the use of two xml files:

standalone-full.xml

This is an example configuration for a standalone server. It includes support for every possible subsystem except for those required for high availability.

standalone-full-ha.xml

This is an example configuration for a standalone server. It includes support for every possible subsystem, including those required for high availability.

As you can see standalone-full-ha.xml has support for high availability, and standalone-full.xml does not have support for high availability.

By making use of -Djboss.tx.node.id=UNIQUE_NODE_ID_1, I am trying to setup cluster/high availability explicitly and therefore I need to make use of standalone-full.xml.