LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-09-2015, 08:26 AM   #4621
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370

Quote:
Originally Posted by fang2415 View Post
... I get that same error on two computers running Ubuntu 14.04 LTS, and like I say it persists with games from 2014 ...
(It does make me wonder if/when the nexdef streams will go away though... Surely they won't keep serving them forever?)
Have you run software updates recently? If not, I suggest you do so. If you have, then ubuntu are probably shipping an out of date certificate. Unfortunately the error message does not identify the expired intermediate certificate (in fact, the libcurl error message is next to useless).

I doubt the nexdef streams are going to go away, because they are at present used by the MLB.TV web client and are the focus of their attention. The rtmp streams are much more likely to be for the chop. (The web client does not happen to use the java nexdef plugin any more when accessing the nexdef streams except when in legacy/audio overlay mode, but that's a different issue.)
 
Old 03-09-2015, 09:58 AM   #4622
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Quote:
Have you run software updates recently? If not, I suggest you do so. If you have, then ubuntu are probably shipping an out of date certificate. Unfortunately the error message does not identify the expired intermediate certificate (in fact, the libcurl error message is next to useless).
Yep, updated yesterday. It doesn't seem likely that Ubuntu would ship bad certs, but it seems very likely that mlbhls's use of libcurl might get tripped up by something else. I'm at work now but I'll try re-updating when I get home and maybe switching the version of libcurl (I think there's an openssl flavour as well as a couple others available). And who knows, it might just start working again magically...

Quote:
I doubt the nexdef streams are going to go away, because they are at present used by the MLB.TV web client and are the focus of their attention. The rtmp streams are much more likely to be for the chop. (The web client does not happen to use the java nexdef plugin any more when accessing the nexdef streams except when in legacy/audio overlay mode, but that's a different issue.)
Right, got it, that makes sense -- so then the video format would stay the same but they have some new way to play it in the web client and so can advertise "no more nexdef". That would be nice, since it means mlbhls might just keep working forever... (Assuming I can get it to work at all, of course. )
 
Old 03-09-2015, 11:04 PM   #4623
thegryghost
Member
 
Registered: Mar 2009
Distribution: Gentoo
Posts: 30

Rep: Reputation: 1
Quote:
Originally Posted by daftcat View Post
I have only just started to look into Pi and mlbviewer but so far, I'm not impressed. I got everything installed just to learn that the mplayer2 packaged with Raspbian or in the Wheezy sources is not hardware accelerated. I did find omxplayer, but it has no option to stream from standard input. I hacked together a video_player= line to dump the stream to a file and then played from the file in omxplayer from a different terminal. After all that, the picture quality was far below Samsung TV app, the Roku, and the ChromeCast. Also, omxplayer bailed before the stream was finished being dumped. Which brought home just how many cool features will be cut off at the knees because omxplayer cannot stream from stdin. Anyway, that's all I want to look at this tonight. I believe at least one of you had asked about the Pi last year. If you got anywhere with it with mlbviewer, please share with me what you did. Thanks!
This is the reason I've moved onto Kodi (formerly XBMC) as my media player. They have ports that support accelerated video for almost every hardware platform/operating system (x86/x86_64, ARM, MIPS, Android, Linux, Windows, Mac, etc). Not all platforms have properly accelerated video but if you're careful in what you buy, like the raspberry pi, you'll be OK.
 
Old 03-10-2015, 01:21 PM   #4624
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by fang2415 View Post
Yep, updated yesterday. It doesn't seem likely that Ubuntu would ship bad certs, but it seems very likely that mlbhls's use of libcurl might get tripped up by something else. I'm at work now but I'll try re-updating when I get home and maybe switching the version of libcurl (I think there's an openssl flavour as well as a couple others available). And who knows, it might just start working again magically...



Right, got it, that makes sense -- so then the video format would stay the same but they have some new way to play it in the web client and so can advertise "no more nexdef". That would be nice, since it means mlbhls might just keep working forever... (Assuming I can get it to work at all, of course. )
I use the opensssl flavor of libcurl so that's a data point of what works. Hope that helps.
 
Old 03-10-2015, 02:38 PM   #4625
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Quote:
Originally Posted by fang2415 View Post
Yep, updated yesterday. It doesn't seem likely that Ubuntu would ship bad certs, but it seems very likely that mlbhls's use of libcurl might get tripped up by something else. I'm at work now but I'll try re-updating when I get home and maybe switching the version of libcurl (I think there's an openssl flavour as well as a couple others available). And who knows, it might just start working again magically...
Well, I still can't get this working, after trying just about everything I could think of short of diving into any actual code. Resintalled libcurl, reinstalled libssl, tried the other libcurl flavors, tried an unpatched mlbhls, upgraded the system... and I get the error every time. The problem does seem to be limited to my Ubuntu boxen though -- I tried installing everything on an old machine running Debian Squeeze and it worked a treat. But the Ubuntu machines still get the same curl error.

So I guess this is either an Ubuntu bug or a bug somewhere else that only Ubuntu (and maybe just 14.04) notices? And I guess the only thing to do is... wait for an update (and use the rtmp streams in the meantime)? That isn't a disaster for me, especially during spring training, but if anybody has any other thoughts on what might be going on I'd appreciate it.
 
Old 03-10-2015, 03:40 PM   #4626
pajamian
Member
 
Registered: Oct 2009
Posts: 38

Rep: Reputation: 1
Quote:
Originally Posted by fang2415 View Post
Well, I still can't get this working, after trying just about everything I could think of short of diving into any actual code. Resintalled libcurl, reinstalled libssl, tried the other libcurl flavors, tried an unpatched mlbhls, upgraded the system... and I get the error every time. The problem does seem to be limited to my Ubuntu boxen though -- I tried installing everything on an old machine running Debian Squeeze and it worked a treat. But the Ubuntu machines still get the same curl error.

So I guess this is either an Ubuntu bug or a bug somewhere else that only Ubuntu (and maybe just 14.04) notices? And I guess the only thing to do is... wait for an update (and use the rtmp streams in the meantime)? That isn't a disaster for me, especially during spring training, but if anybody has any other thoughts on what might be going on I'd appreciate it.
Try the --insecure option to curl which tells it to ignore the certificate verification result. You can put this in .curlrc as the word "insecure" on a line by itself.
 
Old 03-10-2015, 05:28 PM   #4627
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
I have Ubuntu 14.10 so there's another data point for you. If all else fails, the live CD works very well through VirtualBox if you use the install script to create the template with hardware acceleration for graphics. I don't know what the minimum requirements are but a relatively new machine like dual-core and 1 GB RAM or more should work for running it in virtual machine mode. The virtual machine itself is only a single core and 512 mb memory.
 
Old 03-14-2015, 12:32 PM   #4628
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Well, I've done some more digging, and I think I've found something strange. The short version is: it looks like there is indeed a self-signed certificate in MLBAM's chain, which my 'broken' Ubuntu machines (sensibly?) don't trust, but which my 'working' Debian machine silently ignores. This is strange because it seems like my 'broken' machines are actually showing the expected behavior, while 'working' machines are not.

The longer version:

On an up-to-date 'broken' Ubuntu 14.04, I used curl on the command line to download the url in the error message, with the same result:

Code:
$ curl 'https://mlb-ws.mlb.com'
curl: (60) SSL certificate problem: self signed certificate in certificate chain
That's not very specific, so I tried downloading the same link with wget, and lo, the same behavior, with a more specific message:

Code:
$ wget 'https://mlb-ws.mlb.com'
--2015-03-14 15:52:27--  https://mlb-ws.mlb.com/
Resolving mlb-ws.mlb.com (mlb-ws.mlb.com)... 209.102.210.74
Connecting to mlb-ws.mlb.com (mlb-ws.mlb.com)|209.102.210.74|:443... connected.
ERROR: cannot verify mlb-ws.mlb.com's certificate, issued by /C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287:
  Self-signed certificate encountered.
To connect to mlb-ws.mlb.com insecurely, use `--no-check-certificate'.
Some Googling revealed that openssl has a command-line client that can be used to debug further:

Code:
$ openssl s_client -connect mlb-ws.mlb.com:443
CONNECTED(00000003)
depth=3 L = ValiCert Validation Network, O = "ValiCert, Inc.", OU = ValiCert Class 2 Policy Validation Authority, CN = http://www.valicert.com/, emailAddress = info@valicert.com
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
 0 s:/OU=Domain Control Validated/CN=mlb-ws.mlb.com
   i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287
 1 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287
   i:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
 2 s:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
   i:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com
 3 s:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com
   i:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com

[then outputs the actual certificate and a bunch of less specific
stuff, repeats the error 19 message, and hangs]
I'm no SSL expert, but that last one does look like a self-signed cert to me: unlike the others (or any in a chain for a url like wikipedia.org), its subject is the same as its issuer.

Then I checked on my up-to-date Debian Squeeze (now LTS) machine, on which mlbhls works as expected. I don't want to keep cluttering the post with output messages, but suffice it to say that the openssl s_client command above produced the exact same certificate chain as above, the same error 19 message, and the same hang afterwards. So this machine's openssl command was seeing the same error as the Ubuntu box.

Then I tried curl on the Debian box:

Code:
$ curl https://mlb-ws.mlb.com
bammmws
(That 'bammmws' looks to be the correct content of that page -- Firefox will also show that, even on the Ubuntu box.) I also tried wget on the Debian box and it downloaded the page just fine. That box does not have a ~/.curlrc or a ~/.wgetrc file.

So, that makes it look to me like the Ubuntu boxes are refusing to accept a self-signed certificate, which seems like a reasonable thing to do, and the Debian box (and maybe all of your working setups?) are accepting it without complaint (which seems bad?).

pajamian, your suggestion to have curl ignore the verification works a treat when I use curl on the command line, but doesn't seem to affect the behavior of libcurl (which is what mlbhls uses). But anyway, is it really a good idea to just disable a security warning (indeed, *all* security warnings that curl might raise)? Frankly, now I'm getting more worried about my Debian box silently ignoring cert errors than I am about getting mlbhls working...

But maybe I'm overlooking something stupid here? Do other people see the same error when running 'openssl s_client -connect mlb-ws.mlb.com:443'? Is there some sort of new/old SSL exception that changes the expected behavior in this case? Can I or should I change the way libcurl handles this error?

Sorry for a long post for a problem only I seem to be having, but if it makes sense to anybody else I'd appreciate it if you could let me know.

In the meantime, I'm loving the RTMP streams!

Last edited by fang2415; 03-14-2015 at 12:41 PM.
 
Old 03-14-2015, 12:37 PM   #4629
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
I don't know what the minimum requirements are but a relatively new machine like dual-core and 1 GB RAM or more should work for running it in virtual machine mode. The virtual machine itself is only a single core and 512 mb memory.
Oh, and thanks for the suggestion, but this pretty much rules it out I'm afraid -- the computers I use for mlbviewer are two first-gen Asus EEEs and an OLPC! (Indeed, mlbviewer is a lifesaver for these machines, since they don't have the juice to run the bloated official in-browser setup. )
 
Old 03-14-2015, 03:48 PM   #4630
pajamian
Member
 
Registered: Oct 2009
Posts: 38

Rep: Reputation: 1
Quote:
Originally Posted by fang2415 View Post
Code:
$ openssl s_client -connect mlb-ws.mlb.com:443
CONNECTED(00000003)
depth=3 L = ValiCert Validation Network, O = "ValiCert, Inc.", OU = ValiCert Class 2 Policy Validation Authority, CN = http://www.valicert.com/, emailAddress = info@valicert.com
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
 0 s:/OU=Domain Control Validated/CN=mlb-ws.mlb.com
   i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287
 1 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287
   i:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
 2 s:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
   i:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com
 3 s:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com
   i:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com

[then outputs the actual certificate and a bunch of less specific
stuff, repeats the error 19 message, and hangs]
I'm no SSL expert, but that last one does look like a self-signed cert to me: unlike the others (or any in a chain for a url like wikipedia.org), its subject is the same as its issuer.
Well, the root CA certificate is always self-signed, it has to be because there is no higher-level cert to sign it with. That's not the problem, but this does show what the actual issue is.

The root CA certificate is not supposed to be included in the certificate chain, various browsers already have it installed so it's not needed to include it twice. MLB is including it in the certificate chain, though and that appears to be confusing your version of libcurl (mine handles it just fine). It would appear that most SSL/TLS libraries can handle this minor infraction but some can't, so this is really an issue from MLB.

From your end, I would try a different curl implementation (as daftcat originally suggested try the openssl flavor instead of the nss one or vice-versa). I'm not sure if there is anyone here who has a contact at MLB or knows how to file a bug report to get them to fix their server to not send the root certificate with the rest of the chain?

Oh, incidentally, s_client isn't "hanging", it's connected to a http server which is now waiting for your input. Typing QUIT will tell the server to close the http connection. I normally include the QUIT on the command line when doing my diagnostics:
Code:
openssl s_client -connect mlb-ws.mlb.com:443 <<<"QUIT"

Last edited by pajamian; 03-14-2015 at 04:24 PM.
 
1 members found this post helpful.
Old 03-15-2015, 06:01 AM   #4631
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
In addition to what pajamian said (that you don't need the root certificate in the server's announced certificate chain), I should check that in the non-working machines you have the root certificate ValiCert_Class_2_VA.pem or ValiCert_Class_2_VA.crt (or whatever ubuntu happens to call it) in both /etc/ssl/certs and /usr/share/ca-certificates/mozilla (the first is usually a symbolic link to the second). If you haven't, copy the certificate across from one of your working machines and run c_rehash.

Last edited by chrisVV; 03-15-2015 at 06:08 AM.
 
1 members found this post helpful.
Old 03-15-2015, 06:07 AM   #4632
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Wow, terrific, thanks pajamian! I'm still a little fuzzy on some of the TLS details, but apparently unlike me you actually know what you're doing with this stuff, so I'm happy to take your word for it based on your diagnosis of the cert chain.

Unfortunately, I already am running the openssl flavor of libcurl (libcurl4-openssl-dev on Ubuntu 14.04), and I've also tried the nss and gnutils flavor with the same results. But the fact that wget shows the same behavior (on Ubuntu 14.04 only) makes me wonder if the workaround might be happening somewhere else?

I suppose worst-case, I could go hunting through mlbhls's source to add the insecure flag to (at least) this particular curl call... But that seems neither easy nor a very good solution to an upstream problem, so any other suggestions of how to work around it would be appreciated!
 
Old 03-15-2015, 07:56 AM   #4633
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Quote:
Originally Posted by chrisVV View Post
In addition to what pajamian said (that you don't need the root certificate in the server's announced certificate chain), I should check that in the non-working machines you have the root certificate ValiCert_Class_2_VA.pem or ValiCert_Class_2_VA.crt (or whatever ubuntu happens to call it) in both /etc/ssl/certs and /usr/share/ca-certificates/mozilla (the first is usually a symbolic link to the second). If you haven't, copy the certificate across from one of your working machines and run c_rehash.
WINRAR! That certificate was indeed missing from the broken machines and present on the working one. For reference, in case anybody else runs into this problem, I actually had to copy the ValiCert_Class_2_VA.crt file from the working machine to the /usr/share/ca-certificates/mozilla folder of the broken machine and setup the symlink to the /usr/ssl/certs/ folder like so:
Code:
sudo ln -s /usr/share/ca-certificates/mozilla/ValiCert_Class_2_VA.crt /etc/ssl/certs/ValiCert_Class_2_VA.pem
At that point, c_rehash could find it all right, and running it (as root) with no arguments found the new cert and I get
Code:
$ curl 'https://mlb-ws.mlb.com'
bammmws
on an Ubuntu 14.04 machine.

I guess that leaves me with three follow-up questions:
  1. Is there someplace online where that ValiCert file can be safely downloaded in case this happens to anyone who doesn't have a working system handy?
  2. If having that cert fixes the problem, is it really still an MLB bug, and should we bother trying to report it?
  3. Is the missing cert also/instead an Ubuntu bug and should I try to report that?

Thanks a heap for everyone's help on this, trying to understand that openssl stuff felt like reading hieroglyphics. Really glad I posted that output and that you guys knew what it meant and where to look for a fix.
 
Old 03-15-2015, 08:13 AM   #4634
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
Oh yeah and I forgot to mention -- mlbhls works perfectly now, just in time for me to see Bob Uecker call the Cubs game!

Thanks again guys!

Last edited by fang2415; 03-15-2015 at 08:24 AM.
 
Old 03-15-2015, 09:12 AM   #4635
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by fang2415 View Post
  • Is there someplace online where that ValiCert file can be safely downloaded in case this happens to anyone who doesn't have a working system handy?
You can download it from https://certs.godaddy.com/repository as "valicert_class2_root.crt" under "ValiCert Legacy Certificate Chain".

EDIT: Take care. It is legacy because it only has 1024 bits of encryption (see next post).

Chris

Last edited by chrisVV; 03-15-2015 at 12:19 PM.
 
  


Reply

Tags
help, install, installation, instructions, seek, vlc, windows



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mlb.com gameday audio stream statmobile Linux - Newbie 6 05-06-2008 10:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 10:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration