powered by Jive Software

Red5 issues

I am having problems deploying the red5 plugin externally for our site chat.imminc.com. I am only able to view the red5 login page at 9090, not 8080. Here is the history from the debugger on the client machine.

Friday, June 29, 2007 1:21:47 PM] (level 2) func: init

jid: test@chat.imminc.com/jwchat

pass: test

(level 2) func: unknown

registered handler for event ‘‘iq’’

(level 2) func: unknown

registered handler for event ‘‘presence’’

(level 2) func: unknown

registered handler for event ‘‘message’’

(level 2) func: unknown

registered handler for event ‘‘message’’

(level 2) func: unknown

registered handler for event ‘‘ondisconnect’’

(level 2) func: unknown

registered handler for event ‘‘onconnect’’

(level 2) func: unknown

registered handler for event ‘‘onerror’’

(level 2) func: JSJaCHBCConnect

httpbase: /red5/jwchat5domain:chat.imminc.com

(level 4) func: JSJaCKeys

1: d28168914a8935ef5e51136a7291407d88762322

(level 4) func: JSJaCKeys

2: 2eb3788e6b5e7f668aaa707335fda59c53ff94c9

(level 4) func: JSJaCKeys

3: d83160df41028479e04807653281d3ae177771a9

(level 4) func: JSJaCKeys

4: fd51f0e31202412f7c29f226aa58000413c5d541

(level 4) func: JSJaCKeys

5: 23ad9767a9c9a90710bfab9723ed0b5dfae5f7ae

(level 4) func: JSJaCKeys

6: 147fac3b260fa5351173f05e50814afd31101634

(level 4) func: JSJaCKeys

7: fe1639a99e9084244646956572c5fafb408b60d5

(level 4) func: JSJaCKeys

8: 6237e93ac3ebe1a3806ff5e79380d1cd04bb576b

(level 4) func: JSJaCKeys

9: e68059a59b6bbb95039598ad63546ee56dd005ac

(level 4) func: JSJaCKeys

10: 810ea96369196ba0a7b0cc9833414195355343f9

(level 4) func: JSJaCKeys

11: 709902acf913a19dcd346f24a9903d019a56caae

(level 4) func: JSJaCKeys

12: a26f4866c640654826b954f7111453bf6ae8c964

(level 4) func: JSJaCKeys

13: 9fe1b6f92e0da50990a796cc90806a4dda46c14c

(level 4) func: JSJaCKeys

14: 285a2044f51b1910465a13446d0c497bb209a39c

(level 4) func: JSJaCKeys

15: 92e343b2fba6d59d00a622d4658f7a79abd2f48b

(level 4) func: JSJaCHBCConnect

(level 4) func: unknown

async recv:

(level 4) func: JSJaCHBCHandleInitialResponse

Content-Length: 0

(level 4) func: JSJaCHBCHandleInitialResponse

null

(level 1) func: JSJaCHBCHandleInitialResponse

initial response broken (status: 200)

(level 3) func: unknown

incoming event ‘‘onerror’’

(level 2) func: unknown

handling event ‘‘onerror’’

Here is the log from the server itself…

2007.06.29 13:35:51 [java.util.logging.Logger.log(Unknown Source)

] Connection timed out: connect

java.net.ConnectException: Connection timed out: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(Unknown Source)

at java.net.PlainSocketImpl.connectToAddress(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at sun.net.NetworkClient.doConnect(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)

at org.jivesoftware.openfire.plugin.red5.Red5Plugin.doPost(Red5Plugin.java:186)

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

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

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

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

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

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

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

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

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

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:285)

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

at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765 )

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

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

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

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

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

any ideas?

According to the red5plugin source code, it is failing at

url = new URL (“http://” + request.getServerName() + “:” + httpBindPortPlain + “/http-bind/”);

urlConn = url.openConnection();

urlConn.setDoInput (true);

urlConn.setDoOutput (true);

urlConn.setUseCaches (false);

urlConn.setRequestProperty(“Content-Type”, “application/x-www-form-urlencoded”);

printout = new DataOutputStream (urlConn.getOutputStream ());

confirm you can ping localhost or host name (chat.imminc.com) from the server itself. I don’‘t know what kind of server O/S you are running so I can’'t suggest anything more at this point.

You can bypass this logic and use openfire http bind directly by modifying config.js

function changeHTTPBase(newName) {

BACKENDS[0].httpbase = “/” + newName + “/jwchat5”;

HTTP_ROOT = newName;

}

change the line as shown below

BACKENDS[0].httpbase = “http://chat.imminc.com:8080/http-bind/”;

-dele

Dele,

Its running on windows XP pro as the OS. I’'ll try your change and see what happens.

Thanks,

Steve

Dele,

Its running on windows XP pro as the OS. I’'ll try your change and see what happens. I have no problems reaching chat.imminc.com with spark (most current build) externally.

We are translating the address “chat.imminc.com” through our firewall to the internal machine IP address. Would this be affecting the ability of the web client to log into the server? Spark is able to login externally by just pointing at chat.imminc.com and internally it resolves to the servername (which is not currently “chat.imminc.com” but I am going to change it tomorrow morning).

Thanks,

Steve

The initial test of implementing the change to the new bind address did not spit out anything to the debugger. I will not be able to personally test externally until this afternoon, but the person who tested for me stated that the debugger did not show any error information when they tried to log on. They were also not able to see any roster, nor were they able to add anyone to the roster.

here is the server log from the most recent failure.

Jul 2, 2007 12:44:26 PM org.jivesoftware.openfire.plugin.red5.Red5Plugin doPost

SEVERE: Connection timed out: connect

java.net.ConnectException: Connection timed out: connect

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(Unknown Source)

at java.net.PlainSocketImpl.connectToAddress(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at sun.net.NetworkClient.doConnect(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.openServer(Unknown Source)

at sun.net.www.http.HttpClient.(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.http.HttpClient.New(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)

at org.jivesoftware.openfire.plugin.red5.Red5Plugin.doPost(Red5Plugin.java:186)

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

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

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

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

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

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

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

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

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

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:285)

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

at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765 )

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

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

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

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

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

Dele,

any other suggestions?

thanks,

Steve

var BACKENDS =

[

,

];

var DEFAULTRESOURCE = “jwchat”;

var DEFAULTPRIORITY = “10”;

/* DEFAULTCONFERENCEGROUP + DEFAULTCONFERENCESERVER

  • default values for joingroupchat form

*/

var DEFAULTCONFERENCEROOM = “dialer”;

var DEFAULTCONFERENCESERVER = “conference.”+SITENAME;

/* debugging options */

var DEBUG = false; // turn debugging on

var DEBUG_LVL = 4; // debug-level 0…4 (4 = very noisy)

var USE_DEBUGJID = false; // if true only DEBUGJID gets the debugger

var DEBUGJID = “steve@localhost”; // which user get’'s debug messages

// most probably you don’'t want to change anything below

var timerval = 2000; // poll frequency in msec

var stylesheet = “jwchat.css”;

var THEMESDIR = “themes”;

function changeSiteName(newName) {

SITENAME = newName;

DEFAULTCONFERENCESERVER = “conference.”+SITENAME;

}

function changeServerName(newName, webPort) {

BACKENDS[0].default_server = newName;

HTTP_PORT = webPort;

}

function changeHTTPBase(newName) {

 BACKENDS[0].httpbase = "http://chat.imminc.com:8080/http-bind/";

HTTP_ROOT = newName;

}