JBossTS 4.9.0.GA in AS trunk - Multiple instances on same system fail to boot
jaikiran Dec 16, 2009 6:28 AMThe recent upgrade of JBossTS to 4.9.0.GA in AS trunk is showing up an issue in EJB3 Dev build environment where multiple AS instances can no longer be booted on the same system. Here's the exception being thrown while booting a second instance (while the first is running) on the same system:
18:53:50,805 DEBUG [loggerI18N] [com.arjuna.ats.jbossatx.jta.RecoveryManagerService.create] JBossTS Recovery Service (tag: JBOSSTS_4_9_0_GA) - JBoss Inc. 18:53:50,853 DEBUG [arjLoggerI18N] [com.arjuna.ats.internal.arjuna.recovery.RecActivatorLoader_6] - Start RecoveryActivators 18:53:50,910 DEBUG [arjLoggerI18N] [com.arjuna.ats.arjuna.recovery.TransactionStatusManager_1] - Starting service com.arjuna.ats.arjuna.recovery.ActionStatusService on port 4713 18:53:50,923 ERROR [AbstractKernelController] Error installing to Create: name=RecoveryManager state=Configured: com.arjuna.ats.arjuna.exceptions.FatalError: [com.arjuna.ats.internal.arjuna.utils.SocketProcessId_2] - SocketProcessId.getpid could not get unique port. at com.arjuna.ats.internal.arjuna.utils.SocketProcessId.<init>(SocketProcessId.java:85) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at com.arjuna.ats.arjuna.utils.Utility.initDefaultProcess(Utility.java:366) at com.arjuna.ats.arjuna.utils.Utility.getProcess(Utility.java:380) at com.arjuna.ats.arjuna.utils.Utility.getpid(Utility.java:312) at com.arjuna.ats.arjuna.common.Uid.<init>(Uid.java:118) at com.arjuna.ats.arjuna.utils.Utility.initProcessUid(Utility.java:333) at com.arjuna.ats.arjuna.utils.Utility.getProcessUid(Utility.java:324) at com.arjuna.ats.internal.arjuna.recovery.TransactionStatusManagerItem.<init>(TransactionStatusManagerItem.java:365) at
To rule out any environment issues, i tried to reproduce this locally and am seeing the same issue on my local setup with the current AS trunk. Here are the steps to reproduce this:
1) Checkout and build the current AS trunk
2) Start the first instance (binds to 127.0.0.1 and starts up the "default" config):
./run.sh
3) Afer the first one has started, start another instance with a different bind address (-b 127.0.0.2) and a different config ("all"):
./run.sh -b 127.0.0.2 -c all
You'll see the above exception when the second on is starting and the boot fails.
Although this exception itself is not something new, and has various JIRAs to address this (like https://jira.jboss.org/jira/browse/JBTM-412 and https://jira.jboss.org/jira/browse/JBTM-348), multiple instances on same system was working fine in 5.1.0, 6.0.0.M1 and even the AS trunk up until the JBossTS upgrade. So looks like something changed in this release.
Any ideas?