powered by Jive Software

Asterisk-IM 1.4.0 on Openfire 3.4.3 busted?

I installed openfire 3.4.3 on a test server, then put asterisk-im 1.4.0 on it via the available plugins page. I added my asterisk server in, which didn’t light up green right away. I then restarted openfire, but now I can’t load the asterisk-im page in the console, it just hangs there, and sometimes I can’t even login to the admin console, it just hangs too. There seems to be a lot of data flowing constantly between my asterisk server and the openfire server, about 30 kbits sustained both ways, though there isn’t a lot of activity on the asterisk server right now. What’s going on??

What do you get in the logs?

What logs are you looking for specifically, not sure what to give you.

IN the error.log file I get a lot of this:

2008.01.09 00:29:24 org.jivesoftware.phone.PhonePlugin.isEnabled(PhonePlugin.java:277) Error starting or stoping Asterisk-IM

java.lang.InterruptedException

at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterrupti bly(Unknown Source)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibl y(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)

at java.util.concurrent.FutureTask.get(Unknown Source)

at org.jivesoftware.phone.PhonePlugin.isEnabled(PhonePlugin.java:274)

at org.jivesoftware.phone.jsp.phone_002dsettings_jsp._jspService(org.jivesoftware. phone.jsp.phone_002dsettings_jsp:142)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.jivesoftware.openfire.container.PluginServlet.handleJSP(PluginServlet.java: 228)

at org.jivesoftware.openfire.container.PluginServlet.service(PluginServlet.java:86 )

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1093)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:69)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:65)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:41)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:69)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollect ion.java:211)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:313)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.j ava:830)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

2008.01.09 00:29:24 org.jivesoftware.phone.PhonePlugin.destroy(PhonePlugin.java:144) Error unregistering component

java.lang.NullPointerException

at org.jivesoftware.phone.PhonePlugin.destroy(PhonePlugin.java:141)

at org.jivesoftware.phone.PhonePlugin.destroyPlugin(PhonePlugin.java:131)

at org.jivesoftware.openfire.container.PluginManager.shutdown(PluginManager.java:1 10)

at org.jivesoftware.openfire.XMPPServer.shutdownServer(XMPPServer.java:921)

at org.jivesoftware.openfire.XMPPServer.access$600(XMPPServer.java:92)

at org.jivesoftware.openfire.XMPPServer$ShutdownHookThread.run(XMPPServer.java:867 )

2008.01.09 00:29:24 org.jivesoftware.openfire.container.PluginManager.shutdown(PluginManager.java:11 3)

java.lang.NullPointerException

at org.jivesoftware.phone.PhonePlugin.destroy(PhonePlugin.java:147)

at org.jivesoftware.phone.PhonePlugin.destroyPlugin(PhonePlugin.java:131)

at org.jivesoftware.openfire.container.PluginManager.shutdown(PluginManager.java:1 10)

at org.jivesoftware.openfire.XMPPServer.shutdownServer(XMPPServer.java:921)

at org.jivesoftware.openfire.XMPPServer.access$600(XMPPServer.java:92)

at org.jivesoftware.openfire.XMPPServer$ShutdownHookThread.run(XMPPServer.java:867 )

Yes this indeed could be an incompatibility with Asterisk-IM and Openfire 3.4.3.

I did not yet upgrade to 3.4.3 so I didn’t encounter it yet. I’ve opened for this issue.

Thanks for looking into it.

Do you know an ETA on a fix or work around? I’m supposed to be deploying an upgrade to openfire 3.4.3 and tomorrow and need the asterisk presence data available.

Thanks again.

Sorry, I won’t be able to have a look at this before next week.

Any change in status with this issue?

With OPenfire 3.4.4 out now I’m wondering if anyone has validated that asterisk-im plugin works well with it?

For me it works well.

Ah, that’s great to hear. I have to test it out again, but if all is well I’m upgrading our corporate IM server to this latest version.

I’m having the same issue with openfire 3.4.4 and asterisk-im 1.4.0 now. The plugin page won’t load in the console, just sits there trying to load the page forever. Nothing works for the plugin at all. Basically, it’s the same as before with openfire 3.4.3.

I’m running on debian, and tried with sun jre 1.5 and 1.6.

This is what I get in the error.log:

2008.01.28 16:01:07 org.jivesoftware.phone.PhonePlugin.isEnabled(PhonePlugin.java:277) Error starting or stoping Asterisk-IM

java.lang.InterruptedException

at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterrupti bly(Unknown Source)

at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibl y(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)

at java.util.concurrent.FutureTask.get(Unknown Source)

at org.jivesoftware.phone.PhonePlugin.isEnabled(PhonePlugin.java:274)

at org.jivesoftware.phone.jsp.phone_002dsettings_jsp._jspService(org.jivesoftware. phone.jsp.phone_002dsettings_jsp:142)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.jivesoftware.openfire.container.PluginServlet.handleJSP(PluginServlet.java: 228)

at org.jivesoftware.openfire.container.PluginServlet.service(PluginServlet.java:86 )

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1093)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:69)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:65)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:41)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:69)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollect ion.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.j ava:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

2008.01.28 16:01:07 org.jivesoftware.phone.PhonePlugin.destroy(PhonePlugin.java:144) Error unregistering component

java.lang.NullPointerException

at org.jivesoftware.phone.PhonePlugin.destroy(PhonePlugin.java:141)

at org.jivesoftware.phone.PhonePlugin.destroyPlugin(PhonePlugin.java:131)

at org.jivesoftware.openfire.container.PluginManager.shutdown(PluginManager.java:1 10)

at org.jivesoftware.openfire.XMPPServer.shutdownServer(XMPPServer.java:921)

at org.jivesoftware.openfire.XMPPServer.access$600(XMPPServer.java:92)

at org.jivesoftware.openfire.XMPPServer$ShutdownHookThread.run(XMPPServer.java:867 )

2008.01.28 16:01:07 org.jivesoftware.openfire.container.PluginManager.shutdown(PluginManager.java:11 3)

java.lang.NullPointerException

at org.jivesoftware.phone.PhonePlugin.destroy(PhonePlugin.java:147)

at org.jivesoftware.phone.PhonePlugin.destroyPlugin(PhonePlugin.java:131)

at org.jivesoftware.openfire.container.PluginManager.shutdown(PluginManager.java:1 10)

at org.jivesoftware.openfire.XMPPServer.shutdownServer(XMPPServer.java:921)

at org.jivesoftware.openfire.XMPPServer.access$600(XMPPServer.java:92)

at org.jivesoftware.openfire.XMPPServer$ShutdownHookThread.run(XMPPServer.java:867 )

Hmm maybe this is not really the root cause. Could you enable full logging (including debug logs), clean the logs, start Openfire and send the complete zipped logs - maybe this gives me a point to start.

=Stefan

P.S. If you don’t want to post the logs in public you can also send them directly to me.

I’m seeing the same thing. I started with 3.4.2 that was in the Trixbox repo and now I’ve gone to 3.4.4 from the downloads here. The Asterisk-IM will activate and I see success authenticating at the PBX (same physical box) but I can’t get back to the tab, it just hangs. The server is then showing java and asterisk daemons eating the CPU until it finally becomes almost unrepsonsive. I have to remove the plugin or restart Openfire. I tried a few times in different ways but the same thing happens. What I’m hoping is that I can show presence of asterisk extensions in Spark even if the user is on a deskphone (at the extension I’ll map in the plugin)

Yes, this is exactly the same symptons I am encountering in my test environment.

I’m using openfire 3.4.4 on my production server now, but I have not installed the asterisk-im plugin.

I am really puzzled by this one. The logs do not reveal any useful hints, I am unable to reproduce it in my environments…

Any suggestions?

Yeah, the asterisk logs show sucess. But someting is then loading the server(s) perhaps a loop?

In my case the server is small (1.6MHz, 512M) and is running both asterisk and openfire. However normally the load is minimal as we’re rather small and performance is never a problem until I try to start the plugin.

Could you run ngrep on the box to see what Asterisk and Openfire are talking about?

http://blogs.reucon.com/asterisk-java/2006/08/23/1156297380000.html

Odd but I get no output using ngrep other than:

ngrep -s 1500 port 5038 -T

interface: eth0 (192.168.20.0/255.255.255.0)

filter: (ip) and ( port 5038 )

The * full log will give me this:

logger.c: == Parsing ‘/etc/asterisk/manager.conf’: VERBOSE[9177] logger.c: Found

logger.c: == Parsing ‘/etc/asterisk/manager_additional.conf’: VERBOSE[9177] logger.c: Found

logger.c: == Parsing ‘/etc/asterisk/manager_custom.conf’: VERBOSE[9177] logger.c: Found

logger.c: == Manager ‘openfire’ logged on from 127.0.0.1

Besides the section of manager.conf I have a:

(openfire)

secret = <secret>

deny=0.0.0.0/0.0.0.0

permit=127.0.0.1/255.255.255.0

read = system,call

But as soon as it authenticates I get a runaway java process that quickly overwhelms the server. I have to stop openfire and from the database I have to set a config field to false before I can restart it or it go wonkers again.

Thanks for the help.

If you connect to asterisk on the loopback interface your ngrep command should look like this:

ngrep -d lo -s 1500 port 5038 -T

P.S. To make your logs/code readable in the forum use bla (without the spaces of course)\

Thanks

=Stefan

Well don’t I feel like the newbie tonight…

As soon as I enabled the plugin the ngrep went nuts. I got authenticated but ngrep gave me endless records like this:

T +0.000013 127.0.0.1:5038 -&gt; 127.0.0.1:34839 [AP]
  Message: Permission denied....
##
T +0.001718 127.0.0.1:34839 -&gt; 127.0.0.1:5038 [AP]
  action: Command..actionid: 8522252_6780#..command: show version files pbx.c....
#
T +0.000335 127.0.0.1:5038 -&gt; 127.0.0.1:34839 [AP]
  Response: Error..
#
T +0.000041 127.0.0.1:5038 -&gt; 127.0.0.1:34839 [AP]
  ActionID: 8522252_6780#..
#
T +0.000037 127.0.0.1:5038 -&gt; 127.0.0.1:34839 [AP]
  Message: Permission denied....
##
T +0.001600 127.0.0.1:34839 -&gt; 127.0.0.1:5038 [AP]
  action: Command..actionid: 8522252_6781#..command: show version files pbx.c....
#
T +0.000354 127.0.0.1:5038 -&gt; 127.0.0.1:34839 [AP]
  Response: Error..
#
T +0.000043 127.0.0.1:5038 -&gt; 127.0.0.1:34839 [AP]
  ActionID: 8522252_6781#..
#
T +0.000013 127.0.0.1:5038 -&gt; 127.0.0.1:34839 [AP]
  Message: Permission denied....

This looks like the permissions are a bit too tight.

Can you grant the openfire user full permissions on Asterisk?

Like

[openfire]
...
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user