rayo / rayo-server

Rayo Server - A high performance awesomeness server
http://www.rayo.org
Apache License 2.0
43 stars 4 forks source link

Java NPE in Rayo b238 #25

Open bklang opened 12 years ago

bklang commented 12 years ago

We just deployed Rayo b238 and copied in the moho-dialect-prism.jar to get the Rayo app to function. The calls do come in to PRISM and the application sends an <answer/> which hangs for approximately 30 seconds. After that time the following NPE is written to sipmethod.log:

2012-11-01 19:56:21.320 WARN  [udp/0.0.0.0/5060-t-4] Exception when stopping call record
java.lang.NullPointerException
    at com.voxeo.moho.sip.SIPCallImpl.destroyNetworkConnection(SIPCallImpl.java:993)
    at com.voxeo.moho.sip.SIPCallImpl.terminate(SIPCallImpl.java:825)
    at com.voxeo.moho.sip.SIPCallImpl.disconnect(SIPCallImpl.java:784)
    at com.voxeo.moho.sip.ClearResourceSessionListener.sessionDestroyed(ClearResourceSessionListener.java:24)
    at com.micromethod.sipmethod.server.container.impl.ApplicationSupport.handleEvent(ApplicationSupport.java:239)
    at com.micromethod.sipmethod.server.container.impl.ApplicationImpl.handleEvent(ApplicationImpl.java:622)
    at com.micromethod.sipmethod.server.sip.session.SipSessionImpl.invalidate(SipSessionImpl.java:366)
    at com.micromethod.sipmethod.server.sip.session.SipSessionImpl.processInvalidationWhenReady(SipSessionImpl.java:428)
    at com.micromethod.sipmethod.server.sip.session.SipApplicationSessionImpl.processSipSessionInvalidationWhenReady(SipApplicationSessionImpl.java:331)
    at com.micromethod.sipmethod.server.sip.session.SipSessionImpl.processInvalidationWhenReady(SipSessionImpl.java:1712)
    at com.micromethod.sipmethod.server.sip.session.ApplicationSelectionLayer.in(ApplicationSelectionLayer.java:239)
    at com.micromethod.sipmethod.server.sip.impl.ResolverLayer.in(ResolverLayer.java:44)
    at com.micromethod.sipmethod.server.sip.transaction.TransactionManagementLayer.in(TransactionManagementLayer.java:149)
    at com.micromethod.sipmethod.server.sip.impl.NetworkManagementLayer.in(NetworkManagementLayer.java:91)
    at com.micromethod.sipmethod.server.sip.impl.SIPServiceImpl._handle(SIPServiceImpl.java:742)
    at com.micromethod.sipmethod.server.sip.interceptor.SipInterceptorChainImpl.invokeNextPreService(SipInterceptorChainImpl.java:42)
    at com.micromethod.sipmethod.server.sip.interceptor.SipInterceptorSupport.preService(SipInterceptorSupport.java:19)
    at com.micromethod.sipmethod.server.sip.interceptor.SipInterceptorChainImpl.invokeNextPreService(SipInterceptorChainImpl.java:36)
    at com.micromethod.sipmethod.server.sip.interceptor.SipInterceptorPipelineImpl.preInvokeService(SipInterceptorPipelineImpl.java:24)
    at com.micromethod.sipmethod.server.sip.impl.SIPServiceImpl.handle(SIPServiceImpl.java:542)
    at com.micromethod.sipmethod.server.connector.message.impl.MessageConnectorImpl.handle(MessageConnectorImpl.java:73)
    at com.micromethod.sipmethod.server.connector.message.impl.udp.SipUdpQueueConnection.recv(SipUdpQueueConnection.java:95)
    at com.micromethod.sipmethod.server.connector.message.impl.udp.SipUdpQueueConnection.run(SipUdpQueueConnection.java:61)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

Full sipmethod.log at https://gist.github.com/7208faceb7dd78823bdc

Williezhu commented 12 years ago

Hi,

  1. Prism hangup the all because it didn't receive ACK from peer in 30s after send out 200OK. is prism behind a NAT firewall? I saw the Contact header in 200OK message is Contact: sip:10.1.118.3:5060;transport=udp can the client reach prism by using that IP?

    2 The NPE is a different problem. seems its because the dialect is not initialized correctly. can you attach the full log from prism start?

bklang commented 12 years ago

Full logs from PRISM start: https://gist.github.com/cbfabf77e9d0a2a22dcf

bklang commented 12 years ago

@Williezhu Re: #1, the client in this case is Phono running on the public gateway. Is this a NAT issue? 10.1.118.3 is our local IP of the PRISM server.

Williezhu commented 12 years ago

Hi For #1, can the phono gateway access 10.1.118.3? if it can't, it should be a NAT problem. you can fix that by configure NAT in sipmethod.xml as the following. <NetworkAccessPoint transport="udp" address="prism local address" port="5060" relayAddress="the public address" relayPort="5060"/>

For #2, the dialect class is not initialized correctly. have you copied both moho-api and prism-dialect in prism to rayo?

bklang commented 12 years ago

1) I'll fix the NAT issue, thanks. 2) I only copied prism-dialect JAR. I'll also try copying the moho-api JAR as well.

bklang commented 12 years ago

1) appears to be resolved, thanks. 2) I copied three files: moho-impl-0.8.jar, moho-api-0.8.jar and moho-prism-dialect.jar from /opt/voxeo/prism/shared/lib to /opt/voxeo/prism/apps/rayo/WEB-INF/lib. The NPE went away but now I'm getting this:

2012-11-06 21:27:41.165 ERROR [pool-11-thread-4] Exception while processing command
java.lang.AbstractMethodError: com.voxeo.prism.moho.PrismDialect.enableDetectorPromptCompleteEvent(Ljavax/media/mscontrol/Parameters;Z)V
    at com.voxeo.moho.media.GenericMediaService.detectSignal(GenericMediaService.java:603)
    at com.voxeo.moho.media.GenericMediaService.internaOutput(GenericMediaService.java:371)
    at com.voxeo.moho.media.GenericMediaService.prompt(GenericMediaService.java:394)
    at com.voxeo.moho.media.GenericMediaService.input(GenericMediaService.java:224)
    at com.voxeo.moho.CallImpl.input(CallImpl.java:124)
    at com.rayo.server.verb.InputHandler.start(InputHandler.java:74)
    at com.rayo.server.AbstractActor.verb(AbstractActor.java:134)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.rayo.server.ReflectiveActor.onMessage(ReflectiveActor.java:71)
    at org.jetlang.channels.ChannelSubscription$1.run(ChannelSubscription.java:31)
    at org.jetlang.core.BatchExecutorImpl.execute(BatchExecutorImpl.java:11)
    at org.jetlang.fibers.PoolFiber.flush(PoolFiber.java:63)
    at org.jetlang.fibers.PoolFiber.access$000(PoolFiber.java:19)
    at org.jetlang.fibers.PoolFiber$1.run(PoolFiber.java:36)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Full logs: https://gist.github.com/8158877ffaae13c6b3ba

Williezhu commented 12 years ago

What's the prism version are you using? seems it's still an old version. please use prism build after 2012/10/23. we make some change on 2012/10/23. jar will mismatch if you are using an old prism(build before 2012/10/23) and a new rayo(moho).

bklang commented 11 years ago

This turned out to be a case of JAR version mismatch between Rayo and PRISM. I've followed instructions from Jose to get the Rayo application working by copying some Moho JARs into the Rayo install. That part of the issue is closed.

Should I leave this ticket open to address the original NPE, or is that resolved as well?