-
1. Re: JBoss to JBoss remote calls
wdfink Nov 14, 2012 9:17 AM (in response to thorkummer)Hi Thor,
sorry for the late response, I did not see this. You might add 'quickstart ejb-multi-server' to the subject or ping me via community, github or mail
The reason for this is that you are using 7.1.1 and the project is uptodate for 7.2.
If you look at the github project readme there is a notice for 7.1 releases.
If you have the current version there are hints within the install-domain script what you have to delete to run the script for 7.1.1.
cheers
Wolf
-
2. Re: JBoss to JBoss remote calls
thorkummer Nov 21, 2012 8:15 AM (in response to wdfink)Hi Wolf-Dieter
I should have read the README. Well.
This time I get as far as deploying the apps:
12:09:19-tk@tk:~/workspace/jboss-as-quickstart/ejb-multi-server ejb-multi-server> ~/bin/jboss71/bin/jboss-cli.sh --connect --file=deploy-domain.cli
#1 deploy app-one/ear/target/appone.ear --server-groups=quickstart-ejb-multi-appOne-server
#2 deploy app-two/ear/target/apptwo.ear --server-groups=quickstart-ejb-multi-appTwo-server
#3 deploy app-main/ear/target/appmain.ear --server-groups=quickstart-ejb-multi-main-server
#4 deploy app-web/target/appweb.war --server-groups=quickstart-ejb-multi-appWeb-server
The script just hangs after #4 and the log shows
[Server:app-oneB] 12:11:05,438 ERROR [org.infinispan.transaction.tm.DummyTransaction] (pool-10-thread-1) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=[master:app-oneA/ejb, master:app-oneB/ejb], isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=1}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=1} org.infinispan.transaction.synchronization.SyncLocalTransaction@1} org.infinispan.transaction.synchronization.SynchronizationAdapter@20: org.infinispan.CacheException: org.jgroups.TimeoutException: timeout sending message to master:app-oneA/ejb
[Server:app-oneB] at org.infinispan.util.Util.rewrapAsCacheException(Util.java:524) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:168) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:478) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:148) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:169) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:219) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:206) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:201) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.transaction.AbstractEnlistmentAdapter.removeTransactionInfoRemotely(AbstractEnlistmentAdapter.java:81) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.transaction.AbstractEnlistmentAdapter.releaseLocksForCompletedTransaction(AbstractEnlistmentAdapter.java:73) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:94) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.transaction.tm.DummyTransaction.notifyAfterCompletion(DummyTransaction.java:272) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.transaction.tm.DummyTransaction.runCommitTx(DummyTransaction.java:321) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.transaction.tm.DummyTransaction.commit(DummyTransaction.java:90) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.transaction.tm.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:100) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.batch.BatchContainer.resolveTransaction(BatchContainer.java:123) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.batch.BatchContainer.endBatch(BatchContainer.java:105) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.batch.BatchContainer.endBatch(BatchContainer.java:86) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.CacheImpl.endBatch(CacheImpl.java:580) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.AbstractDelegatingCache.endBatch(AbstractDelegatingCache.java:75) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.jboss.as.clustering.infinispan.invoker.BatchOperation.invoke(BatchOperation.java:26) [jboss-as-clustering-infinispan-7.1.1.Final.jar:7.1.1.Final]
[Server:app-oneB] at org.jboss.as.clustering.registry.RegistryService.invoke(RegistryService.java:255) [jboss-as-clustering-registry-7.1.1.Final.jar:7.1.1.Final]
[Server:app-oneB] at org.jboss.as.clustering.registry.RegistryService.refreshLocalEntry(RegistryService.java:146) [jboss-as-clustering-registry-7.1.1.Final.jar:7.1.1.Final]
[Server:app-oneB] at org.jboss.as.clustering.registry.RegistryService.start(RegistryService.java:132) [jboss-as-clustering-registry-7.1.1.Final.jar:7.1.1.Final]
[Server:app-oneB] at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:59) [jboss-as-clustering-common-7.1.1.Final.jar:7.1.1.Final]
[Server:app-oneB] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]
[Server:app-oneB] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]
[Server:app-oneB] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
[Server:app-oneB] Caused by: org.jgroups.TimeoutException: timeout sending message to master:app-oneA/ejb
[Server:app-oneB] at org.jgroups.blocks.MessageDispatcher.sendMessage(MessageDispatcher.java:360)
[Server:app-oneB] at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.processSingleCall(CommandAwareRpcDispatcher.java:263) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommand(CommandAwareRpcDispatcher.java:163) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
[Server:app-oneB] ... 26 more
[Server:app-oneB]
[Server:app-oneB] 12:11:05,485 INFO [org.jboss.ejb.client.ClusterContext] (ejb-client-cluster-node-connection-creation-3-thread-1) Added a new EJB receiver in cluster context ejb for node master:app-oneB. Total nodes in cluster context = 1
The whole JBoss console output is here attached.
The console output for install-domain.cli is here attached.
Noticed that attachments can be added when updating.
-
3. Re: JBoss to JBoss remote calls
wdfink Nov 21, 2012 8:31 AM (in response to thorkummer)It looks like that JGroups can not connect to app-oneA/ejb cache, right after detecting the other cluster member.
I've no (real) idea what can be the issue because you are using the local-loop interface.
You might deactivate the firewall and SELinux (if there is one).
Also you can re-start the domain after running the install script.
Are you able to try it with 7.1.3 or 7.2 builds?
-
4. Re: JBoss to JBoss remote calls
thorkummer Nov 21, 2012 10:27 AM (in response to wdfink)Are 7.1.3 and 7.2 already 'final'?
Update: I can see in the roadmap that 7.1.4 is Final but 7.2 is RC1. I'll take the change of trying to get 7.2 to work. I understand I have to compile it myself.
-
5. Re: JBoss to JBoss remote calls
wdfink Nov 21, 2012 10:27 AM (in response to thorkummer)AS7.1.2 and 7.1.3 are 'final' but not available as community downloads, it is only a tag in the git repository.
AS7.2 is current ALPHA1 and available via nightly builds.
-
6. Re: JBoss to JBoss remote calls
thorkummer Nov 21, 2012 10:33 AM (in response to wdfink)I see. I've read the roadmap wrong.
I'll give 7.1.3 a try then.
-
7. Re: JBoss to JBoss remote calls
thorkummer Nov 23, 2012 6:46 AM (in response to wdfink)I've build 7.1.3 but starting up ./domain.sh gives
Error booting the container: java.lang.NoSuchFieldError: ALIASES
The whole console output is below
10:47:37-tk@tk:~/workspace/jboss-as/build/target/jboss-as-7.1.3.Final/bin 7.1.3.Final.tk> ./domain.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/tk/workspace/jboss-as/build/target/jboss-as-7.1.3.Final
JAVA: /usr/lib/jvm/java-6-sun/bin/java
JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.domain.default.config=domain.xml -Djboss.host.default.config=host.xml
=========================================================================
11:00:11,790 INFO [org.jboss.modules] (main) JBoss Modules version 1.1.3.GA
11:00:11,972 INFO [org.jboss.as.process.Host Controller.status] (main) JBAS012017: Starting process 'Host Controller'
[Host Controller] 11:00:12,376 INFO [org.jboss.modules] (main) JBoss Modules version 1.1.3.GA
[Host Controller] 11:00:12,483 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.2.GA
[Host Controller] 11:00:12,560 INFO [org.jboss.as] (MSC service thread 1-7) JBAS015899: JBoss AS 7.1.3.Final "Arges" starting
[Host Controller] 11:00:13,043 INFO [org.xnio] (MSC service thread 1-8) XNIO Version 3.0.6.GA
[Host Controller] 11:00:13,048 INFO [org.xnio.nio] (MSC service thread 1-8) XNIO NIO Implementation Version 3.0.6.GA
[Host Controller] 11:00:13,052 INFO [org.jboss.as] (Controller Boot Thread) JBAS010902: Creating http management service using network interface (management) port (9990) securePort (-1)
[Host Controller] 11:00:13,057 INFO [org.jboss.remoting] (MSC service thread 1-8) JBoss Remoting version 3.2.8.SP1
[Host Controller] 11:00:13,116 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on 127.0.0.1:9999
[Host Controller] 11:00:13,706 INFO [org.jboss.as] (Controller Boot Thread) JBAS015964: Http management interface is not enabled
[Host Controller] 11:00:13,706 INFO [org.jboss.as] (Controller Boot Thread) JBAS015954: Admin console is not enabled
[Host Controller] 11:00:13,707 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.3.Final "Arges" (Host Controller) started in 1680ms - Started 11 of 11 services (0 services are passive or on-demand)
[Host Controller] 11:00:13,723 ERROR [org.jboss.as.controller] (Controller Boot Thread) JBAS014601: Error booting the container: java.lang.NoSuchFieldError: ALIASES
[Host Controller] at org.jboss.as.ejb3.subsystem.EJB3Subsystem12Parser.parseCache(EJB3Subsystem12Parser.java:918)
[Host Controller] at org.jboss.as.ejb3.subsystem.EJB3Subsystem12Parser.parseCaches(EJB3Subsystem12Parser.java:890)
[Host Controller] at org.jboss.as.ejb3.subsystem.EJB3Subsystem12Parser.readElement(EJB3Subsystem12Parser.java:319)
[Host Controller] at org.jboss.as.ejb3.subsystem.EJB3Subsystem13Parser.readElement(EJB3Subsystem13Parser.java:101)
[Host Controller] at org.jboss.as.ejb3.subsystem.EJB3Subsystem12Parser.readElement(EJB3Subsystem12Parser.java:312)
[Host Controller] at org.jboss.as.ejb3.subsystem.EJB3Subsystem12Parser.readElement(EJB3Subsystem12Parser.java:96)
[Host Controller] at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
[Host Controller] at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
[Host Controller] at org.jboss.as.host.controller.parsing.DomainXml.parseProfiles(DomainXml.java:735) [jboss-as-host-controller-7.1.3.Final.jar:7.1.3.Final]
[Host Controller] at org.jboss.as.host.controller.parsing.DomainXml.readDomainElement1_3(DomainXml.java:340) [jboss-as-host-controller-7.1.3.Final.jar:7.1.3.Final]
[Host Controller] at org.jboss.as.host.controller.parsing.DomainXml.readElement(DomainXml.java:130) [jboss-as-host-controller-7.1.3.Final.jar:7.1.3.Final]
[Host Controller] at org.jboss.as.host.controller.parsing.DomainXml.readElement(DomainXml.java:105) [jboss-as-host-controller-7.1.3.Final.jar:7.1.3.Final]
[Host Controller] at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
[Host Controller] at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
[Host Controller] at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:133) [jboss-as-controller-7.1.3.Final.jar:7.1.3.Final]
[Host Controller] at org.jboss.as.host.controller.DomainModelControllerService.boot(DomainModelControllerService.java:440) [jboss-as-host-controller-7.1.3.Final.jar:7.1.3.Final]
[Host Controller] at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:156) [jboss-as-controller-7.1.3.Final.jar:7.1.3.Final]
[Host Controller] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
[Host Controller]
[Host Controller] 11:00:13,738 INFO [org.jboss.as] (MSC service thread 1-8) JBAS015950: JBoss AS 7.1.3.Final "Arges" stopped in 25ms
Attached the console output for the complete build and run.
-
8. Re: JBoss to JBoss remote calls
nickarls Nov 23, 2012 7:12 AM (in response to thorkummer)Could you show how the ejb3 subsystem ended up looking in standalone.xml?
-
9. Re: JBoss to JBoss remote calls
wdfink Nov 23, 2012 8:12 AM (in response to thorkummer)Hi Thor,
looks like that you have done a wrong configuration for EJB3 subsystem in one of the profiles inside the domain.xml
-
10. Re: JBoss to JBoss remote calls
thorkummer Nov 23, 2012 11:13 AM (in response to wdfink)Hi Niclas, Wolf-Dieter
The previous error I got I assume is my failure to run mvn clean before running mvn install. I had run mvn install on master before which explains the missing class member (ALIASES).
Now I get much further. The AS runs without errors and the deployment of the apps appears to succeed. (I'm attaching the complete console output for both the server and the steps taken to build, deploy and invoke the apps.)
However, the step 'mvn exec:exec' fails with
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project jboss-as-ejb-multi-server: The parameters 'executable' for goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec are missing or invalid -> [Help 1]
The attached file multi-server-ejb-consol-output.txt contains all the details.
I can navigate to the page http://localhost:8080/multi-server-MainApp/ejbinvoke.jsf and click the buttons to invoke the EJBs.
However, that results in exceptions on the AS output. See the attached file jboss-as-7.1.3.Final-console-output.txt).
Attached files.
-
domain.xml 83.7 KB
-
domain.zip 272.0 KB
-
-
11. Re: JBoss to JBoss remote calls
wdfink Nov 23, 2012 1:01 PM (in response to thorkummer)I suppose you did not add the users correct and
mvn exec:exec is only available if you change the directory to 'client'
please read the README for further instructions
-
12. Re: JBoss to JBoss remote calls
thorkummer Nov 26, 2012 6:25 AM (in response to wdfink)I ran through the exercise again including builing a clean version of JBoss 7.1.3, adding the users building and installing the ejb-multi-server apps.
Invoking the local MainApp from the browser I still get the error :
[Server:app-main] 11:41:23,569 ERROR [org.jboss.remoting.remote.connection] (Remoting "master:app-main" read-1) JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
Here is the console output for defining the users:
11:07:45-tk@tk:~/workspace/jboss-as-quickstart/ejb-multi-server ejb-multi-server> $JBOSS_HOME/bin/add-user.sh -a -u quickuser -p quick-123 --silent
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a):
Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : quickuser
Password :
Re-enter Password :
About to add user 'quickuser' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'quickuser' to file '/home/tk/workspace/jboss-as/build/target/jboss-as-7.1.3.Final/standalone/configuration/mgmt-users.properties'
Added user 'quickuser' to file '/home/tk/workspace/jboss-as/build/target/jboss-as-7.1.3.Final/domain/configuration/mgmt-users.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="cXVpY2stMTIz" />
11:09:13-tk@tk:~/workspace/jboss-as-quickstart/ejb-multi-server ejb-multi-server> $JBOSS_HOME/bin/add-user.sh
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a):
Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : quickuser1
Password :
Re-enter Password :
About to add user 'quickuser1' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'quickuser1' to file '/home/tk/workspace/jboss-as/build/target/jboss-as-7.1.3.Final/standalone/configuration/mgmt-users.properties'
Added user 'quickuser1' to file '/home/tk/workspace/jboss-as/build/target/jboss-as-7.1.3.Final/domain/configuration/mgmt-users.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="cXVpY2sxMjMr" />
11:14:20-tk@tk:~/workspace/jboss-as-quickstart/ejb-multi-server ejb-multi-server> $JBOSS_HOME/bin/add-user.sh
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a):
Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : quickuser2
Password :
Re-enter Password :
About to add user 'quickuser2' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'quickuser2' to file '/home/tk/workspace/jboss-as/build/target/jboss-as-7.1.3.Final/standalone/configuration/mgmt-users.properties'
Added user 'quickuser2' to file '/home/tk/workspace/jboss-as/build/target/jboss-as-7.1.3.Final/domain/configuration/mgmt-users.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="cXVpY2srMTIz" />
By base64-decoding the secret values I can verify that the passwords are correctly entered.
Quickstart readme Console
--------------------- -----------------------------------------
user name password user name secret decoded secret
---------- --------- ---------- ------------ --------------
quickuser quick-123 quickuser cXVpY2stMTIz quick-123
quickuser1 quick123+ quickuser1 cXVpY2sxMjMr quick123+
quickuser2 quick+123 quickuser2 cXVpY2srMTIz quick+123
(Oddly, the secret value for the first user is nowhere to be found in the configuration xml files or in the install-domain.cli file.)
I also tried to restart the AS in case the user definitions weren't dynamically realized.
I've attached the console output for the AS server and the ejb-multi-server exercise as well as the 'domain' configuration files.
-
configuration.zip 51.6 KB
-
console-jboss-as.txt.zip 24.0 KB
-
-
13. Re: JBoss to JBoss remote calls
wdfink Nov 26, 2012 7:50 AM (in response to thorkummer)Hi Thor,
as the README (or other documentation) describe, the user must be add to the ApplicationRealm.
From what I saw in the console output you add the user to the ManagementRealm which is only for the Management Interface.
Please add the User to the ApplicationRealm and try again. A restart of the server is not necessary.
Wolf
-
14. Re: JBoss to JBoss remote calls
thorkummer Nov 27, 2012 3:59 AM (in response to wdfink)Hi Wolf-Dieter
That was appearantly the problem, both with getting the ejb-multi-server demo and my own standalone configuration to run.
I had defined a management user rather than application user in both cases.
Thanks for the help.
Regards
Thor