Established connection with Flash-Mediaprovider disconnects immediately

MJ@alaun

New Member
Hello Flashphoner-team,
I got following problem:
We implementend a video-chat based on your video-chat- and conference-example. Connection and streaming with WebRTC works fine.
But in Internet Explorer 11 - using Flash - the connection disconnects immediately after the user permits Flashplayer to use its cam and mic. (Browser-console says: "11:43:04 INFO flash - Flash[a16d9c21-83f9-11e7-82f8-b9b1023cf23d]:INFO: UTC 7.18 9:43:4.650: NetConnection [NetStatusEvent type="netStatus" bubbles=false cancelable=false eventPhase=2 info=[object Object]] - level=status; description=Connection succeeded.; objectEncoding=3; data=; code=NetConnection.Connect.Success; clientid=284610969; "

11:43:04 INFO flash - Flash[a16d9c21-83f9-11e7-82f8-b9b1023cf23d]:INFO: UTC 7.18 9:43:4.774: disconnect")

The flashphoner-server-logs says: After joining the room the status is "PENDING" (2x) and after few milliseconds it becomes "FAILED" with info "Failed by error". After a few milliseconds more I got the info "Can not create session on 31350 port". I tested with tcpdump - the port receives packages from other server.

Could you please help us?
Thanks in advance
Martin
 

Max

Administrator
Staff member
We tested our video-chat in Internet Explorer 11 (Windows 7) and it's works.
video_chat_ie11.png
Can you provide access to your server and demo?
 

MJ@alaun

New Member
Hello Max,
thanks a lot for your reply. I'm sorry, but I can't give you access because of security restrictions.
But maybe following is helpful:

I forgot to mention that our demo is running in a docker container whichs is running on a server behind our firewall. I think that the problem is a network configuration problem.
Our firewall allows connections from outside for the ports 1935 and 8443 and forwards it to the server on which the flashphoner-docker-container runs.
The docker-container listens to the ports 1935, 8443, 9091, 8888 and to the range 31000 - 32000.
We configured our flashphoner.properties like this
ip =217.7.19.61
ip_local =172.19.19.50
port_from =31000
port_to =31349
media_port_from =31350
media_port_to =31749
rtsp_port_from =31750
rtsp_port_to =32000
waiting_answer =60
user_agent =Flashphoner/1.0
balance_header =balance
cost_header =cost
video_enabled =true
domain =
outbound_proxy =
outbound_port =
log_level =5
enable_context_logs =false
rtp_activity_detecting =true,60
sip_msg_listener =com.flashphoner.sdk.sip.ChangeCallIdListener
call_record_listener =com.flashphoner.server.client.DefaultCallRecordListener
dtmf =rfc2833
auto_login_url =/usr/local/FlashphonerWebCallServer/conf/account.xml
get_callee_url =/usr/local/FlashphonerWebCallServer/conf/callee.xml
codecs =opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,h264,vp8,flv,mpv
codecs_exclude_sip =mpeg4-generic,flv,mpv
codecs_exclude_streaming =flv,telephone-event
codecs_exclude_sip_rtmp =opus,g729,g722,mpeg4-generic,vp8,mpv
on_record_hook_script =on_record_hook.sh
rtmp_transponder_stream_name_prefix =rtmp_
enable_candidate_harvester = true

Do you have any experiences with Flashphoner WCS running as docker-container? Do not hesitate to ask for more information.
Martin
 

Max

Administrator
Staff member
Hi, Martin.
Do you have any experiences with Flashphoner WCS running as docker-container?
We haven't any test WCS running as docker-container yet.
range 31000 - 32000
Are you sure that this range not busy by another process\container?
 

MJ@alaun

New Member
Good morning Max,
I looked with lsof for the ports, but the only one who uses them is our flashphoner-docker-container.
 

MJ@alaun

New Member
By the way: The WCS-Server-Log says following:
09:56:03,770 INFO RtpVideoConfig - WSS-pool-9-thread-1 PlayerVideoResolution C 0x0, StreamerVideoResolution C 0x0
09:56:03,774 INFO AudioSdpFactory - WSS-pool-9-thread-1 proxySession: Session{secured=true, terminated=false, localPort=31370, rtcpMux=true, sdpState=sendrecv}
09:56:03,774 INFO WCS4CallbackHandler - WSS-pool-9-thread-1 notifyAudioCodec PCMA ndpgmitu7df05b8g5vrm52qq5j@null
09:56:03,777 ERROR C - WSS-pool-9-thread-1 Caught exception on channel [id: 0x3902fa28].
java.net.BindException: Cannot assign requested address (Bind failed)
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:93)
at java.net.DatagramSocket.bind(DatagramSocket.java:392)
at com.flashphoner.C.C.B.E.B(Unknown Source)
at com.flashphoner.C.C.B.E.eventSunk(Unknown Source)
at com.flashphoner.C.D.A.A.handleDownstream(Unknown Source)
at org.jboss.netty.channel.Channels.bind(Unknown Source)
at org.jboss.netty.channel.AbstractChannel.bind(Unknown Source)
at org.jboss.netty.bootstrap.ConnectionlessBootstrap.bind(Unknown Source)
at com.flashphoner.C.E.B.A(Unknown Source)
at com.flashphoner.media.N.A(Unknown Source)
at com.flashphoner.media.P.A(Unknown Source)
at com.flashphoner.media.N.d(Unknown Source)
at com.flashphoner.media.D.N(Unknown Source)
at com.flashphoner.media.D.A(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.MediaHandler.setRemoteSDP(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.MediaHandler.createMediaSession(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.MediaHandler.playStream(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.MediaHandler.playStream(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.flashphoner.server.ws.B.A(Unknown Source)
at com.flashphoner.server.ws.B.messageReceived(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(Unknown Source)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.channel.socket.nio.NioWorker.read(Unknown Source)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(Unknown Source)
at org.jboss.netty.channel.socket.nio.DeadlockAwareNioWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
09:56:03,810 ERROR MediaHandler - WSS-pool-9-thread-1 playStream exception
com.flashphoner.sdk.softphone.exception.PortsBusyException: Can not create session on 31374 port
at com.flashphoner.media.N.A(Unknown Source)
at com.flashphoner.media.P.A(Unknown Source)
at com.flashphoner.media.N.d(Unknown Source)
at com.flashphoner.media.D.N(Unknown Source)
at com.flashphoner.media.D.A(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.MediaHandler.setRemoteSDP(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.MediaHandler.createMediaSession(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.MediaHandler.playStream(Unknown Source)
at com.flashphoner.server.client.handler.wcs4.MediaHandler.playStream(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.flashphoner.server.ws.B.A(Unknown Source)
at com.flashphoner.server.ws.B.messageReceived(Unknown Source)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(Unknown Source)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(Unknown Source)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(Unknown Source)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(Unknown Source)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(Unknown Source)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(Unknown Source)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(Unknown Source)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(Unknown Source)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(Unknown Source)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(Unknown Source)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
at org.jboss.netty.channel.socket.nio.NioWorker.read(Unknown Source)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(Unknown Source)
at org.jboss.netty.channel.socket.nio.DeadlockAwareNioWorker.run(Unknown Source)
at org.jboss.netty.util.ThreadRenamingRunnable.run(Unknown Source)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Maybe this helps you further?
 

Max

Administrator
Staff member
We have tested WCS at docker container and it's working without any problems both webrtc and flash streaming.
Container based on CentOS 7 started like:
Code:
docker run -p 8443:8443 -p 1935:1935 -p 31350-31749:31350-31749 -p 8888:8888 -p 9091:9091 -p 8080:8080 -i -t 4903bcbf5e4d /bin/bash
From your last logs we can see that media port 31374 is busy.
Can you send output of 'netstat -antpul' from container when this problem occurs again?
 

MJ@alaun

New Member
Thanks a lot for testing it in docker. I will test it again and check 'netstat'. Could you please give me your corresponding flashphoner.properties and server.properties?
 

MJ@alaun

New Member
Alright, the server-log says now PortsBusyExeception for port 31350.
This is what netstat says (called in running flashphoner-docker-container):
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8444 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:8445 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:9443 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:9091 0.0.0.0:* LISTEN 64/java
tcp 0 0 127.0.0.11:45192 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:34569 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:554 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:1098 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:843 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:1099 0.0.0.0:* LISTEN 64/java
tcp 0 0 0.0.0.0:1935 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 64/java
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:50999 0.0.0.0:* LISTEN 121/java
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 64/java
tcp 0 0 172.18.0.5:40944 172.18.0.5:1099 ESTABLISHED 121/java
tcp 0 0 172.18.0.5:1099 172.18.0.5:40944 ESTABLISHED 64/java
tcp 0 0 127.0.0.1:35668 127.0.0.1:1098 TIME_WAIT -
tcp 0 0 172.18.0.5:40924 172.18.0.5:1099 TIME_WAIT -
tcp 0 0 172.18.0.5:9443 217.91.145.16:64936 ESTABLISHED 121/java
tcp 0 0 127.0.0.1:9091 127.0.0.1:49062 ESTABLISHED 64/java
tcp 1 0 127.0.0.1:46658 127.0.0.1:9091 CLOSE_WAIT 64/java
tcp 0 0 127.0.0.1:35688 127.0.0.1:1098 TIME_WAIT -
tcp 0 0 127.0.0.1:49062 127.0.0.1:9091 ESTABLISHED 64/java
tcp 0 0 172.18.0.5:1935 217.91.145.16:64938 ESTABLISHED 121/java
udp 0 0 0.0.0.0:1935 0.0.0.0:* 121/java
udp 0 0 127.0.0.11:43067 0.0.0.0:* -

Is the PortsBusyException thrown because the port is busy or does it also can be thrown, when the connection to that port is not possible - for example because of firewall rules etc.?
 

MJ@alaun

New Member
I sent you the license.
Yes, the problem only occurs if Flash is involved, e.g. Internet Explorer 11 <-> Firefox. Using WebRTC, e.g. Chrome <-> FF works fine.
 

Max

Administrator
Staff member
How many interfaces has your docker-container? As we can from logs your WCS configured with local address 172.18.0.5, but at the same time server trying to bind to 172.19.19.50. Also, please set to false property enable_candidate_harvester and repeat your tests.
 

MJ@alaun

New Member
I got it: I didn't use the local ip of the docker-container itself but from the host. I changed it now in the flashphoner.properties and now it works in Firefox, Chrome and IE11.
I'm very sorry that I stole your time. Thank you very much for helping me:) Your support is awesome!

But still a question: Do you have experience of working flashphoner in MS Edge?
When I permit the flashplayer to use my cam and mic I only see a black screen in its stage.
 
Last edited:

Max

Administrator
Staff member
I changed it now in the flashphoner.properties and now it works in every browser!
Great!
Do you have experience of working flashphoner in MS Edge?
When I permit the flashplayer to use my cam and mic I only see a black screen in its stage.
You tested Edge with WebRTC? What version of Edge did you test?
 

MJ@alaun

New Member
My Edge uses Flash immediately. If I deactivate flashplayer in its settings nothing works.
Its version is 25.10586.0.0.
HTML-version is 13.10586
(c) 2015 Microsoft
 
Top