HTTP Servlet RA on JAIN SLEE 7.0.0

266 views
Skip to first unread message

Richard Good

unread,
Apr 3, 2017, 8:29:31 AM4/3/17
to mobicents-public
Hi

I've made good progress with the Diameter MUX on SLEE 7.0.0.  Now I'm having some trouble with the HTTP Servlets RA. 

On SLEE 2.7.0 I had the following setup:
  • mobicents-slee-ra-http-servlet-common.jar, mobicents-slee-ra-http-servlet-DU-2.4.0.FINAL.jar,mobicents.war deployed to the deploy folder with default configuration
  • Resource adaptor and events added to sbb-jar.xml for any SBB that want to use this.
  • And then whenever someone sends to http://IP_ADDRESS:8080/mobicents the message is received for processing by the SBB.

In migrating this to SLEE 7.0.0 I have tried the following:

restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/resources/http-servlet/build.xml ->

This just copies http-servlet-common-7.0.13.jar, restcomm-slee-ra-http-servlet-DU-7.0.13.jar, restcomm.war to the deployments folder.

I don't think this is correct as it causes this error:

Caused by: org.jboss.modules.ModuleNotFoundException: org.restcomm.slee.resource.http.common:main

Next step I tried is:

Create a module org.restcomm.slee.resource.http.common with module.xml and include http-servlet-common-7.0.13.jar.  Also include this module as a dependency for slee/container/lib module.

This gets a bit further but now complains with:

Caused by: java.lang.ClassNotFoundException: HttpServletRaServlet from [Module "deployment.restcomm.war:main" from Service Module Loader]

So my questions are:

  1. Has anyone successfully used the HTTP Servlet RA with SLEE 7.0.0?  If so what was the deployment configuration?
  2. The default port and URL for the HTTP Servlet RA in SLEE 2.7.0 was http://IP_ADDRESS:8080/mobicents.  I see in 7.0.0. 8080 is used for the JMX console.  What is the default port for the HTTP RA?

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,
Apr 4, 2017, 8:41:55 AM4/4/17
to mobicents-public
Hi Richard,

Just add in the restcomm.war in WEB-INF folder a jboss-deployment-structure.xml with content:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
        <exclude-subsystems>
            <subsystem name="ejb3" />
        </exclude-subsystems>
   <dependencies>
            <module name="org.restcomm.slee.resource.http.common"/>
        </dependencies>
    </deployment>
</jboss-deployment-structure>

BR,
Vladimir

VT

unread,
Apr 4, 2017, 9:19:00 AM4/4/17
to mobicents-public
Regarding default port & URL - you should use  http://IP_ADDRESS:8080/restcomm


Richard Good

unread,
Apr 4, 2017, 9:28:53 AM4/4/17
to mobicents-public
Hi Vladimir

Thanks for the feedback.


Just add in the restcomm.war in WEB-INF folder a jboss-deployment-structure.xml with content:

The default HTTP RA provided with the SLEE 7.0.0 build already has this in the WEB_INF/jboss-deployment-structure.xml so that is already present. 

What I did try was:

I moved the restcomm.war from the deployment folder to the module folder .../modules/system/layers/base/org/restcomm/slee/resource/http/common/main/ and included it in the module.xml

This runs at least without the mentioned error.  But I'm guessing this is not correct and the only reason it is not throwing the error is because restcomm.war is no longer in deployments.

Regarding default port & URL - you should use  http://IP_ADDRESS:8080/restcomm
I guessed as much.  So far with my setup I have not managed to get the SBB to process any HTTP requests send to this URL.  Something lower down the stack is responding 404 not Found.

I will continue to experiment and investigate and keep you posted.

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 4 April 2017 at 15:18, VT <tza...@kapsch.net> wrote:
Regarding default port & URL - you should use  http://IP_ADDRESS:8080/restcomm


--
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.

VT

unread,
Apr 4, 2017, 11:57:56 AM4/4/17
to mobicents-public
Hi Richard,


Sorry, you have right. Unfortunately, we use a customized/own version of the HTTPSevletRA – and it’s working. 

The WAR file must be deployed in the deployment folder. The error  java.lang.ClassNotFoundException: HttpServletRaServlet from [Module "deployment.restcomm.war:main" from Service Module Loader] indicate that the restcomm.war cannot access the module with the http-servlet-common-7.0.13.jar. Is this jar file deployed under /modules/system/layers/base/org/restcomm/slee/resource/http/common/main?



BR

Richard Good

unread,
Apr 5, 2017, 3:46:25 AM4/5/17
to mobicents-public
Hi Vladimir

Understood that the WAR file must be in the deployment folder.    From the ClassNotFound error I assumed the same that restcomm.war could not access the HTTP commons module.

I have http-servlet-common-7.0.13.jar in modules/system/layers/base/org/restcomm/slee/resource/http/common/main with module.xml:

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="org.restcomm.slee.resource.http.common">
    <resources>
        <resource-root path="http-servlet-common-7.0.13.jar"/>
    </resources>

    <dependencies>
        <module name="javax.servlet.api" export="true"/>
        <module name="org.apache.log4j"/>
    </dependencies>
</module>

I have also added this module as a dependency on the SLEE container lib module by adding:
<module name="org.restcomm.slee.resource.http.common" export="true"/>
Under dependencies in:
modules/system/layers/base/org/restcomm/slee/container/lib/main/module.xml

I have also made the HTTP common module a global module by adding it under <global-modules> in standalone/configuration/standalone.xml (I don't think this is necessary but just in case).

But still getting the this error on startup:

2017-04-05 09:20:57,199 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./restcomm.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./restcomm.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: HttpServletRaServlet from [Module "deployment.restcomm.war:main" from Service Module Loader]
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:1079)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:284)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: HttpServletRaServlet from [Module "deployment.restcomm.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:723)
   ... 6 more


When I turned on a bit more debug logging I get this:
2017-04-05 09:33:49,368 DEBUG [org.jboss.as.ee] (MSC service thread 1-5) Configuring component class: HttpServletRaSessionListener named HttpServletRaSessionListener
2017-04-05 09:33:49,369 WARN  [org.jboss.as.ee] (MSC service thread 1-5) WFLYEE0007: Not installing optional component HttpServletRaSessionListener due to an exception (enable DEBUG log level to see the cause)
2017-04-05 09:33:49,370 DEBUG [org.jboss.as.ee] (MSC service thread 1-5) Not installing optional component HttpServletRaSessionListener due to an exception: java.lang.ClassNotFoundException: HttpServletRaSessionListener from [Module "deployment.restcomm.war:main" from Service Module Loader]


2017-04-05 09:33:49,372 DEBUG [org.jboss.as.ee] (MSC service thread 1-5) Configuring component class: HttpServletRaServlet named HttpServletRaServlet
2017-04-05 09:33:49,373 WARN  [org.jboss.as.ee] (MSC service thread 1-5) WFLYEE0007: Not installing optional component HttpServletRaServlet due to an exception (enable DEBUG log level to see the cause)
2017-04-05 09:33:49,373 DEBUG [org.jboss.as.ee] (MSC service thread 1-5) Not installing optional component HttpServletRaServlet due to an exception: java.lang.ClassNotFoundException: HttpServletRaServlet from [Module "deployment.restcomm.war:main" from Service Module Loader]

Even though the logs say this:
(enable DEBUG log level to see the cause)
I can't see much more info even though I've enabled all debug logging.

Investigation ongoing.

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





--
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.
Message has been deleted
Message has been deleted
Message has been deleted

VT

unread,
Apr 5, 2017, 7:13:02 AM4/5/17
to mobicents-public
Just set "org.jboss.modules" to TRACE

When I try the original restcomm SLEE & HTTP_Servlet RA I got the same ClassNotFoundException. The HttpServletRaSessionListener cannot be found in the module:

2017-04-05 13:01:04,007 TRACE [org.jboss.modules] (MSC service thread 1-1) Finding local class HttpServletRaSessionListener from Module "org.restcomm.slee.resource.http.common:main" from local module loader @4ae82894 (finder: local module finder @543788f3 (roots: /opt/kapsch/atlas/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules,/opt/kapsch/atlas/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules/system/layers/base))
2017-04-05 13:01:04,007 TRACE [org.jboss.modules] (MSC service thread 1-1) Loading class HttpServletRaSessionListener locally from Module "org.restcomm.slee.resource.http.common:main" from local module loader @4ae82894 (finder: local module finder @543788f3 (roots: /opt/kapsch/atlas/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules,/opt/kapsch/atlas/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules/system/layers/base))
2017-04-05 13:01:04,007 TRACE [org.jboss.modules] (MSC service thread 1-1) No local specification found for class HttpServletRaSessionListener in Module "org.restcomm.slee.resource.http.common:main" from local module loader @4ae82894 (finder: local module finder @543788f3 (roots: /opt/kapsch/atlas/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules,/opt/kapsch/atlas/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules/system/layers/base))




Richard Good

unread,
Apr 5, 2017, 7:26:05 AM4/5/17
to mobicents-public
Hi Vladimir

Thanks for the feedback - when I enable the trace logging as you've suggested I see exactly the same log lines you are referring to. 

Are you saying that you have the default restcomm.war (from restcomm-slee-7.0.63.64-wildfly-10.1.0.Final) deployed successfully and these warnings can be ignored?

My issue is that my restcomm.war fails to load:

2017-04-05 13:16:52,468 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "restcomm.wa
r")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./restcomm.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in servic
e jboss.undertow.deployment.default-server.default-host./restcomm.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: HttpServletRaServlet from [Module \"deployment.restcom

m.war:main\" from Service Module Loader]
    Caused by: java.lang.ClassNotFoundException: HttpServletRaServlet from [Module \"deployment.restcomm.war:main\" from Service Module Loader]"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./restcomm.UndertowDeploymentInfoService"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}

....

2017-04-05 13:16:52,489 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./restcomm.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./restcomm.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: HttpServletRaServlet from [Module "deployment.restcomm.war:main" from Service Module Loader]


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 5 April 2017 at 11:49, VT <tza...@kapsch.net> wrote:
Just set in standalone.xml 

    <logger category="org.jboss.as">
                <level name="TRACE"/>
            </logger>

When I try with the original restcomm SLEE & HTTP-Servlet I have the same error.

2017-04-05 11:31:28,212 WARN  [org.jboss.as.ee] (MSC service thread 1-5) WFLYEE0007: Not installing optional component HttpServletRaSessionListener due to an exception (enable DEBUG log level to see the cause)
2017-04-05 11:31:28,212 DEBUG [org.jboss.as.ee] (MSC service thread 1-5) Not installing optional component HttpServletRaSessionListener due to an exception: java.lang.ClassNotFoundException: HttpServletRaSessionListener from [Module "deployment.restcomm.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)

but 

2017-04-05 11:31:28,210 TRACE [org.jboss.modules] (MSC service thread 1-5) Finding local class HttpServletRaSessionListener from Module "org.restcomm.slee.resource.http.common:main" from local module loader @4ae82894 (finder: local module finder @543788f3 (roots: /opt/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules,/opt/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules/system/layers/base))
2017-04-05 11:31:28,210 TRACE [org.jboss.modules] (MSC service thread 1-5) Loading class HttpServletRaSessionListener locally from Module "org.restcomm.slee.resource.http.common:main" from local module loader @4ae82894 (finder: local module finder @543788f3 (roots: /opt/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules,/opt/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules/system/layers/base))
2017-04-05 11:31:28,210 TRACE [org.jboss.modules] (MSC service thread 1-5) No local specification found for class HttpServletRaSessionListener in Module "org.restcomm.slee.resource.http.common:main" from local module loader @4ae82894 (finder: local module finder @543788f3 (roots: /opt/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules,/opt/tmp/restcomm-slee-7.0.63.64-wildfly-10.1.0.Final/wildfly-10.1.0.Final/modules/system/layers/base))

I have no idea why the HttpServletRaSessionListener cannot be fopund in the module

--
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,
Apr 5, 2017, 7:40:07 AM4/5/17
to mobicents-public
Hi Vladmir

I have just re-read your emails and want to make sure I understand:

we use a customized/own version of the HTTPSevletRA – and it’s working.

Are you saying that with the default restcomm-slee-7.0.63.64-wildfly-10.1.0.Final bundled http-servlet jars and war you have the exactly the same problem as me and it is only working your with own version of HTTPServletRA?

If so I wonder if you can highlight any major differences between your customised version and the default one?

Regards

VT

unread,
Apr 5, 2017, 8:04:27 AM4/5/17
to mobicents-public
Hi Richard,

Yes, with the restcomm version I have the same problems and I have no idea, why the HttpServletRaSessionListener cannot be found in the module.

I can’t find any big differences between our version (cloned from 2.8.0) and the new restcomm. Only that previously it was org.mobicents and now it’s org.restcomm. But if you have an old working RA, you can try to reuse it – put the ra & war in deployment folder (put the jboss-deployment-structure.xml in the war/web-inf) and the common jar in the module (change the jar name in the module.xml).


I hope this works

Richard Good

unread,
Apr 5, 2017, 8:06:26 AM4/5/17
to mobicents-public
Hi

I managed to figure it out with a bit of guesswork :)

In resources/http-servlet/war/src/main/webapp/WEB-INF/web.xml the listener-class and servlet-class need to define the full classpath and not just the class name:

diff --git a/resources/http-servlet/war/src/main/webapp/WEB-INF/web.xml b/resources/http-servlet/war/src/main/webapp/WEB-INF/web.xml
index d80a73a..dd30211 100644
--- a/resources/http-servlet/war/src/main/webapp/WEB-INF/web.xml
+++ b/resources/http-servlet/war/src/main/webapp/WEB-INF/web.xml

@@ -9,13 +9,13 @@
        </welcome-file-list>
        <listener>
                <listener-class>
-                       HttpServletRaSessionListener
+                       org.restcomm.slee.resource.http.HttpServletRaSessionListener^M
                </listener-class>
        </listener>            
        <servlet>
                <servlet-name>${servlet-name}</servlet-name>
                <servlet-class>
-                       HttpServletRaServlet
+                       org.restcomm.slee.resource.http.HttpServletRaServlet^M
                </servlet-class>
         <init-param>
             <param-name>ra-entry-point-jndi-name</param-name>

With this change restcomm.jar deploys fine.

I will raise an issue for this as well as the build.xml not creating the module.

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





--
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 5, 2017, 11:57:42 AM5/5/17
to mobicents-public
Hi

I've got a further question on the HTTP RA.

For some reason on my latest installation the HTTP default RA binds to 127.0.0.1:8080 instead of the default public interface.

I've looked for somewhere to configure the listening IP in the configuration of:
  • restcomm.war
  • restcomm-slee-ra-http-servlet-DU-7.0.0-SNAPSHOT.jar
  • restcomm-slee-ra-http-servlet-common.jar
But can not find anywhere where I can specify the listening IP.

Does anyone know how to do this?

Regards

Alexandre Mendonça

unread,
May 5, 2017, 1:43:26 PM5/5/17
to Mobicents Public
Hi Richard,

Have you tried changing the bind interface for Wildfly, using the -b IP_ADDRESS parameter ? See more info regarding it at https://docs.jboss.org/author/display/WFLY10/Command+line+parameters#Commandlineparameters-bindaddress

Regards,

Richard Good

unread,
May 5, 2017, 2:17:55 PM5/5/17
to mobicents-public
Ahah of course that's it!   That's the only difference between my previous installation that works fine and this one.   Thanks very much for the quick solution.

Regards
Richard.
Reply all
Reply to author
Forward
0 new messages