2013-07-11 2 views
0

Red5 1.0.1을 설치했습니다. 나는 Red5 server using RTMPT에 연결하기 위해 Java 클라이언트를 작성 중이다. 이미 응용 프로그램을 개발했으며 잘 작동합니다. 이 Red5의 서버처럼 보이는 예외 및 https://code.google.com/p/red5/source/browse/java/client/trunk/src/main/java/org/red5/client/net/rtmpt/RTMPTClientConnector.java의 소스 코드에서Red5 서버에 연결하는 중에 발생하는 문제

16:00:11.963 [main] DEBUG o.r.c.net.rtmp.BaseRTMPClientHandler - connect server: 10.81.144.180 port 8088 application installer 16:00:11.970 [main] DEBUG o.r.c.net.rtmp.BaseRTMPClientHandler - connect server: 10.81.144.180 port 8088 application installer connectCallback null 16:00:11.971 [main] DEBUG o.r.c.net.rtmp.BaseRTMPClientHandler - connect server: 10.81.144.180 port 8088 connect - params: {objectEncoding=0, app=installer, flashVer=WIN 11,2,202,235, fpad=false, tcUrl=rtmpt://10.81.144.180:8088/installer, audioCodecs=3575, videoFunction=1, pageUrl=null, path=installer, capabilities=15, swfUrl=null, videoCodecs=252} callback: null args: null 16:00:11.981 [main] INFO o.r.c.net.rtmp.BaseRTMPClientHandler - rtmp://10.81.144.180:8088/installer 16:00:12.262 [main] DEBUG o.red5.client.net.rtmpt.RTMPTClient - Created connector Thread[Thread-0,5,main] 16:00:12.354 [Thread-0] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Get connection: {}->http://10.81.144.180:8088, timeout = 0 16:00:12.356 [Thread-0] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - [{}->http://10.81.144.180:8088] total kept alive: 0, total issued: 0, total allocated: 0 out of 40 16:00:12.357 [Thread-0] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - No free connections [{}->http://10.81.144.180:8088][null] 16:00:12.357 [Thread-0] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Available capacity: 2 out of 2 [{}->http://10.81.144.180:8088][null] 16:00:12.357 [Thread-0] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Creating new connection [{}->http://10.81.144.180:8088] 16:00:12.379 [Thread-0] DEBUG o.a.h.i.c.DefaultClientConnectionOperator - Connecting to 10.81.144.180:8088 16:00:12.420 [Thread-0] DEBUG o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: best-match 16:00:12.442 [Thread-0] DEBUG o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context 16:00:12.442 [Thread-0] DEBUG o.a.h.c.p.RequestTargetAuthentication - Target auth state: UNCHALLENGED 16:00:12.443 [Thread-0] DEBUG o.a.h.c.p.RequestProxyAuthentication - Proxy auth state: UNCHALLENGED 16:00:12.443 [Thread-0] DEBUG o.a.h.impl.client.DefaultHttpClient - Attempt 1 to execute request 16:00:12.443 [Thread-0] DEBUG o.a.h.i.conn.DefaultClientConnection - Sending request: POST /open/1 HTTP/1.1 16:00:12.445 [Thread-0] DEBUG org.apache.http.wire - >> "POST /open/1 HTTP/1.1[\r][\n]" 16:00:12.446 [Thread-0] DEBUG org.apache.http.wire - >> "Connection: Keep-Alive[\r][\n]" 16:00:12.447 [Thread-0] DEBUG org.apache.http.wire - >> "Cache-Control: no-cache[\r][\n]" 16:00:12.447 [Thread-0] DEBUG org.apache.http.wire - >> "Content-Length: 1[\r][\n]" 16:00:12.447 [Thread-0] DEBUG org.apache.http.wire - >> "Host: 10.81.144.180:8088[\r][\n]" 16:00:12.447 [Thread-0] DEBUG org.apache.http.wire - >> "User-Agent: Mozilla/4.0 (compatible; Red5 Server)[\r][\n]" 16:00:12.447 [Thread-0] DEBUG org.apache.http.wire - >> "[\r][\n]" 16:00:12.447 [Thread-0] DEBUG org.apache.http.headers - >> POST /open/1 HTTP/1.1 16:00:12.447 [Thread-0] DEBUG org.apache.http.headers - >> Connection: Keep-Alive 16:00:12.448 [Thread-0] DEBUG org.apache.http.headers - >> Cache-Control: no-cache 16:00:12.448 [Thread-0] DEBUG org.apache.http.headers - >> Content-Length: 1 16:00:12.448 [Thread-0] DEBUG org.apache.http.headers - >> Host: 10.81.144.180:8088 16:00:12.448 [Thread-0] DEBUG org.apache.http.headers - >> User-Agent: Mozilla/4.0 (compatible; Red5 Server) 16:00:12.448 [Thread-0] DEBUG org.apache.http.wire - >> "[0x0]" 16:00:12.462 [Thread-0] DEBUG org.apache.http.wire - << "HTTP/1.1 200 OK[\r][\n]" 16:00:12.466 [Thread-0] DEBUG org.apache.http.wire - << "Server: Apache-Coyote/1.1[\r][\n]" 16:00:12.467 [Thread-0] DEBUG org.apache.http.wire - << "Connection: Keep-Alive[\r][\n]" 16:00:12.467 [Thread-0] DEBUG org.apache.http.wire - << "Cache-Control: no-cache[\r][\n]" 16:00:12.467 [Thread-0] DEBUG org.apache.http.wire - << "Content-Type: application/x-fcs[\r][\n]" 16:00:12.467 [Thread-0] DEBUG org.apache.http.wire - << "Content-Length: 14[\r][\n]" 16:00:12.467 [Thread-0] DEBUG org.apache.http.wire - << "Date: Thu, 11 Jul 2013 10:30:12 GMT[\r][\n]" 16:00:12.468 [Thread-0] DEBUG org.apache.http.wire - << "[\r][\n]" 16:00:12.469 [Thread-0] DEBUG o.a.h.i.conn.DefaultClientConnection - Receiving response: HTTP/1.1 200 OK 16:00:12.469 [Thread-0] DEBUG org.apache.http.headers - << HTTP/1.1 200 OK 16:00:12.469 [Thread-0] DEBUG org.apache.http.headers - << Server: Apache-Coyote/1.1 16:00:12.469 [Thread-0] DEBUG org.apache.http.headers - << Connection: Keep-Alive 16:00:12.469 [Thread-0] DEBUG org.apache.http.headers - << Cache-Control: no-cache 16:00:12.470 [Thread-0] DEBUG org.apache.http.headers - << Content-Type: application/x-fcs 16:00:12.470 [Thread-0] DEBUG org.apache.http.headers - << Content-Length: 14 16:00:12.470 [Thread-0] DEBUG org.apache.http.headers - << Date: Thu, 11 Jul 2013 10:30:12 GMT 16:00:12.479 [Thread-0] DEBUG o.a.h.impl.client.DefaultHttpClient - Connection can be kept alive indefinitely 16:00:12.490 [Thread-0] DEBUG org.apache.http.wire - << "MJVBMAV5ABPSW[\n]" 16:00:12.490 [Thread-0] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Released connection is reusable. 16:00:12.490 [Thread-0] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Releasing connection [{}->http://10.81.144.180:8088][null] 16:00:12.491 [Thread-0] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Pooling connection [{}->http://10.81.144.180:8088][null]; keep alive indefinitely 16:00:12.491 [Thread-0] DEBUG o.a.h.i.conn.tsccm.ConnPoolByRoute - Notifying no-one, there are no waiting threads 16:00:12.501 [Thread-0] DEBUG o.r.c.net.rtmpt.RTMPTClientConnector - RTMPT handling exception java.lang.NumberFormatException: For input string: "MJVBMAV5ABPSW" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) ~[na:1.6.0_07] at java.lang.Integer.parseInt(Integer.java:447) ~[na:1.6.0_07] at java.lang.Integer.parseInt(Integer.java:497) ~[na:1.6.0_07] at org.red5.client.net.rtmpt.RTMPTClientConnector.openConnection(RTMPTClientConnector.java:161) ~[red5-client-1.0.jar:1.0] at org.red5.client.net.rtmpt.RTMPTClientConnector.run(RTMPTClientConnector.java:92) ~[red5-client-1.0.jar:1.0]

:이 콘솔에 인쇄되는 것입니다

public class MyRTMPTClient extends RTMPTClient { 

    public void start() { 
     connect(host, port, app); 
    } 
    public static void main(String[] args) { 
     MyRTMPTClient obj = new MyRTMPTClient(); 
     obj.start(); 
    } 
} 

: 내 클라이언트에서, 나는 연결이 줄을이 클라이언트 ID가 String 인 경우 RTMPTClientConnectorinteger입니다. 내가 여기서 무엇을 놓치고 있니? RTMPTClient를 사용하는 방법을 보여주는 간단한 튜토리얼이 있으면 도움이 될 것입니다. 나는 초보자이다.

이이 red5-client.jar

+0

테스트 용 플래시 클라이언트를 사용하여 동일한 서버 및 앱에 연결을 시도 했습니까? – fmodos

답변

0

세션 또는 클라이언트 ID의 문자열 반환에서 온다 제가이 예외에 대해 무엇을 할 수 있는지 알려 정확하고 Red5의 서버 및 클라이언트의 모든 최신 버전에서 볼 수 있어야하세요 .

관련 문제