Jump to content

can't find the reason for my IPv6 issues


Recommended Posts

horstepipe
Posted

Hello

 

since about two months me and other users of mine who have IPv6 enabled clientside have a quite big delay (up to two minutes) until the "welcome" message appears in Kodi.

As soon as I disable IPv6 on Windows (client) the welcome message shows up instant.

 

Kodi log shows that those startup calls to the server need waay too long, e.g. this one

2019-08-28 15:02:10.517 T:4612  NOTICE: Emby.emby.core.http -> DEBUG:: --->[ http ] {
                                                "url": "https://embyserver:443/emby/System/Configuration", 
                                                "verify": true, 
                                                "headers": {
                                                    "Accept-Charset": "UTF-8,*", 
                                                    "Accept-encoding": "gzip", 
                                                    "X-MediaBrowser-Token": "xxx", 
                                                    "Content-type": "application/json", 
                                                    "Authorization": "MediaBrowser Client=Kodi, Device=Kodi (WollesPC), DeviceId=xxx, Version=4.1.14, UserId=xxx", 
                                                    "User-Agent": "Emby-Kodi/4.1.14"
                                                }, 
                                                "params": null, 
                                                "timeout": 30, 
                                                "type": "GET"
                                            }
2019-08-28 15:02:52.748 T:4612  NOTICE: Emby.emby.core.http -> DEBUG:: ---<[ http ][42228 ms]

@@Angelblue05 you already got complete log files from me, but I don't think this is addon related.

 

My central issue is that I have trouble finding out where exactly the problem occurs, it feels more and more that I need to charge my ISP.

My setup is
Emby server v4.2.1.0 on a Ubuntu 18.04 headless VPS --> Nginx --> Cloudflare

I am running this config for quite a while now never having this problem before.

 

I'm having no issues accessing the webinterface of emby at all which brings me to the problem that I don't know how to get proper support by Cloudlfare (if the problem is on their side). Cloudflare wants har-files from browser capturing the problem. As I don't have problems in browser, I can't capture anything here.

 

@@pir8radio I'd really love to get some advice how to troubleshoot this.

 

 

 

--------------------------------------------------------

 

So as I need to isolate the problem, I first disabled Cloudflare and nginx at all, accessing the server via plain http and its IP.
As expected, this works absolutely fine, no connection delays. But I'm only able to test the IPv4-address of my server.

@@Angelblue05 isn't it supported to enter a ipv6-address in Emby for Kodi?

 

It caught my eye that the server dashboard shows its IPv4-address at "LAN access" and "WAN access". I am very sure that in former times it populated the IPv6-adress here. @@Luke any idea about that? Has anything changed that could explain the different behavior now?

 

 

 

 

 

 

 

pir8radio
Posted

Hello

 

since about two months me and other users of mine who have IPv6 enabled clientside have a quite big delay (up to two minutes) until the "welcome" message appears in Kodi.

As soon as I disable IPv6 on Windows (client) the welcome message shows up instant.

 

Kodi log shows that those startup calls to the server need waay too long, e.g. this one

2019-08-28 15:02:10.517 T:4612  NOTICE: Emby.emby.core.http -> DEBUG:: --->[ http ] {
                                                "url": "https://embyserver:443/emby/System/Configuration", 
                                                "verify": true, 
                                                "headers": {
                                                    "Accept-Charset": "UTF-8,*", 
                                                    "Accept-encoding": "gzip", 
                                                    "X-MediaBrowser-Token": "xxx", 
                                                    "Content-type": "application/json", 
                                                    "Authorization": "MediaBrowser Client=Kodi, Device=Kodi (WollesPC), DeviceId=xxx, Version=4.1.14, UserId=xxx", 
                                                    "User-Agent": "Emby-Kodi/4.1.14"
                                                }, 
                                                "params": null, 
                                                "timeout": 30, 
                                                "type": "GET"
                                            }
2019-08-28 15:02:52.748 T:4612  NOTICE: Emby.emby.core.http -> DEBUG:: ---<[ http ][42228 ms]

@@Angelblue05 you already got complete log files from me, but I don't think this is addon related.

 

My central issue is that I have trouble finding out where exactly the problem occurs, it feels more and more that I need to charge my ISP.

 

My setup is

Emby server v4.2.1.0 on a Ubuntu 18.04 headless VPS --> Nginx --> Cloudflare

 

I am running this config for quite a while now never having this problem before.

 

I'm having no issues accessing the webinterface of emby at all which brings me to the problem that I don't know how to get proper support by Cloudlfare (if the problem is on their side). Cloudflare wants har-files from browser capturing the problem. As I don't have problems in browser, I can't capture anything here.

 

@@pir8radio I'd really love to get some advice how to troubleshoot this.

 

 

 

--------------------------------------------------------

 

So as I need to isolate the problem, I first disabled Cloudflare and nginx at all, accessing the server via plain http and its IP.

As expected, this works absolutely fine, no connection delays. But I'm only able to test the IPv4-address of my server.

@@Angelblue05 isn't it supported to enter a ipv6-address in Emby for Kodi?

 

It caught my eye that the server dashboard shows its IPv4-address at "LAN access" and "WAN access". I am very sure that in former times it populated the IPv6-adress here. @@Luke any idea about that? Has anything changed that could explain the different behavior now?

 

 

a few things to check first, Is your reverse proxy pointing to "localhost" or 127.0.0.1 for emby server?   If you are using linux isnt as easy to fix,  disable ipv6 in linux where your emby/nginx is running see if that helps.   Cloudflare will handle the ipv6 and talk to you over ipv4 if you have no AAAA records listed on your cloudflare DNS.       Also make sure you dont have cloudflare rocket loader, or minification enabled.      See if it helps.  Clients will still connect and show an ipv6 address in emby.  

  • Like 1
horstepipe
Posted

thank you very much for your input!

 

I already tried both, localhost and 127.0.0.1, made no difference.

Do you mean I'm supposed to disable ipv6 on the machine completely? What I already did is making nginx listen only on ipv4 and removed the AAAA record from Cloudflare - didn't help, either. Guess the problem is that the client still communicates to cloudflare via IPv6.

Rocket loader and auto minify is disabled, too.

 

Looks like the problem is not Cloudflare -> origin, but client -> Cloudflare.

 

A

curl -4 mydomain

behaves normal (quick response).

 

 

A

curl -6 mydomain

sometimes is quick, too. But sometimes it takes up to 15 seconds.

 

I'm now in contact with Cloudflare's support, hope they got an idea.

horstepipe
Posted

A

curl -6 origin_ipv6_address:8080/system/info/public

behaves normal, too. But this is plain http, so I don't know how meaningful this test is.

pir8radio
Posted

A

curl -6 origin_ipv6_address:8080/system/info/public
behaves normal, too. But this is plain http, so I don't know how meaningful this test is.

Are you doing https from nginx to emby? Or just http? Should be http.

 

 

Sent from my iPhone using Tapatalk

horstepipe
Posted

yes, nginx -> emby is plain http.

     location / {
        proxy_pass http://127.0.0.1:8080; 

These are the suggestions by Cloudflare support, unfortunately not very helpful:

Here is what I recommend in order to ensure all requests from Cloudflare are accepted by your server:

    1. Make sure that you're not blocking Cloudflare IPs in .htaccess, iptables, or your firewall.
    2. Make sure your hosting provider isn't rate limiting or blocking IP requests from the Cloudflare IPs and ask them to whitelist the IP addresses here: https://www.cloudflare.com/ips.
    3. Make sure the selected SSL option in the SSL/TLS tab is compatible with your hosting service configuration - What do the SSL options mean? 

I'll ask my hosting provider about the second one, but I don't think they're doing that.

horstepipe
Posted
   3. Make sure the selected SSL option in the SSL/TLS tab is compatible with your hosting service configuration - What do the SSL options mean? 

 

I checked this again by setting ssl settings in Cloudflare to "flexible", so now Cloudflare communicates in plain http to origin. But the delays are still present.

pir8radio
Posted

I checked this again by setting ssl settings in Cloudflare to "flexible", so now Cloudflare communicates in plain http to origin. But the delays are still present.

 

PM me your server url if you want...  see what a second set of eyes can do.

  • Like 1
horstepipe
Posted (edited)

Will do if the problem returns, very appreciated!!!

 

But for the moment I’m a little euphoric, the problem is totally gone since two hours. The welcome message shows up instantly and the streams start totally fast.

I was at heavy contact with Cloudflare support and my hosting provider’s support, but none of them told me that they did anything. But it really feels so.

 

So we will see tomorrow..

 

Thank you very much @@pir8radio

Edited by horstepipe
  • Like 1
horstepipe
Posted (edited)

hey

it turned out that the problem is between my ISP and Cloudflare in general. I fact I'm having the problem on every website using Cloudflare (and having ipv6 gateway enabled).

 

In browser you don't notice that as it just switches to IPv4 seamlessly. But when I do a curl -6 on these sites the response times partially are very high (20 seconds, 40 seconds...).

 

So for now I'm hoping that my ISP is going to fix that.

 

 

But in the meantime @@Angelblue05

is there a way telling Emby/Kodi to only make use of IPv4? I read about a advancedsettings.xml option

<disableipv6>

but this seems to stop Kodi from going online on my Apple TV at all.

 

Best regards

 

edit: I don't have the option to disable IPv6 on my modem

Edited by horstepipe

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...