Dear All,
I have a problem with ONVIF test case RTSS-1-1-1 MEDIA CONTROL
If my camera is configured to output H.264 video stream, and if I start the RTSS-1-1-1 MEDIA CONTROL test, the av_server and streamers are killed to be restarted to output a JPEG video stream.
In this case, when the streamers are restarted, the "ERROR: Failed to create RTSP server: bind() error (port number: 8555): Address already in use" error appear.
As far as port 8555 is used for JPEG RTSP stream, RTSS-1-1-1 MEDIA CONTROL test fail.
If at first the camera is configured to output JPEG video stream, av_server and streamers do not restart and RTSS-1-1-1 MEDIA CONTROL test goes wright.
Does anyone have this problem, and if yes is there a solution ?
I use a DM365 IPNETCAM reference design with precompiled binaries provided with the 4.0 release
Thanks
Regards
ADB
Antoine,
Can you please try to use the attached source file (onvif.c) and try it. The source file has been modified to address the above mentioned issue.Please place the attached source file in the following folder
Application/src/ipnc_app/network/boa-0.94.13/src/onvif_src/
6433.onvif.c
Regards,
Barath Vasudevan
Dear Barath,
Thanks for your fast reply.
I update the onvif.c file with your version and rebuilt boa, but the error still appear.
Here is the console output from the beginning of RTSS-1-1-1 MEDIA CONTROL test case :
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
root@192:~# Stream 8 is not avaliable~~~~~~~~caught SIGTERM: shutting downApproDrvExit: 8
Change in Config Data: Restart AVSERVER!!killall: Appro_avi_save: no process killedkillall: audio-receiver: no process killedApproDrvExit: 7caught SIGINT: shutting downcaught SIGINT: shutting downcaught SIGINT: shutting downcaught SIGINT: shutting downApproDrvExit: 6ApproDrvExit: 2ApproDrvExit: 10ApproDrvExit: 9killall: wis-streamer: no process killedAVSERVER UI: Stoping.....Msg_ThrFxn closing...Kill queue id:131076AVSERVER UI: Exiting.....AVSERVER UI: Closed Successfully
CPU CurrentStatus is = 0
*****************************************************************
IPNC BUILD VERSION: DM365 IPNC RDK V4.00.00.08
./av_server.out DM365 NTSC APPRO2A AEWB 2MP MJPEG 75 MENUOFF &ApproDrvInit: 7Creat queue id:196612queue id:196612
DM365MM Init SuccessfulAVSERVER UI: Initializing.
CLK Hz, ARM Hz = 297000000 DDR Hz = 270000000 VPSS Hz = 270000000 IMCOP Hz = 270000000
[OSA_FILE ] Reading file [/mnt/nand/IMG_Paramset.bin] ... ERRORIMAGE TUNE: Paramset File is not available..... Setting DEFAULT parameter
DM365MM Init SuccessfulSYSTEM.MSTPRI0 value changed to 00440011
CONFIGURING AVSERVER FOR DM365 .....queue id:65538SENSOR FPS VALUE = 30queue id:196612
FR : 0 users registered from exsiting face albumIPNC_DM365_4.0.0 (antoine@antoine-desktop) (gcc version 4.3.3 (GCC) ) #1 PREEMIPNC AUTO_IRIS = 0APPRO AEW TRIAL VERSION !!!APPRO AEW DATE LINE 2012/12Simple mixer control 'PGA',0 Capabilities: cvolume cvolume-joined penum Capture channels: Mono Limits: Capture 0 - 3 Mono: Capture 2 [67%]Simple mixer control 'Mono DAC',0 Capabilities: pvolume pvolume-joined penum Playback channels: Mono Limits: Playback 0 - 63 Mono: Playback 47 [75%]ApproDrvInit: 3queue id:196612queue id:0queue id:32769[01/Jan/1970:00:00:35 +0000] boa: server version Boa/0.94.13[01/Jan/1970:00:00:35 +0000] boa: server built Aug 10 2012 at 16:22:05.[01/Jan/1970:00:00:35 +0000] boa: starting server pid=741, port 80ApproDrvInit: 9queue id:196612ApproDrvInit: 8queue id:196612ApproDrvInit: 2queue id:196612ApproDrvInit: 6queue id:196612ApproDrvInit: 10queue id:196612Initializing......done initializingInitializing......done initializingInitializing...ERROR: Initializing...Initializing......done initializing...done initializingPlay this stream using the URL: Play this stream using the URL: Failed to create RTSP server: bind() error (port number: 8555): Address already in usertsp://192.168.1.168:8557/PSIA/Streaming/channels/2?videoCodecType=H.264
(We use port 8304 for optional RTSP-over-HTTP tunneling.)rtsp://192.168.1.168:8556/PSIA/Streaming/channels/2?videoCodecType=H.264
(We use port 8303 for optional RTSP-over-HTTP tunneling.)Play this stream using the URL: rtsp://192.168.1.168:8554/PSIA/Streaming/channels/1?videoCodecType=MPEG4
(We use port 8301 for optional RTSP-over-HTTP tunneling.)Play this stream using the URL: rtsp://192.168.1.168:8553/PSIA/Streaming/channels/1?videoCodecType=MPEG4
(We use port 8300 for optional RTSP-over-HTTP tunneling.)
As you can see, port 8555 seem to be still open and cause bind fail.
I tested in NFS and with an updated ubifs firmware, but the result are the same. I suspected at first latency due to NFS but it seems to be a wrong way.
Did you find why the socket bind fail ?
Did you see the same problem and solve it by updating only onvif.c ? Maybe there are other files to patch to make things work.
Anyway, thanks for you help, if you have other ideas, please let me know.
Best Regards
Antoine
Hi,
Just the onvif.c file needs to be replaced. No other change is required. Can you try erasing the config files from /mnt/nand and then try running the tests again.
Dear Barath and All,
Thanks for your last reply. I already had removed the config file to be sure to be in Factory settings but without success.
So i was little confused about the problem which seems to be solved on your side and still here in my side.
I dug a little deeper and found that RTSS 1-1-1 MEDIA CONTROL let the port 8555 in FIN_WAIT2 state, which seems to mean that ONVIF DEVICE TEST TOOL(192.168.1.10 = PC where is executed ONVIF TEST TOOL) was still using port 8555 even if the camera(192.168.1.168) has closed it.
------------------------------------------------------------------------------------------------------------------------------------------------
netstat -nan | grep 8555
tcp 0 0 192.168.1.168:8555 192.168.1.10:1582 FIN_WAIT2
I checked that RTSP Streamer have SO_REUSEADDR socket option which seems to be the right option for reuse a port, but still do not work.
I also try with a PC with Seven (I was using a XP SP2), socket seems to be released and the the camera streamer restart correctly but test fail at step 9 (Checking Filters, No Codecs in Graph)
So, what do you think about that ? I'm really confused about this problem.
Also can you please make sure that in the 'Management' tab of the Onvif Test Tool, the 'Time between Requests (ms)' is set to at least 9999. Checking filters error has come for us as well on some windows machine. Just try increasing the time between requests and see if those errors are repeating.
Dear Barathkumar Vasudevan,
Thanks for your feedback. You're right !
Setting a "long" time between tests prevent the bind error on port.
I guess this is a lack in the ONVIF Device Test Tool because I tried with a VMS (Milestone XProject) and do basically the same thing by asking a JPEG stream without problem.
Anyway thank you.