Diameter MUX and RAs on JAIN SLEE 7.0.0

493 views
Skip to first unread message

Richard Good

unread,
Mar 1, 2017, 10:46:38 AM3/1/17
to mobicents-public
Hi

Big congratulations to the team on SLEE 7.0.0 release on Wildfly - this is a huge achievement.

I've been playing around with it and am battling to get the Diameter MUX and resource adaptors working.

I've tried the following:
Copied .../restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/extra/restcomm-diameter/modules/mux/main/restcomm-diameter-mux-1.7.0.139.jar to .../wildfly-10.1.0.Final/standalone/deployments
Copied .../restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/resources/diameter-base/diameter-restcomm-slee-ra-diameter-base-ra-DU-7.0.11.jar to .../wildfly-10.1.0.Final/standalone/deployments

The diameter MUX jar deploys fine but the base RA gives problems:
Caused by: java.lang.ClassNotFoundException: org.mobicents.diameter.stack.DiameterListener
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at org.mobicents.slee.container.component.deployment.classloading.URLClassLoaderDomainImpl.findClassLocallyLocked(URLClassLoaderDomainImpl.java:272)
        at org.mobicents.slee.container.component.deployment.classloading.URLClassLoaderDomainImpl.findClass(URLClassLoaderDomainImpl.java:241)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at org.mobicents.slee.container.component.deployment.classloading.URLClassLoaderDomainImpl.loadClass(URLClassLoaderDomainImpl.java:200)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 32 more

I also tried getting the MUX sar from: https://mobicents.ci.cloudbees.com/job/RestComm-jDiameter-1.x/lastStableBuild/artifact/release/restcomm-diameter-1.7.0.139.zip

And then starting with a fresh Wildfly installation just deploying the SAR folder:
cp -r .../restcomm-diameter/core/mux/restcomm-diameter-mux.sar/ .../wildfly-10.1.0.Final/standalone/deployments/
I also created restcomm-diameter-mux.sar.dodeploy in .../wildfly-10.1.0.Final/standalone/deployments/

This also gave issues:
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYPOJO0038: Exception while parsing POJO descriptor file: "/opt/JSLEE/wildfly-10.1.0.Final/standalone/deployments/restcomm-diameter-mux.sar/META-INF/jboss-beans.xml"

I found that the annotation tag in jboss-beans.xml is not supported in Wildfly (https://developer.jboss.org/thread/239694).

Has anyone managed to get the Diameter MUX and RAs working with the Wildfly release?  Apologies if I have missed the steps anywhere in the documentation.

Regards
Richard Good
Senior Manager: Applications & Services
Smile Communications Pty (Ltd)
Mobile: +27 (0) 72 389 8365
Skype: richard.a.good
richar...@smilecoms.com
www.smilecoms.com





This email is subject to the disclaimer of Smile Communications at http://www.smilecoms.com/home/email-disclaimer/

VT

unread,
Mar 2, 2017, 7:22:55 AM3/2/17
to mobicents-public
Hi Richard,

You must copy the restcomm-diameter-mux-1.7.0.139.jar (+ module.xml)  to .../wildfly-10.1.0.Final/modules/system/layers/base/org.mobicents.diameter.mux

But there also another modules which must be copied (and the configuration.xml must be updated). The best way is to use the extra\restcomm-diameter/build.xml

BR,
Vladimir

Sergey Lee

unread,
Mar 2, 2017, 12:05:47 PM3/2/17
to mobicents-public
Hi Richard!

Vladimir is right. The best way is to use the extra/restcomm-diameter/build.xml.
Diameter MUX for WildFly is used as module.
If you want to do it manually then you should copy all directories from extra/restcomm-diameter/modules to WildFly modules directory with path $JBOSS_HOME/modules/system/layers/base/org/restcomm/diameter.
Also you should to fix standalone.xml with adding <extension> and <subsystem> info (see details in build.xml).
Also you should to fix module.xml for SLEE container lib ($JBOSS_HOME/modules/system/layers/base/org/restcomm/slee/container/lib/main/module.xml). You should add to <dependencies> - <module name="org.restcomm.diameter" export="true"/>.
Then you can deploy Diameter RAs in standalone/deployments.

Thank you for testing. I am ready for replying and fixing bugs :)

Best regards,
Sergey Lee

Richard Good

unread,
Mar 3, 2017, 3:50:30 AM3/3/17
to mobicents-public
Thanks Sergey, Vladimir for the quick feedback. 

I used the build script in extras/restcomm-diameter as suggested on a clean wildfly installation but I still had a few issues.  I think I found the issues in the restcomm-diameter build file:
It looks like the build file was incorrectly copying the files to /modules/system/layers/base instead of /modules/system/layers/base/org/restcomm/diameter

I changed:
<copy overwrite="true" todir="${jboss.modules.path}">
to:
<copy overwrite="true" todir="${restcomm-diameter.path}">

And:
<!--<replacevalue><![CDATA[    <subsystem xmlns="urn:restcomm:diameter-mux:1.0">-->
<replacevalue><![CDATA[    <subsystem xmlns="urn:restcomm:diameter-mux:1.0"/>

The missing slash to close the subsystem tag meant the standalone.xml was not parsing correctly

Now I have the MUX running and listening on port 3868 but I still see these errors in the log file on startup:
2017-03-03 10:41:09,256 ERROR [org.mobicents.slee.container.deployment.jboss.DeploymentManager] (SLEE-InternalDeployer-thread-1) Failure invoking 'InstallDeployableUnitAction[file:/opt/
JSLEE/wildfly-10.1.0.Final/standalone/tmp/vfs/temp/temp53acf9e4c39c29a2/content-49277145e10553b2/content/]: javax.slee.management.DeploymentException: Failure encountered during deploy
process.
....
Caused by: java.lang.ClassNotFoundException: org.mobicents.diameter.stack.DiameterListener


Also if I follow Sergey's suggestion with this:
"Also you should to fix module.xml for SLEE container lib ($JBOSS_HOME/modules/system/layers/base/org/restcomm/slee/container/lib/main/module.xml). You should add to <dependencies> - <module name="org.restcomm.diameter" export="true"/>"
The container fails to start with the following errors:
2017-03-03 10:47:36,397 WARN  [org.jboss.modules] (main) Failed to define class org.jboss.as.server.jmx.PluggableMBeanServer in Module "org.jboss.as.server:main" from local module loade
r @1c2c22f3 (finder: local module finder @18e8568 (roots: /opt/JSLEE/wildfly-10.1.0.Final/modules,/opt/JSLEE/wildfly-10.1.0.Final/modules/system/layers/base)): org.jboss.modules.ModuleL
oadError: org.restcomm.diameter:main
...

I will continue to test and let you know if I make any further progress.

Regards








--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-public+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sergey Lee

unread,
Mar 6, 2017, 5:15:10 AM3/6/17
to mobicents-public
Thanks Richard for your feedback.

Try replace

<module name="org.restcomm.diameter" export="true"/>
on
<module name="org.restcomm.diameter.lib" export="true"/>

Best regards,
Sergey Lee
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Sergey Lee

unread,
Mar 6, 2017, 5:24:33 AM3/6/17
to mobicents-public
I have investigated more details and you should try also add Diameter MUX to SLEE container:
<module name="org.restcomm.diameter.mux" export="true"/>
And try without dependency

<module name="org.restcomm.diameter.lib" export="true"/>

BR

Sergey Lee

On Friday, March 3, 2017 at 10:50:30 AM UTC+2, Richard Good wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-publ...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Richard Good

unread,
Mar 9, 2017, 3:51:25 AM3/9/17
to mobicents-public
Hi Sergey

Thanks for the feedback. 

Diameter MUX, diameter base RA and other diameter RAs all run fine when I add:

<module name="org.restcomm.diameter.mux" export="true"/>
<module name="org.restcomm.diameter.lib" export="true"/>
to:
$JBOSS_HOME/modules/system/layers/base/org/restcomm/slee/container/lib/main/module.xml)

You need them both it seems- I had errors if I left either one out.

So I did the below modifications to the build file and now everything runs smoothly using the restcomm-diameter build.xml.

Should I log an issue or pull request for this?

I'll continue testing the applications, etc. over the next few weeks and give feedback as I progress.


root@ZAocs01:~/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/extra/restcomm-diameter# diff build.xml build_xml_original.xml
27c27

<                 <copy overwrite="true" todir="${restcomm-diameter.path}">
---

>         <copy overwrite="true" todir="${jboss.modules.path}">
42c42

<             <replacevalue><![CDATA[    <subsystem xmlns="urn:restcomm:diameter-mux:1.0"/>
---

>             <replacevalue><![CDATA[    <subsystem xmlns="urn:restcomm:diameter-mux:1.0">
46,51d45
<         <replace file="${jboss.home}/modules/system/layers/base/org/restcomm/slee/container/lib/main/module.xml">
<                         <replacetoken><![CDATA[</dependencies>]]></replacetoken>
<                         <replacevalue><![CDATA[<module name="org.restcomm.diameter.mux" export="true"/>

<             <module name="org.restcomm.diameter.lib" export="true"/>
<                         </dependencies>]]></replacevalue>
<                 </replace>
63c57
<             <replacetoken><![CDATA[<subsystem xmlns="urn:restcomm:diameter-mux:1.0"/>]]></replacetoken>
---
>             <replacetoken><![CDATA[<subsystem xmlns="urn:restcomm:diameter-mux:1.0">]]></replacetoken>
66,75d59
<
<         <replace file="${jboss.home}/modules/system/layers/base/org/restcomm/slee/container/lib/main/module.xml">
<                         <replacetoken><![CDATA[<module name="org.restcomm.diameter.mux" export="true"/>]]></replacetoken>
<                         <replacevalue><![CDATA[]]></replacevalue>
<                 </replace>
<
<                 <replace file="${jboss.home}/modules/system/layers/base/org/restcomm/slee/container/lib/main/module.xml">
<                         <replacetoken><![CDATA[<module name="org.restcomm.diameter.lib" export="true"/>]]></replacetoken>
<                         <replacevalue><![CDATA[]]></replacevalue>
<                 </replace>




To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-public+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

VT

unread,
Mar 10, 2017, 8:40:18 AM3/10/17
to mobicents-public

Just one more thing - when you want to use SCTP (Diameter or SS7) you must add <path name="com/sun/nio/sctp"/> in /modules/system/layers/base/sun/jdk/main/modules.xml

Richard Good

unread,
Apr 26, 2017, 6:02:54 AM4/26/17
to mobicents-public
Hi

I have been testing out SCTP on SLEE 7.0.0 - just in case anyone else is looking at this, here is the configuration I did to get SCTP working fine with Diameter MUX and SLEE 7.0.0

Added <path name="com/sun/nio/sctp"/> in /modules/system/layers/base/sun/jdk/main/modules.xml

Added following jars to modules/system/layers/base/org/restcomm/diameter/lib/main/module.xml (and put the jars in this folder)

<resource-root path="sctp-impl-2.0.0-SNAPSHOT.jar"/>
<resource-root path="sctp-api-2.0.0-SNAPSHOT.jar"/>
<resource-root path="javolution-5.5.1.jar"/>
<resource-root path="commons-1.0.0.CR1.jar"/>

Added <path name="com/sun/nio/sctp"/> in modules/system/layers/base/org/restcomm/diameter/lib/main/module.xml

Added <module name="io.netty"/> as a dependency in modules/system/layers/base/org/restcomm/diameter/lib/main/module.xml

Modified modules/system/layers/base/org/restcomm/diameter/lib/main/config/jdiameter-config.xml to use SCTP (instead of TCP)
<Connection value="org.jdiameter.client.impl.transport.sctp.SCTPClientConnection"/>
        <NetworkGuard value="org.jdiameter.server.impl.io.sctp.NetworkGuard"/>

And it all works fine so far.

Regards

Richard Good
Senior Manager: Applications & Services
Smile Communications Pty (Ltd)
Mobile: +27 (0) 72 389 8365
Skype: richard.a.good
richar...@smilecoms.com
www.smilecoms.com





On 10 March 2017 at 15:40, VT <tza...@kapsch.net> wrote:

Just one more thing - when you want to use SCTP (Diameter or SS7) you must add <path name="com/sun/nio/sctp"/> in /modules/system/layers/base/sun/jdk/main/modules.xml

--
You received this message because you are subscribed to the Google Groups "mobicents-public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobicents-public+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Good

unread,
May 11, 2017, 11:31:28 AM5/11/17
to mobicents-public
Hi again

Has anyone used jDiameter in clustered mode on SLEE 7.0.0?

I have modified jdiameter-config.xml to uncomment the extensions for clustering:

<Extensions>
    <SessionDatasource value="org.mobicents.diameter.impl.ha.data.ReplicatedSessionDatasource"/>
    <TimerFacility value="org.mobicents.diameter.impl.ha.timer.ReplicatedTimerFacilityImpl"/>
  </Extensions>

and am running with standalone-full-ha.xml configuration.

Everything is starting fine and I can see the nodes are joining the jgroup cluster view:
2017-05-11 17:18:43,666 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-2,ZApcrf01-15515) ISPN000094: Received new cluster view for channel ISPN: [ZAnode01-
15515|3] (2) [ZAnode01-15515, ZAnode02-6111]

If I test the Diameter state replication by sending a Gx CCR INIT with session ID XYZ to node01, killing node01, and then sending Gx CCR TERM with session ID XYZ to node02 - node02 does:
Error firing event.: java.lang.IllegalStateException

Implying that the Diameter state for session ID XYZ is not being replicated from from node01 to node02

Anyone else tried this and can give any pointers?

Regards

Richard Good

unread,
May 16, 2017, 10:56:30 AM5/16/17
to mobicents-public
Hi

We've made some minor progress with this.  Here are the steps we have done:
  • Used the infinispan XML configuration in org/restcomm/diameter/lib/main/config/jdiameter-infinispan.xml in standalone-full-ha.xml as the <cache-config> item in <subsystem xmlns="urn:restcomm:slee-container:3.0">
  • Added <module name="org.jboss.marshalling"/> as dependency in module.xml for org.restcomm.slee.container.lib and org.restcomm.diameter.extension (To avoid ClassNotFound exceptions).

However with this configuration whenever we startup a second node to join the cluster we get the following errors on the joining node:

2017-05-16 16:52:31,994 WARN  [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (Incoming-1,ZAnode02-28438) ISPN000220: Problems un-marshalling remote command from byte buffer: java.lang.NullPointerException
    at org.mobicents.slee.resource.ResourceAdaptorActivityContextHandleImpl.readExternal(ResourceAdaptorActivityContextHandleImpl.java:145)

ResourceAdaptorActivityContextHandleImpl.java:145 is:

this.raEntity = SleeContainer.lookupFromJndi().getResourceManagement().getResourceAdaptorEntity(raEntityName);

Has the jdiameter-infinispan configuration been successfully tested? If so what was the configuration?

Regards







Reply all
Reply to author
Forward
0 new messages