Help with Restcomm

528 views
Skip to first unread message

jason

unread,
Jan 31, 2013, 5:41:58 PM1/31/13
to mobicent...@googlegroups.com
I am trying to run restcomm "out of the box" and all I get are errors on the startup on a Windows machine.

When I unzip "apache-tomcat-6.0.33-restcomm-1.0.0.beta2.zip" on my PC and execute the startup.bat, I get the following error.

---
### The error may exist in file://C:\apps\apache-tomcat-6.0.33-restcomm-1.0.0\webapps\restcomm\/WEB-INF/sql/accounts.xml
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.net.UnknownHostException: C
---

The filename does not appear right because it appears to be unix-centric rather than platform agnostic.  How do I fix this?

Also, I should mention I get this further down the logs.

---
java.lang.RuntimeException: java.lang.RuntimeException: Failed to find a local port 2727 to bound stack
---

I am not sure it is related or not.

Additionally, I do not have "curl" command to "bind the demo application located @ http://127.0.0.1:8080/restcomm/demo/hello-world.xml to phone number 1234" according to the RestComm User Guide.

Anybody have ideas on these 3 issues?

Charles Roufay

unread,
Jan 31, 2013, 5:52:25 PM1/31/13
to mobicent...@googlegroups.com
Hi Jason,

Please see the link here, http://www.telestax.com/2013/01/31/restcomm-sip-tutorial-basic-usage-and-voice-dtmf/

The dtmf part will be added shortly


Regards


Charles
Telestax_Doc_Team



--
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-publ...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

jason

unread,
Feb 1, 2013, 1:51:36 PM2/1/13
to mobicent...@googlegroups.com
I tried the Tomcat version instead which was at the same location.

https://mobicents.ci.cloudbees.com/job/RestComm/lastSuccessfulBuild/artifact/restcomm-saas-tomcat-1.0.0.BETA2-SNAPSHOT.zip

It would not start up correctly.  I got the following error.

---
Jain Mgcp stack bound to IP /127.0.0.1 and UDP port 2727
Feb 1, 2013 12:04:47 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable org.apache.ibatis.exceptions.PersistenceException:
### Error building SqlSession.
### The error may exist in file://C:\apps\apache-tomcat-6-restcomm-1.0.0b2\webapps\restcomm\/WEB-INF/sql/accounts.xml

### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.net.UnknownHostException: C

---

I have nothing running on port 2727.  Despite this, I tried the curl command anyway and got this.

---
C:\apps\curl>curl -data "PhoneNumber=1234&VoiceUrl=http://127.0.0.1:8080/restcomm/demo/hello-world.xml&VoiceMethod=POST" http://ACae6e420f425248d6a26948c17a9e2acf:77f8c12cc7b8f842...@127.0.0.1:8080/restcomm/2012-04-24/Accounts/ACae6e420f425248d6a26948c17a9e2acf/IncomingPhoneNumbers.json
curl: (6) Could not resolve host: ûdata; Host not found
curl: (6) Could not resolve host: ôPhoneNumber=1234; No data record of requested type
'VoiceUrl' is not recognized as an internal or external command, operable program or batch file.
'VoiceMethod' is not recognized as an internal or external command, operable program or batch file.

---

Since this was not working out, I decided to try and follow the guide exactly and use JBoss as indicated.

First, mobicents-media-center was not very intelligent and said I did not have the jdk of java installed (which I did).  I had java 6 and 7 JRE and JDKs.  It got confused.  I had to hard code at the top of the startup.bat "set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_20" for my preferred choice.

I tried starting JBoss and got the following.

---
12:19:50,084 ERROR [AbstractKernelController] Error installing to Instantiated: name=AttachmentStore state=Described
java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]
        at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)
        at org.jboss.reflect.plugins.introspection.ReflectionUtils.newInstance(ReflectionUtils.java:153)

       
[snip]

Failed to boot JBoss:
java.lang.IllegalStateException: Incompletely deployed:

DEPLOYMENTS IN ERROR:
  Deployment "AttachmentStore" is in error due to: java.lang.IllegalArgumentExce
ption: Wrong arguments. new for target java.lang.reflect.Constructor expected=[j
ava.net.URI] actual=[java.io.File]

DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "ProfileServiceDeployer" is missing the following dependencies:
    Dependency "AttachmentStore" (should be in state "Installed", but is actually in state "**ERROR**")
  Deployment "ProfileServicePersistenceDeployer" is missing the following dependencies:
    Dependency "AttachmentStore" (should be in state "Installed", but is actually in state "**ERROR**")
  Deployment "ProfileService" is missing the following dependencies:
    Dependency "ProfileServiceDeployer" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.kernel:service=KernelController" (should be in state "Installed", but is actually in state "**ERROR**")
  Deployment "ProfileServiceBootstrap" is missing the following dependencies:
    Dependency "ProfileService" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.kernel:service=Kernel" (should be in state "Installed", but is actually in state "**ERROR**")

        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)
        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)
        at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:142)
        at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:450)
        at org.jboss.Main.boot(Main.java:221)
        at org.jboss.Main$1.run(Main.java:556)
        at java.lang.Thread.run(Unknown Source)
12:19:50,474 INFO  [ServerImpl] Runtime shutdown hook called, forceHalt: true
12:19:50,474 INFO  [ServerImpl] Shutdown complete
Shutdown complete
Halting VM

---

I presume that maybe it was using the default java JRE 7, so I update the run.bat of this to "set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_20" also.

I started it and got the following.

---
2013-02-01 12:30:45,823 INFO  [org.jboss.web.WebService] (main) Using RMI server codebase: http://127.0.0.1:8083/
2013-02-01 12:30:46,713 ERROR [org.jboss.naming.Naming] (main) Could not start on port 1099
java.net.BindException: Address already in use: JVM_Bind
---

I found that on port 1099 I have a security application called Checkpoint Mobile that cannot be terminated due to business reasons and cannot be reconfigured.

What do I do now?

Personally, I would like to get the Tomcat version to work.

All of this is very frustrating.

Charles Roufay

unread,
Feb 1, 2013, 2:05:54 PM2/1/13
to mobicent...@googlegroups.com
Hi Jason,

Let me give the tomcat version a try on windows and I'll get back to you.


Thanks for your patience.


Regards


Charles
Telestax_Doc_Team

jason

unread,
Feb 1, 2013, 2:09:56 PM2/1/13
to mobicent...@googlegroups.com
Ok.

As fyi, here it the context of restcomm when executing the failed curl command.

---
12:58:29,794 INFO  [WebAppResourceConfig] Scanning for root resource and provider classes in the Web app resource paths:
  /WEB-INF/lib
  /WEB-INF/classes
12:58:30,919 INFO  [ScanningResourceConfig] Root resource classes found:
  class org.mobicents.servlet.sip.restcomm.http.SmsMessagesJsonEndpoint
  class org.mobicents.servlet.sip.restcomm.http.RecordingsXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.AccountsJsonEndpoint
  class org.mobicents.servlet.sip.restcomm.http.OutgoingCallerIdsJsonEndpoint
  class org.mobicents.servlet.sip.restcomm.http.GatewaysJsonEndpoint
  class org.mobicents.servlet.sip.restcomm.http.NotificationsJsonEndpoint
  class org.mobicents.servlet.sip.restcomm.http.AnnouncementsJsonEndpoint
  class org.mobicents.servlet.sip.restcomm.http.NotificationsXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.IncomingPhoneNumbersJsonEndpoint

  class org.mobicents.servlet.sip.restcomm.http.GatewaysXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.AccountsXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.CallsXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.AnnouncementsXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.OutgoingCallerIdsXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.IncomingPhoneNumbersXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.TranscriptionsXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.RecordingsJsonEndpoint
  class org.mobicents.servlet.sip.restcomm.http.SmsMessagesXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.ClientsXmlEndpoint
  class org.mobicents.servlet.sip.restcomm.http.TranscriptionsJsonEndpoint
  class org.mobicents.servlet.sip.restcomm.http.CallsJsonEndpoint
  class org.mobicents.servlet.sip.restcomm.http.ClientsJsonEndpoint
12:58:30,919 INFO  [ScanningResourceConfig] No provider classes found.
12:58:30,981 INFO  [WebApplicationImpl] Initiating Jersey application, version 'Jersey: 1.13 06/29/2012 05:14 PM'
12:58:31,341 INFO  [ConvergedStandardSession] maxInactiveInterval = 1800
12:58:31,372 INFO  [AuthorizingRealm] No cache or cacheManager properties have been set.  Authorization cache cannot be obtained.

---


On Friday, February 1, 2013 1:05:54 PM UTC-6, Charles_Doc_Team wrote:
Hi Jason,

Let me give the tomcat version a try on windows and I'll get back to you.


Thanks for your patience.


Regards


Charles
Telestax_Doc_Team

On Fri, Feb 1, 2013 at 12:51 PM, jason <jason...@blueboxproject.com> wrote:
I tried the Tomcat version instead which was at the same location.

https://mobicents.ci.cloudbees.com/job/RestComm/lastSuccessfulBuild/artifact/restcomm-saas-tomcat-1.0.0.BETA2-SNAPSHOT.zip

It would not start up correctly.  I got the following error.

---
Jain Mgcp stack bound to IP /127.0.0.1 and UDP port 2727
Feb 1, 2013 12:04:47 PM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable org.apache.ibatis.exceptions.PersistenceException:
### Error building SqlSession.
### The error may exist in file://C:\apps\apache-tomcat-6-restcomm-1.0.0b2\webapps\restcomm\/WEB-INF/sql/accounts.xml

### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.net.UnknownHostException: C

---

I have nothing running on port 2727.  Despite this, I tried the curl command anyway and got this.

---

Thomas Quintana

unread,
Feb 1, 2013, 2:12:12 PM2/1/13
to mobicent...@googlegroups.com
Hi Jason,

I am currently adding a getting started sections for Windows users to the user guide. I apologize that I missed users of the Windows platform. I will have that before the end of the day and I will update this thread with a link to the new section in the user guide. Furthermore, over the weekend I will publish a blog article on how to build a simple IVR using the RestComm Java wrapper which I will publish on the TeleStax website.

Best Regards,
Thomas Quintana

Thomas Quintana

unread,
Feb 1, 2013, 2:17:10 PM2/1/13
to mobicent...@googlegroups.com
Hi Jason,

I didn't realize that Charles was already helping you. I will collaborate with him to make sure we get you in tip top shape as soon as possible.

Best Regards,
Thomas Quintana

jason

unread,
Feb 1, 2013, 2:50:06 PM2/1/13
to mobicent...@googlegroups.com
Yes, he is.

I should also mention that my end goal is to get this running with Eclipse.  I have had no problems with Mobicents (after "considerable" tweaking), but Restcomm appears to be a challenge.

Sebastian Rivas

unread,
Feb 4, 2013, 9:38:05 AM2/4/13
to mobicent...@googlegroups.com
Hello all,

I just wanted to say that I´m getting the same error on Windows OS and that I also look forward to work with restcomm over Eclipse. It will be nice if we can have some support. I managed to bind the JBOSS server to eclipse and succesfully tried out some of the sip-servlets examples, so clearly the problem is in the restcomm context. 

Kind Regards

Thomas Quintana

unread,
Feb 4, 2013, 11:45:39 AM2/4/13
to mobicent...@googlegroups.com
Hi Guys,

I apologize for the delay over super bowl weekend. I already wrote most of the Windows section for the user guide. I will wrap this up today and commit. I am adding a section for eclipse as well. It is my intention to make sure you guys get up and running as soon as possible.

Best Regards,
Thomas Quintana

Sebastian Rivas

unread,
Feb 4, 2013, 2:26:40 PM2/4/13
to mobicent...@googlegroups.com
Hey Thomas!

Thanks a lot for your quick response! For the meantime I was trying out the server on a Linux virtual machine and I am getting the same error again when I try to bind the phone number with the Curl command:


[[/restcomm]] StandardWrapper.Throwable
java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to javax.xml.bind.JAXBContext
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:147)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:289)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
        at com.sun.jersey.server.impl.wadl.WadlApplicationContextImpl.<init>(WadlApplicationContextImpl.java:92)
        at com.sun.jersey.server.impl.wadl.WadlFactory.init(WadlFactory.java:96)
        at com.sun.jersey.server.impl.application.RootResourceUriRules.initWadl(RootResourceUriRules.java:169)
        at com.sun.jersey.server.impl.application.RootResourceUriRules.<init>(RootResourceUriRules.java:106)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1300)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:163)
        at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:769)
        at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:765)
        at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:765)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:760)
        at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:489)
        at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:319)
        at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609)
        at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
        at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374)
        at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557)
        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
        at org.mobicents.servlet.sip.startup.SipStandardContextValve.invoke(SipStandardContextValve.java:254)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:662)

etc...


I´m not sure what is i´m doing wrong...

Thanks a lot!

Thomas Quintana

unread,
Feb 4, 2013, 3:51:03 PM2/4/13
to mobicent...@googlegroups.com
Hi Sebastian,

Which instructions are you using to get started on Linux? Are you using our binaries? Also make sure you use https://mobicents.ci.cloudbees.com/job/RestComm/lastSuccessfulBuild/artifact/restcomm-saas-tomcat-1.0.0.BETA2-SNAPSHOT.zip

Best Regards,
Thomas Quintana

Sebastian Rivas

unread,
Feb 4, 2013, 4:02:44 PM2/4/13
to mobicent...@googlegroups.com
I´m using the instructions that are in the restcomm pdf manual bundled in the release. And I downloaded the latest version of Restcomm 1.0.0 BETA2 from the website.

BTW, I was getting an error when I tried to run the server. The error was caused by the SAX parser and it is discussed here:

I fixed it by removing xercesImpl.jar from the lib folder, but I´m guessing that now I´m getting this other error because I might be missing that file...

any ideas??

Thomas Quintana

unread,
Feb 4, 2013, 4:23:34 PM2/4/13
to mobicent...@googlegroups.com
Okay this problem has been fixed in the nightly build which is the previous link I sent you. Can you please try with the nightly build and if you have a problem attach the log file so I can see where the issue may be.

Best Regards,
Thomas Quintana

Sebastian Rivas

unread,
Feb 5, 2013, 9:24:54 AM2/5/13
to mobicent...@googlegroups.com

Hi Thomas,


I downloaded the latest nightly build (Jboss btw, not the tomcat version you suggested because I look forward to use some jboss capabilities). The previous error was fixed and this time I managed to send the curl command correctly, obtaining the expected output on the terminal (In this step I had to deploy the jboss server in my local IP instead of the loopback to be able to send the curl command from my linux virtual machine because I couldn´t manage to send the command from windows. I don´t know if cURL for windows works correctly.)


Until now everything was fine, however, after I did the curl command I saw the following message in the server output log:


0:58:38,123 INFO  [AuthorizingRealm] No cache or cacheManager properties have been set.  Authorization cache cannot be obtained.



That seems to be indicating that the command didn´t work, but I tried to make the call anyway. The call was successfully received by the server and appropriately delivered to Rescomm, but I didn´t hear any response. I thought that maybe I should change the register address of the linephone account to my local IP instead of the default loopback (since, the server is not on the loopback anymore). I repeated the call and this time I got an error on the server output.


I will attach both logs so that you can inspect them. Both of them start just after I send the curl command.


Kind Regards,

Sebastian

log linphone from local IP.txt
log linphone from loopback.txt

Thomas Quintana

unread,
Feb 5, 2013, 10:04:04 AM2/5/13
to mobicent...@googlegroups.com
Hi Sebastian,

Please see my answers inline.

Best Regards,
Thomas Quintana

On Tue, Feb 5, 2013 at 9:24 AM, Sebastian Rivas <sebas...@gmail.com> wrote:

Hi Thomas,


I downloaded the latest nightly build (Jboss btw, not the tomcat version you suggested because I look forward to use some jboss capabilities). The previous error was fixed and this time I managed to send the curl command correctly, obtaining the expected output on the terminal (In this step I had to deploy the jboss server in my local IP instead of the loopback to be able to send the curl command from my linux virtual machine because I couldn´t manage to send the command from windows. I don´t know if cURL for windows works correctly.)


Until now everything was fine, however, after I did the curl command I saw the following message in the server output log:


0:58:38,123 INFO  [AuthorizingRealm] No cache or cacheManager properties have been set.  Authorization cache cannot be obtained.


Don't worry about this message, it is not an error this is basically saying that Authorization requests are not being cached. This is useful when you have a high volume application an need to expedite Authorization to resources using a third-party cache.
 



That seems to be indicating that the command didn´t work, but I tried to make the call anyway. The call was successfully received by the server and appropriately delivered to Rescomm, but I didn´t hear any response. I thought that maybe I should change the register address of the linephone account to my local IP instead of the default loopback (since, the server is not on the loopback anymore). I repeated the call and this time I got an error on the server output.


A few community users have reported problems with tts-api which the default TTS engine in RestComm. Please open a demo account @ http://www.acapela-vaas.com. Then in the restcomm.xml file which is located @ RESTCOMM_HOME/WEB-INF/conf/restcomm.xml must be edited with your credentials. You will have to comment to TTS-API speech synthesizer and un-comment the Acapela plugin. If you need any more help please let me know and I will be glad to assist you.
Reply all
Reply to author
Forward
0 new messages