I can't open a HTTPS stream on client side. Actully the VLC windows with video opens and then closes. Log fail attached - Client_Messages_VLC_1.0.1.txt
On server side(vlc 1.0.1) I see:
[0x92def40] gnutls generic error: Error in the push function.
[0x9307fd0] gnutls generic error: A TLS packet with unexpected length was received.
Commands used on server for taking and HTTPS streaming(vlc 1.0.1):
main debug: processing request item https://server_ip:8888 node Esitusloend skip 0main debug: resyncing on https://server_ip:8888main debug: https://server_ip:8888 is at 0main debug: starting new itemmain debug: creating new input threadmain debug: Creating an input for 'https://server_ip:8888'main debug: thread (input) created at priority 1 (../.././src/input/input.c:230)qt4 debug: IM: Setting an inputmain debug: thread startedmain debug: using timeshift granularity of 50 MBytesmain debug: using timeshift path 'C:\Users\user\AppData\Local\Temp'main debug: `https://server_ip:8888' gives access `https' demux `' path `server_ip:8888'main debug: creating demux: access='https' demux='' path='server_ip:8888'main debug: looking for access_demux module: 0 candidatesmain debug: no access_demux module matched "https"main debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)main debug: creating access 'https' path='server_ip:8888'main debug: looking for access module: 1 candidateaccess_http debug: http: server='server_ip' port=8888 file='(null)qt4 debug: Updating the geometryqt4 debug: Updating the geometrymain debug: net: connecting to server_ip port 8888main debug: connection: Resource temporarily unavailablemain debug: connection succeeded (socket = 1376)main debug: requested server name: server_ipmain debug: looking for tls client module: 1 candidategnutls debug: GnuTLS v2.8.1 initializedgnutls debug: added x509 credentials (C:\Users\user\AppData\Roaming\vlc/ssl/certs\certificate.pem)gnutls warning: cannot add x509 credentials (C:\ProgramData/ssl/certs/ca-certificates.crt): No such file or directorymain debug: using tls client module "gnutls"main debug: TIMER module_need() : 7.000 ms - Total 7.000 ms / 1 intvls (Avg 7.000 ms)gnutls debug: TLS/x509 certificate verifiedmain debug: TLS client session initializedaccess_http debug: protocol 'HTTP' answer code 200access_http debug: Content-Type: application/octet-streammain debug: using access module "access_http"main debug: TIMER module_need() : 872.000 ms - Total 872.000 ms / 1 intvls (Avg 872.000 ms)main debug: Using AStream*Streammain debug: pre bufferingmain debug: received first data after 159 msmain debug: pre-buffering done 188 bytes in 0s - 1 kbytes/smain debug: looking for stream_filter module: 2 candidatesmain debug: TIMER module_need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)main debug: looking for stream_filter module: 1 candidatemain debug: using stream_filter module "stream_filter_record"main debug: TIMER module_need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)main debug: creating demux: access='https' demux='' path='server_ip:8888'main debug: looking for demux module: 50 candidatesmain debug: using demux module "ts"main debug: TIMER module_need() : 19.000 ms - Total 19.000 ms / 1 intvls (Avg 19.000 ms)main debug: looking for a subtitle file in C:\Program Files\VideoLAN\VLC\ts debug: DEMUX_SET_GROUP 0 0main debug: `https://server_ip:8888' successfully openedts debug: pid[68] unknownts debug: PATCallBack calledts debug: new PAT ts_id=23760 version=5 current_next=1ts debug: * number=1 pid=66ts debug: PMTCallBack calledts debug: new PMT program number=1 version=30 pid_pcr=68ts debug: * es pid=68 type=27 fcc=h264main debug: selecting program id=1main debug: looking for decoder module: 36 candidatesavcodec debug: libavcodec already initializedavcodec debug: ffmpeg codec (H264 - MPEG-4 AVC (part 10)) startedmain debug: using decoder module "avcodec"main debug: TIMER module_need() : 17.000 ms - Total 17.000 ms / 1 intvls (Avg 17.000 ms)main debug: looking for packetizer module: 21 candidatesmain debug: using packetizer module "packetizer_h264"main debug: TIMER module_need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)main debug: thread (decoder) created at priority 0 (../.././src/input/decoder.c:315)main debug: thread startedqt4 debug: Updating the geometryts warning: first packet for pid=68 cc=0x7qt4 debug: Updating the geometryqt4 debug: Updating the geometryqt4 debug: Updating the geometryqt4 debug: Updating the geometrymain debug: Buffering 0%main debug: Buffering 5%packetizer_h264 warning: waiting for SPS/PPSpacketizer_h264 debug: found NAL_SPS (sps_id=0)packetizer_h264 debug: found NAL_PPS (pps_id=0 sps_id=0)qt4 debug: Updating the geometryqt4 debug: Updating the geometryqt4 debug: New caching: 5qt4 debug: New caching: 5main error: Read error: Bad file descriptorgnutls debug: GnuTLS deinitializedmain debug: removing module "gnutls"main debug: Buffering 11%ts debug: eof ?main debug: EOF reachedmain debug: Stream buffering done (141 ms in 122 ms)qt4 debug: New caching: 100qt4 debug: New caching: 100main debug: no usable vout present, spawning onemain debug: looking for text renderer module: 2 candidatesmain debug: thread (fontlist builder) created at priority 0 (../../.././modules/misc/freetype.c:473)freetype debug: using fontsize: 2main debug: using text renderer module "freetype"main debug: TIMER module_need() : 9.000 ms - Total 9.000 ms / 1 intvls (Avg 9.000 ms)main debug: looking for video filter2 module: 20 candidatesmain debug: thread startedfreetype debug: Building font database...freetype debug: Finished building font database.freetype debug: Took 0 microsecondsmain debug: thread endedswscale debug: 32x32 chroma: YUVA -> 16x16 chroma: YUVA with scaling using Bicubic (good quality)main debug: using video filter2 module "swscale"main debug: TIMER module_need() : 3.000 ms - Total 3.000 ms / 1 intvls (Avg 3.000 ms)main debug: looking for video filter2 module: 20 candidatesyuvp debug: YUVP to YUVA convertermain debug: using video filter2 module "yuvp"main debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)main debug: window size: 704x528main debug: looking for video output module: 7 candidatesvout_directx debug: creating DirectXEventThreadmain debug: thread (Vout Events Thread) created at priority 0 (../../../.././modules/video_output/msw/directx.c:282)main debug: thread startedvout_directx debug: DirectXCreateWindowmain debug: looking for hwnd module: 3 candidatesqt4 debug: requesting video...qt4 debug: Video was requested -1, -1qt4 debug: Video is resizing to: 704 528main debug: using hwnd module "qt4"main debug: TIMER module_need() : 57.000 ms - Total 57.000 ms / 1 intvls (Avg 57.000 ms)vout_directx debug: created video sub-windowvout_directx debug: Vout EventThread runningvout_directx debug: DirectXInitDDrawvout_directx debug: directx-device: vout_directx debug: DirectXEnumCallback: Primary Display Driver, displayvout_directx debug: DirectXEnumCallback: NVIDIA Quadro NVS 140M, \\.\DISPLAY1vout_directx debug: selecting NVIDIA Quadro NVS 140M, \\.\DISPLAY1qt4 debug: Updating the geometryvout_directx debug: screen dimensions (0x0,1400x1050)vout_directx debug: DirectDraw Capabilities: overlay=1 yuvoverlay=1 can_deinterlace_overlay=1 colorkey=1 stretch=1 bltfourcc=1vout_directx debug: End DirectXInitDDrawvout_directx debug: DirectXCreateDisplayvout_directx debug: DirectXCreateClippervout_directx debug: disabling screen savermain debug: using video output module "vout_directx"main debug: TIMER module_need() : 164.000 ms - Total 164.000 ms / 1 intvls (Avg 164.000 ms)main debug: Deinterlacing availablevout_directx debug: NewPictureVec overlay:yes chroma:YV12vout_directx debug: YUV overlay created successfullyvout_directx debug: End NewPictureVec (succeeded)main debug: got 1 direct buffer(s)main debug: pic render sz 704x288, of (0,0), vsz 704x288, 4cc I420, ar 4:3, sar 6:11, msk r0x0 g0x0 b0x0main debug: pic in sz 704x288, of (0,0), vsz 704x288, 4cc I420, ar 4:3, sar 6:11, msk r0x0 g0x0 b0x0main debug: pic out sz 704x288, of (0,0), vsz 704x288, 4cc I420, ar 4:3, sar 6:11, msk r0x0 g0x0 b0x0main debug: direct render, mapping render pictures 0-14 to system pictures 1-15main debug: End of video prerollmain debug: Received first picturemain debug: Decoder buffering done in 355 msmain debug: thread times: real 0m0.479047s, kernel 0m0.046800s, user 0m0.109200smain debug: finished inputmain debug: waitpipe: object killedavcodec debug: ffmpeg codec (H264 - MPEG-4 AVC (part 10)) stoppedmain debug: removing module "avcodec"main debug: killing decoder fourcc `h264', 0 PES in FIFOmain debug: [0] 0 0main debug: [1] 0 0main debug: [2] 0 0main debug: [3] 0 0main debug: [4] 0 0main debug: [5] 0 0main debug: [6] 0 0main debug: [7] 0 0main debug: [8] 0 0main debug: [9] 0 0main debug: [10] 0 0main debug: [11] 0 0main debug: [12] 0 0main debug: [13] 0 0main debug: [14] 2 0main debug: saving a free voutmain debug: Post-processing availablemain debug: removing module "packetizer_h264"ts debug: pid list:ts debug: - pid[0] seents debug: - pid[66] seenmain debug: Program doesn't contain anymore ESts debug: - pid[68] seents debug: - pid[8191] seenmain debug: removing module "ts"main debug: removing module "stream_filter_record"main debug: removing module "access_http"main debug: thread endedmain debug: dead inputmain debug: thread times: real 0m1.564156s, kernel 0m0.156001s, user 0m0.748804smain debug: changing item without a request (current 0/1)main debug: nothing to playmain debug: destroying useless voutvout_directx debug: DirectXCloseSurfacevout_directx debug: DirectXCloseDisplayvout_directx debug: DirectXCloseDisplay clippervout_directx debug: DirectXCloseDisplay displayvout_directx debug: DirectXCloseDDrawvout_directx debug: DirectXEventThread terminatingvout_directx debug: DirectXCloseWindowvout_directx debug: WinProc WM_DESTROYqt4 debug: releasing video...qt4 debug: IM: Deleting the inputqt4 debug: Updating the geometryqt4 debug: Updating the geometrymain debug: TIMER input launching for 'https://server_ip:8888' : 1121.000 ms - Total 1121.000 ms / 1 intvls (Avg 1121.000 ms)qt4 debug: Video is not needed anymoreqt4 debug: Updating the geometrymain debug: removing module "qt4"main debug: thread endedmain debug: thread times: real 0m0.409040s, kernel 0m0.000000s, user 0m0.015600smain debug: removing module "vout_directx"main debug: thread times: real 0m0.003000s, kernel 0m0.000000s, user 0m0.000000smain debug: removing module "freetype"main debug: removing module "yuvp"main debug: removing module "swscale"
When I try to connect on client the server gives the following messages:
[0x863da70] gnutls generic error: A TLS packet with unexpected length was received.[0x863e240] gnutls generic error: A TLS packet with unexpected length was received.[0x864f6e8] gnutls generic error: A TLS packet with unexpected length was received.[0x8654998] gnutls generic error: A TLS packet with unexpected length was received.[0x8654b60] gnutls generic error: Error in the push function.[0x8654cb8] gnutls generic error: Error in the push function.[0x86272f0] mux_ts mux warning: packet with too strange dts (dts=2122481877,old=2122521608,pcr=2122521608)[0x863e320] gnutls generic error: Error in the push function.[0x864e258] gnutls generic error: Error in the push function.[0x86272f0] mux_ts mux debug: adjusting rate at 0/1040255 (28/26)[0x86272f0] mux_ts mux debug: adjusting rate at 39988/1040255 (26/0)[0x8646b18] gnutls generic error: Error in the push function.
I'm having the same problem (for both 1.0 and trunk).
I am attaching a patch that appears to resolve the 1.0 client-side "main error: Read error: Bad file descriptor" problem when using gnutls. The patch exposes WSAGetLastError() which only applies to the current thread, and also maps GNUTLS_E_AGAIN to WSAEWOULDBLOCK, as checked by src/network/io.c .
This bug also effects the Mac version of VLC and is easily fixed by manually creating a ca-certificated.crt file and moving it to the right location (on Mac, this is done with Keychain Utility but in theory one can just copy it from an unbuntu installation).
I also described it in this forum post: http://forum.videolan.org/viewtopic.php?f=2&t=78766&p=258894&hilit=ca+certificates.crt#p258894
If it can't be fixed, maybe the error message (not in the log) can be more descriptive or point to a small howto?
eins78changed title from Win32 VLC doesn't open https stream to Win32 + Mac VLC doesn't open https stream
changed title from Win32 VLC doesn't open https stream to Win32 + Mac VLC doesn't open https stream
Can you please provide info how you manually created certificates? I mean CA and client certificates. Do you used gnu-tls for this?
Mic.
Replying to [comment:29 eins78]:
This bug also effects the Mac version of VLC and is easily fixed by manually creating a ca-certificated.crt file and moving it to the right location (on Mac, this is done with Keychain Utility but in theory one can just copy it from an unbuntu installation).
I also described it in this forum post: http://forum.videolan.org/viewtopic.php?f=2&t=78766&p=258894&hilit=ca+certificates.crt#p258894
If it can't be fixed, maybe the error message (not in the log) can be more descriptive or point to a small howto?
Can you please provide info how you manually created certificates? I mean CA and client certificates. Do you used gnu-tls for this?
I used the OpenSSL package in ubuntu. Howto: https://help.ubuntu.com/community/OpenSSL#Configuring%20Apache%20for%20SSL%20Support
The last import example, "update ca-certificates", lets you create the ca-certificates.crt with a self-signed certificate.
You can also create this file in OS X by selecting some certificates in the Keychain and exporting them into a file with that name.
Just to be clear, this bug also effects non-self-signed ssl-connections but the fix also applies because most relevant root certificates are bundled.
The src/ part of the patch only sets a correct error code. In fact, I do not understand why it is needed at all (vlc_restorecancel() should not change the Winsock error value under any circumstances).
As far as I know this bug has been fixed for quite a while.
As far as I know this bug has been fixed for quite a while.
No, at least not on MacOS.
Replying to [comment:33 courmisch]:
Correct title.
why? this bug is still present in the OS X version (i just tested with the most recent nightly). one could argue if it's really a bug or just an inconvienience, but anyhow nothing changed to explain your change of title.
(or maybe this is about some bug-filing policy i am not aware of. should the OS X version get a seperate ticket? it just crossed my mind because trac also has no option to choose "win32+MacOS" as an option…)
Did you actually read the bug report? I did not see any evidence that this particular error was still occurring on Windows with an updated VLC, nor that it ever hit MacOS.
If you have a different bug, file a different bug.