Mobicents Media Server failed to bind

600 views Asked by At

I am running Mobicents Media Server and Restcomm in Oracle VirtualBox on the local machine. While making a call to 1234 I am getting following error.

2015-06-24 14:47:50,231 INFO  [MGCP] (Thread-2) tx=147483653 Started, message= CRCX mobicents/bridge/[email protected]:2427, call agent = /192.168.1.122:2727
2015-06-24 14:47:50,238 INFO  [UdpManager] (Thread-1) Failed trying to bind 192.168.1.122:65534
2015-06-24 14:47:50,244 INFO  [RtpConnectionImpl] (Thread-1) FormatsRTPFormats{0 AudioFormat[PCMU,8000,8,mono],8 AudioFormat[PCMA,8000,8,mono],101 AudioFormat[telephone-event,8000,mono],93 AudioFormat[Speex,16000,mono]}
2015-06-24 14:47:50,256 INFO  [MGCP] (Thread-2) tx=147483653 was executed normaly
2015-06-24 14:47:50,414 INFO  [MGCP] (Thread-1) tx=147483654 Started, message= CRCX mobicents/bridge/[email protected]:2427, call agent = /192.168.1.122:2727
2015-06-24 14:47:50,425 INFO  [MGCP] (Thread-2) tx=147483654 was executed normaly
2015-06-24 14:47:50,433 INFO  [MGCP] (Thread-1) tx=147483655 Started, message= MDCX mobicents/ivr/[email protected]:2427, call agent = /192.168.1.122:2727
2015-06-24 14:47:50,447 INFO  [MGCP] (Thread-1) tx=147483655 was executed normaly
2015-06-24 14:47:50,533 INFO  [MGCP] (Thread-1) tx=147483656 Started, message= RQNT mobicents/ivr/[email protected]:2427, call agent = /192.168.1.122:2727
2015-06-24 14:47:50,557 INFO  [Play] (Thread-1) (mobicents/ivr/1) Start announcement (segment=0)
2015-06-24 14:47:50,598 ERROR [AudioPlayerImpl] (Thread-1) (mobicents/ivr/1) error occured
java.io.FileNotFoundException: http://192.168.1.122:8080/restcomm/cache/ACae6e420f425248d6a26948c17a9e2acf/c5fd1f13812a7d11cd9072b5a7c1d3455265a5724094920f929f4feb941c1061.wav
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1624)
    at java.net.URL.openStream(URL.java:1037)
    at org.mobicents.media.server.impl.resource.mediaplayer.audio.wav.WavTrackImpl.(WavTrackImpl.java:74)
    at org.mobicents.media.server.impl.resource.mediaplayer.audio.AudioPlayerImpl.setURL(AudioPlayerImpl.java:150)
    at org.mobicents.media.server.mgcp.pkg.au.Play.startAnnouncementPhase(Play.java:116)
    at org.mobicents.media.server.mgcp.pkg.au.Play.execute(Play.java:109)
    at org.mobicents.media.server.mgcp.controller.Request.execute(Request.java:142)
    at org.mobicents.media.server.mgcp.tx.cmd.NotificationRequestCmd$Executor.perform(NotificationRequestCmd.java:213)
    at org.mobicents.media.server.scheduler.Task.run(Task.java:122)
    at org.mobicents.media.server.scheduler.Scheduler$WorkerThread.run(Scheduler.java:420)
2015-06-24 14:47:50,599 INFO  [Play] (Thread-1) Received URL can not be found , firing of
2015-06-24 14:47:50,603 INFO  [MGCP] (Thread-1) tx=147483656 was executed normaly
2015-06-24 14:47:50,873 INFO  [JitterBuffer] (Thread-2) Format has been changed: 0 AudioFormat[pcmu,8000,8,mono]
2015-06-24 14:47:58,193 INFO  [MGCP] (Thread-1) tx=147483657 Started, message= DLCX mobicents/bridge/[email protected]:2427, call agent = /192.168.1.122:2727

The restcomm.conf is as follows:

# Network configuration
NET_INTERFACE=eth0
PRIVATE_IP=192.168.1.122
SUBNET_MASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST_ADDRESS=192.168.1.255
# PUBLIC IP ADDRESS
STATIC_ADDRESS=192.168.1.122

The media server configuration is as follows:

<!-- Network interfaces definition -->
    <bean name="localhost" class="org.mobicents.media.server.io.network.UdpManager">
        <constructor>
            <parameter><inject bean="Scheduler"/></parameter>
        </constructor>
        <property name="bindAddress">192.168.1.122</property>
        <property name="localBindAddress">192.168.1.122</property>
        <property name="localNetwork">192.168.1.0</property>
        <property name="localSubnet">255.255.255.0</property>
        <property name="useSbc">true</property>
        <property name="rtpTimeout">0</property>
    </bean>

The restcomm.xml configuration is,

<!-- The location where the audio prompts are located. -->
        <prompts-uri>http://192.168.1.122:8080/restcomm/audio</prompts-uri>

        <!-- Cache settings. -->
        <cache-path>${restcomm:home}/cache</cache-path>
        <cache-uri>http://192.168.1.122:8080/restcomm/cache</cache-uri>


        <!-- The path where recordings made by the <Record> verb are stored. -->
        <recordings-path>file://${restcomm:home}/recordings</recordings-path>
        <recordings-uri>http://192.168.1.122:8080/restcomm/recordings</recordings-uri>

        <!-- The URL to the errors dictionary. -->
        <error-dictionary-uri>http://192.168.1.122:8080/restcomm/errors</error-dictionary-uri>

        <!-- The IP to use for out-bound SIP REGISTER requests. This is useful
            when you want to report a different IP than the one RestComm picked by default. -->
        <external-ip>192.168.1.122</external-ip>
1

There are 1 answers

32
GeorgeVagenas On
  1. Please check if the cache file exists: $RESTCOMM_HOME/standalone/deployments/restcomm.war/cache/ACae6e420f425248d6a26948c17a9e2acf/c5fd1f13812a7d11cd9072b5a7c1d3455265a5724094920f929f4feb941c1061.wav
  2. Check that Restcomm binds to 192.168.1.122:8080
  3. Check that no firewall is blocking 192.168.1.122:8080

Even though the logs from MMS you provided is a very small subset of the actual logs for this calls, I believe that the problem is that local port 65534 is not free.

INFO [UdpManager] (Thread-2) Failed trying to bind 192.168.226.245:65534

At this point MMS is trying to bind the RTP port 65534 at the 192.168.226.245.

I suggest you stop Restcomm/MMS - run ps -ef | grep java to make sure that Restcomm/MMS actually stopped -, then start again and check with netstat -anp | grep 65534 if the port is busy and what is the process that has this port.

If this doesn't help, please provide pcap file (tcpdump -i any -w YOUR_FILE.pcap) and complete Restcomm and MMS log files (make sure you remove old logs before the test call).

George