Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
85 Views

https connection not working

Hello,

I recently downloaded and tried Intel's WebRTC and looked into the Peer to Peer connection.  I ran the woogeenp2p sample project from CS_WebRTC_Client_SDK_Android.v3.0 on Android Studio (version 2.1.2)  and was able to get two clients to communicate with each other using an http connection to the sample peer server (PeerServer-Release-3.0) on node.js (version 4.4.5).  

An http connection using myIP:8095 to the sample server is successful, however when I try an https connection, under port 8096, the connection to the server fails.  

Messages from Android Monitor are as follows:

07-12 09:13:36.290 2613-3061/com.intel.webrtc.p2p.sample D/WooGeen-PeerClient: PeerClient State:CONNECTING
07-12 09:13:36.336 2613-10564/com.intel.webrtc.p2p.sample D/WooGeen-PeerClient: PeerClient State:DISCONNECTED
07-12 09:13:36.336 2613-10564/com.intel.webrtc.p2p.sample D/WooGeen-Activity: Failed to connect server:Socket.IO reports connect to signaling server failed.
07-12 09:13:37.705 2613-10587/com.intel.webrtc.p2p.sample D/WooGeen-Activity: Failed to connect server:Socket.IO reports connect to signaling server failed.
07-12 09:13:38.344 2613-3062/com.intel.webrtc.p2p.sample E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaaa26130

...with repeated attempts and messages of the failed connection and unknown buffer...

The server does not detect anything from the requesting https client at all.  Is this a certificate problem?  I tried the provided certificates for the server as well as my own self signed certificates generated using OpenSSL (both with and without a password), however all results turned up negative.  Did the Android client need a certificate as well?  I dug around the client code and did not find any usage of certificates.

I also tried connecting to the server using the Javascript peer to peer sample (version 3.0), launching peercall.htlm on Chrome (version 51).  The results were the same.  I was able to connect to the server and communicate with an android client using an http request, but an https would not even result in a server acknowledgement.

Other specifications:

Testing on Windows 10 machine.

Client code ran on Android Studio's Nexus 5X Emulator API 23 (Android 6.0) 

Help appreciated,

Thanks

Tags (2)
0 Kudos
2 Replies
Highlighted
Beginner
85 Views

I think I solved the problem. It was a certificate issue.

For the javascript peer to peer client, I found out that my certificates were not created properly and the CA was not trusted by the browser.  Therefore, I recreated a proper self signed certificate signed by my CA, and placed the CA in my trusted root certificates.

For the Android peer to peer client, I did not find any usage of certificates when the client created a socket to connect to the signaling server. Therefore, I created a SSLContext containing my CA and loaded it into the socket.  I also added the IO options: sslContext (IO.Options.sslContext = mySslContext) and secure (IO.Options.secure = true).

Not sure if this is the correct way to go about managing the certificates, but my https connection seems to work on both the javascript and Android peers now.

0 Kudos
Highlighted
85 Views

Hi Eldon,

Really appreciate your sharing of problem solving, which would definitely help other developers.

Thanks!

0 Kudos