Expand my Community achievements bar.

connection fall back to hub-n-spoke

Avatar

Former Community Member

Hi,

  I wonder if anyone here knows the answer... I am trying the p2p sample code. Every time, users can log in with the RTMFP protocol. But as soon as they start the audio or video, the connections fall back to bub n spoke mode. All Flash players are 10.0 or 10.1. I am using the source code for 10.0. and the SDK is updated. Any help would be appreciated.

  Thanks

Danny

12 Replies

Avatar

Former Community Member

I want to know few answers before I can speculate on the possible reasons .

a) Since you are using player 10 source, what is the reason you are getting in debug logs in flex/flash builder for the failure of p2p connections ?

b) Are there any firewall issues in your connection ?

If your p2p is failing due to exceeding max number of p2p connections, set the maxP2PStreamPublish value in a StreamManager to a higher one and try. The default is 3.

Hope this helps

Thanks

Regards

Hironmay Basu

Avatar

Former Community Member

Hi Hironmay,

  Thanks for the reply.here are my answers:

a) I didn't check the debug logs yet (will do once I go to my office).

b) the two computers were on the same LAN behind a router

c) I tested it with only two computers and I did increase the maxP2PStreamPublish to 6 but it didn't resolve the problem (I think in my case, I had up to four streams, two for each computer (audo+vide), is it right?)

Thanks

Danny

Avatar

Former Community Member

Hi,

Thanks for the update. Send the debug log all the way from an rtmfp connection to the reason for p2p failure. Are you sure it was rtmfp and it didn’t switch to rtmps ?

Thanks

Hironmay Basu

Avatar

Former Community Member

I guess we need the log file for the details. But for now I believe the connection status didn't change to RTMPS.

Thanks

Danny

Avatar

Former Community Member

You don't need the log files. If you are using a Flex/Flash Builder, run your app in debug mode and copy and send us the debug log.

Thanks

Hironmay Basu

Avatar

Former Community Member

Hi Hironmay,

  Here is the log. Please let me know what to do next.

Thanks

Danny

...

[SWF] C:\data\project\PrjRoot\lccsChatRoom\bin-debug\lccsChatRoom.swf\[[DYNAMIC]]\4 - 441,362 bytes after decompression
[SWF] C:\data\project\PrjRoot\lccsChatRoom\bin-debug\lccsChatRoom.swf\[[DYNAMIC]]\5 - 1,432,382 bytes after decompression
[SWF] C:\data\project\PrjRoot\lccsChatRoom\bin-debug\lccsChatRoom.swf\[[DYNAMIC]]\6 - 323,354 bytes after decompression
warning: unable to bind to property 'userManager' on class 'com.adobe.rtc.session::ConnectSessionContainer'

19:16:08 GMT-0400    requestInfo https://connectnow.acrobat.com/wxg250/classroom1?mode=xml&glt=g:&x=0.5000975322909653
19:16:08 GMT-0400    authentication status: 200
19:16:08 GMT-0400    authentication request complete
19:16:08 GMT-0400    requestInfo https://connectnow.acrobat.com/wxg250/classroom1?gak=cmVuZ2EqbmExcioxMmFjYTZmZTAzZipGMURaOEtXUEsxM05...
19:16:09 GMT-0400    #TicketService# ticket received: x9pijfobwfcg
19:16:09 GMT-0400    Getting FMS at https://na2.collaboration.adobelivecycle.com/fms?ticket=x9pijfobwfcg&proto=rtmfp, attempt #1/3
19:16:09 GMT-0400    result: <fms>
  <origin>fms4.acrobat.com</origin>
  <proto_ports>rtmfp:1935,rtmps:443</proto_ports>
  <retry_attempts>2</retry_attempts>
</fms>
19:16:09 GMT-0400    protocols: [object ProtocolPortPair],[object ProtocolPortPair]
19:16:09 GMT-0400    [attempt 1 of 2] Connecting to 0/1: rtmfp://fms4.acrobat.com/cocomo/na2-sdk-63afa1af-db2b-413d-8b10-78c4b567889f/classroom1 #startProtosConnect#
19:16:09 GMT-0400    tempNetStatusHandler 0/2,NetConnection.Connect.Success
19:16:09 GMT-0400    isTunneling? false
19:16:09 GMT-0400    is using RTMPS? false
19:16:09 GMT-0400    RECEIVED LOGIN AT SESSION
19:16:09 GMT-0400      .user descriptor from server [object]
19:16:09 GMT-0400        \\
19:16:09 GMT-0400        .role [number]= 100
19:16:09 GMT-0400        .affiliation [number]= 100
19:16:09 GMT-0400        .displayName [string]= D Wang 3
19:16:09 GMT-0400        .userID [string]= WCD-4FE008C648440EF2992015B9/3
19:16:09 GMT-0400    RECEIVENODES UserManager
19:16:09 GMT-0400    receiveAllSynchData UserManager
19:16:09 GMT-0400    RECEIVENODES FileManager
19:16:09 GMT-0400    receiveAllSynchData FileManager
19:16:09 GMT-0400    checkManagerSync:[object FileManager]
19:16:09 GMT-0400    RECEIVENODES AVManager
19:16:09 GMT-0400    receiveAllSynchData AVManager
19:16:09 GMT-0400    checkManagerSync:[object StreamManager]
19:16:09 GMT-0400    RECEIVENODES RoomManager
19:16:09 GMT-0400    receiveAllSynchData RoomManager
19:16:09 GMT-0400    checkManagerSync:[object RoomManager]
19:16:09 GMT-0400    checkManagerSync:[object UserManager]
19:16:10 GMT-0400    RECEIVENODES default_WebCamera
19:16:10 GMT-0400    receiveAllSynchData default_WebCamera

Avatar

Former Community Member

Hi Danny,

Did you get this log when you started your webcam/audio and the connection switched back to hub-spoke from p2p ? Because I don't find anything in the log that says the connection is switched to hub-spoke. How did you come to that conclusion ? Can you run the PeerToPeerRtmfp example under sampleApps and see whether you connection indeed switches or not. You will get at least some message regarding cause of switch in the log.

I can only find that your connection is rtmfp in your logs.

Thanks

Hironmay Basu

Avatar

Former Community Member

Hi Hironma,

  The application I used is the PeerToPeerRtmfp sample app. I just did some small cosmetic changes. I found the right side panel reports "connection change to hub-n-spoke" as soon as I start audio or video. The log file I sent was after I found the connection type changed. The rtmfp always remains 'true' to all users in the chat room (from the middle panel)

Thanks

Danny

Avatar

Former Community Member

Give me your room url. You can PM me. This is very weird because whatever be the cause , there is always a message for the reason for going to p2p.

Thanks

Hironmay Basu

Avatar

Former Community Member

Hi Danny,

Now I see. That top text is just the title, not the actual connection change text.

When the connection changes actually, it will come something like 'Current Connection: P2P' or 'Current connection: Hub-spoke'. I agree that the title should be clearer, I will change that in next-release. You will also see in the debug log the reason when connection changes from p2p to hub-spoke.

You don't worry, your connection is actually p2p( which is by default with rtmfp and player 10 or higher). You can see that when the connection actually changes , the text that I mentioned above will come. Try doing it by getting 3-4 instances open and sharing audio/cam( provided you have the default or low maxP2PStream value). Similarly , when extra users will leave, it will again say 'Current Connection: p2p'.

One last piece of advice, the dev console logs in owner as extra user and it's based on player 9 swc. So, if your dev console is also open for that room, when you are doing p2p, it will switching to hub-spoke due to player 9 instance.

Hope you are clear now.

Thanks

Hironmay Basu

Avatar

Former Community Member

Thanks, Hironmay.

I guess I need to clarify one thing: it does states 'Current connection: Hub-spoke' in the right panel (I didn't give you the accurate text because it was based on my memory, sorry). And this text appeared whenevery a second user connect to the room (flash player 10.1, same network) . I think the connection did fall back, as the souce code of the text change is the following:

protected function onConnectionTypeChange(p_evt:StreamEvent):void
            {
                connChange.text += "Current Connection:" + ((sess.streamManager.isP2P)?"P2P":"Hub n Spoke") + "\n" ;
            }

I think the isP2P is false when the switching happened.

Here is the new log I found today -it has something related to NetSream.Connect.Closed when the switching happened.

[SWF] C:\data\project\PrjRoot\lccsChatRoom\bin-debug\lccsChatRoom.swf\[[DYNAMIC]]\6 - 323,354 bytes after decompression
warning: unable to bind to property 'userManager' on class 'com.adobe.rtc.session::ConnectSessionContainer'
Wed Sep 1 07:26:08 GMT-0400 2010    LCCS SDK Version : 1.2.0    Player Version : WIN 10,1,53,64
07:26:08 GMT-0400    requestInfo https://connectnow.acrobat.com/wxg250/classroom1?mode=xml&glt=g:&x=0.04513606382533908
07:26:11 GMT-0400    authentication status: 200
07:26:11 GMT-0400    authentication request complete
07:26:11 GMT-0400    requestInfo https://connectnow.acrobat.com/wxg250/classroom1?gak=c2Vzc2lvbklEKmJSdEk0NmxYTmZHcXZybUNOdzdGcU0qYXB...
07:26:11 GMT-0400    #TicketService# ticket received: 1u1ia5xp2vp5z
07:26:11 GMT-0400    Getting FMS at https://na2.collaboration.adobelivecycle.com/fms?ticket=1u1ia5xp2vp5z&proto=rtmfp, attempt #1/3
07:26:12 GMT-0400    result: <fms>
  <origin>fms5.acrobat.com</origin>
  <proto_ports>rtmfp:1935,rtmps:443</proto_ports>
  <retry_attempts>2</retry_attempts>
</fms>
07:26:12 GMT-0400    protocols: [object ProtocolPortPair],[object ProtocolPortPair]
07:26:12 GMT-0400    [attempt 1 of 2] Connecting to 0/1: rtmfp://fms5.acrobat.com/cocomo/na2-sdk-63afa1af-db2b-413d-8b10-78c4b567889f/classroom1 #startProtosConnect#
07:26:12 GMT-0400    tempNetStatusHandler 0/2,NetConnection.Connect.Success
07:26:12 GMT-0400    isTunneling? false
07:26:12 GMT-0400    is using RTMPS? false
07:26:12 GMT-0400    RECEIVED LOGIN AT SESSION
07:26:12 GMT-0400      .user descriptor from server [object]
07:26:12 GMT-0400        \\
07:26:12 GMT-0400        .role [number]= 100
07:26:12 GMT-0400        .affiliation [number]= 100
07:26:12 GMT-0400        .userID [string]= WCD-4FE008C648440EF2992015B9
07:26:12 GMT-0400        .displayName [string]= D Wang
07:26:13 GMT-0400    RECEIVENODES UserManager
07:26:13 GMT-0400    receiveAllSynchData UserManager
07:26:13 GMT-0400    RECEIVENODES FileManager
07:26:13 GMT-0400    receiveAllSynchData FileManager
07:26:13 GMT-0400    checkManagerSync:[object FileManager]
07:26:13 GMT-0400    RECEIVENODES AVManager
07:26:13 GMT-0400    receiveAllSynchData AVManager
07:26:13 GMT-0400    checkManagerSync:[object StreamManager]
07:26:13 GMT-0400    RECEIVENODES RoomManager
07:26:13 GMT-0400    receiveAllSynchData RoomManager
07:26:13 GMT-0400    checkManagerSync:[object RoomManager]
07:26:13 GMT-0400    checkManagerSync:[object UserManager]
07:26:21 GMT-0400    mainNetStatusHandler: NetStream.Connect.Success
07:26:23 GMT-0400    mainNetStatusHandler: NetStream.Connect.Success
07:27:32 GMT-0400    mainNetStatusHandler: NetStream.Connect.Closed
07:27:32 GMT-0400    mainNetStatusHandler: NetStream.Connect.Success
07:27:32 GMT-0400    mainNetStatusHandler: NetStream.Connect.Closed
07:27:32 GMT-0400    mainNetStatusHandler: NetStream.Connect.Closed
07:27:32 GMT-0400    mainNetStatusHandler: NetStream.Connect.Closed
07:28:42 GMT-0400    mainNetStatusHandler: NetConnection.Connect.NetworkChange
07:28:42 GMT-0400    mainNetStatusHandler: NetConnection.Connect.NetworkChange
07:28:42 GMT-0400    mainNetStatusHandler: NetConnection.Connect.NetworkChange
07:28:42 GMT-0400    mainNetStatusHandler: NetConnection.Connect.NetworkChange

==========the following logs were gnereated after the second user closed the page --Danny's note===========

07:30:05 GMT-0400    mainNetStatusHandler: NetStream.Connect.Success
07:30:05 GMT-0400    mainNetStatusHandler: NetStream.Connect.Success
07:35:04 GMT-0400    mainNetStatusHandler: NetConnection.Connect.NetworkChange
07:35:04 GMT-0400    mainNetStatusHandler: NetConnection.Connect.NetworkChange
07:35:04 GMT-0400    mainNetStatusHandler: NetConnection.Connect.NetworkChange
07:35:04 GMT-0400    mainNetStatusHandler: NetConnection.Connect.NetworkChange

Avatar

Former Community Member

Hi Hironmay,

  I see your point about the room owner using flash player 9. I will check and get back to you on this

Thanks

Danny