Troubles getting updates?

For a long time now I am having this trouble that when OSMC tries to update there is an error.

I already have researched it to what the problem is.

The problem is that apt is unable to retrieve information form apt.osmc.tv. It fails with an “internal server error”.

curl -v http://apt.osmc.tv

  • Rebuilt URL to: http://apt.osmc.tv/
  • Hostname was NOT found in DNS cache
  • Trying 159.253.212.250…
  • Connected to apt.osmc.tv (159.253.212.250) port 80 (#0)

GET / HTTP/1.1
User-Agent: curl/7.37.0
Host: apt.osmc.tv
Accept: /

< HTTP/1.1 500 Internal server error
< Date: Sun, 11 Dec 2016 09:43:22 GMT

  • Server Varnish is not blacklisted
    < Server: Varnish
    < X-Varnish: 124994693
    < Content-Length: 0
    < Connection: keep-alive
    <
  • Connection #0 to host apt.osmc.tv left intact

I have found a workaround for the problem by changing http://apt.osmc.tv to Index of /osmc/osmc/apt in the sources.list

But I don’t think this should be a permanent solution.

What is wrong on the server on apt.osmc.tv that it produces this internal server error?
Can it be corrected?

Abraham.

PS: For the same reason as above I am unable to open How to submit a useful support request - General - OSMC So I am sorry if I did not follow up on some forum rules or instructions.

Did you try setting 8.8.8.8 as DNS server? Because your problem is DNS.

The problem is not DNS

It works here.

You probably have a proxy between you. If there was an issue with APT the forum would probably be more busy

I am not using a proxy.
I also forwarded this problem to my ISP but they say that’s its the error on the owner of the website not theirs.

It doesn’t seem to be a problem with our box; or as mentioned, we’d see some reports of it on our forum.

sam@sam-XPS-15-9550:~$ curl -v http://apt.osmc.tv
* Rebuilt URL to: http://apt.osmc.tv/
*   Trying 159.253.212.250...
* Connected to apt.osmc.tv (159.253.212.250) port 80 (#0)
> GET / HTTP/1.1
> Host: apt.osmc.tv
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 302 Found
< Date: Sun, 11 Dec 2016 17:37:42 GMT
< location: http://ftp.fau.de/osmc/osmc/apt/
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< Age: 0
< Connection: keep-alive
< 
* Connection #0 to host apt.osmc.tv left intact

Please let me know what I can do to provide more information about the problem, How can I provide you detailed information about it?

In other words, what do you need from me?

ISP?
When did the problem first begin?
Have you tried rebooting your router / modem?

If you’re having problems with the APT server, it’s possible you’ll have issues with other websites too. It’s hard to give any advice without knowing your environment, but a really simple test would be to go to apt.osmc.tv in your browser on a phone without being connected to WiFi to see if it loads. If it does, the problem is related to your ISP or network

This problem first started on the first week of april this year and has been persisted ever since.

I tested it from both my home and work servers.

They are similar Linux server running bind-chroot with identical configurations and no proxy.

The weird thing is that it is working from work but not at home.

The only difference is the ISP. At work we are with Ziggo. Here at home I am with Tweak.

If you say it is not a misconfigured web server on your site then that leaves me no other choice then to prove to my ISP it is their fault but I don’t know how to do that.

Can I use some curl or other command to show my ISP what the culprit is?

Thank you

Surely just send them the cURL command and see if it works on their end. I always get suspicious of people’s networks however. Try this:

  • Plug modem / router directly
  • Plug OSMC in to router with NAT

Try the command again, i.e. remove the Linux server from the equation.

It looks like you are getting MITM’d. It won’t be a valid cert, so pass the cURL option not to check, but try https://apt.osmc.tv. I suspect that will work

This is the result I get, using the https link in a browser shows the software repository.
So my ISP uses some sort of mechanism to intercept traffic?

root@osmc-2:~# curl -v https://apt.osmc.tv

  • Rebuilt URL to: https://apt.osmc.tv/
  • Hostname was NOT found in DNS cache
  • Trying 159.253.212.250…
  • Connected to apt.osmc.tv (159.253.212.250) port 443 (#0)
  • successfully set certificate verify locations:
  • CAfile: none
    CApath: /etc/ssl/certs
  • SSLv3, TLS handshake, Client hello (1):
  • SSLv3, TLS handshake, Server hello (2):
  • SSLv3, TLS handshake, CERT (11):
  • SSLv3, TLS handshake, Server key exchange (12):
  • SSLv3, TLS handshake, Server finished (14):
  • SSLv3, TLS handshake, Client key exchange (16):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
  • Server certificate:
  •    subject: CN=osmc.tv
    
  •    start date: 2016-11-29 23:30:00 GMT
    
  •    expire date: 2017-02-27 23:30:00 GMT
    
  •    subjectAltName does not match apt.osmc.tv
    
  • SSL: no alternative certificate subject name matches target host name ‘apt.osm c.tv
  • Closing connection 0
  • SSLv3, TLS alert, Client hello (1):
    curl: (51) SSL: no alternative certificate subject name matches target host name ‘apt.osmc.tv
    root@osmc-2:~#

BTW is there any harm done by using the solution I use for this like I already mentioned before?

Yes, it looks like your ISP is intercepting HTTP traffic. That’s not good.

If you use the replacement URL it will work for now but may change in future. Simple solution if this happens is to find out the new URL