Jump to content


Photo

emby-server not listening to http/https requests at random

https http curl netstat listen

  • Please log in to reply
11 replies to this topic

#1 maxxoverclocker OFFLINE  

maxxoverclocker

    Member

  • Members
  • 17 posts
  • Local time: 07:20 PM

Posted 17 May 2018 - 01:54 PM

Hi,

 

I've been having issues since upgrading (fresh install and restore using backup plugin) to 3.4.1.0. Basically what happens is emby-server will be running for hours without issue (sometimes only minutes), and then it just stops. Usually while in the middle of playback. The service doesn't stop, it just stops responding to https or http requests. I've verified this by running a curl command to look at the headers returned when this is happening.

curl --silent --insecure --connect-timeout 5 --max-time 8 --head http://emby.local:8096 | grep "HTTP/1.[01] 302 Found"
curl --silent --insecure --connect-timeout 5 --max-time 8 --head https://emby.local:8920 | grep "HTTP/1.[01] 302 Found" 

My setup is the following:

  • Hypervisor: ESXi 6.5.0 Update 1 (Build 7967591)
  • CPU: AMD Ryzen 7 1700
  • OS: Ubuntu 18.04 LTS
  • vCPUs: 8
  • RAM: 2GB

What I've done to combat this is I've create a cron script that runs every minute to check on the status of emby's http/https responses and restart the service accordingly:

sleep 10s
date=`date '+%F %H:%M:%S'`

if [[ $(netstat -ntlp | grep LISTEN | grep EmbyServer | grep 8096) ]]; then
    if [[ $(curl --silent --insecure --connect-timeout 5 --max-time 8 --head http://emby.local:8096 | grep "HTTP/1.[01] 302 Found") ]]; then
        if [[ $(netstat -ntlp | grep LISTEN | grep EmbyServer | grep 8920) ]]; then
            sleep 1s
            if [[ $(curl --silent --insecure --connect-timeout 5 --max-time 8 --head https://emby.local:8920 | grep "HTTP/1.[01] 302 Found") ]]; then
                sleep 1s
            else
                echo "$date : emby-server is not responding to https requests... restarting service"
                /usr/sbin/service emby-server restart
            fi
        else
            echo "$date : emby-server is not listening https requests... restarting service"
            /usr/sbin/service emby-server restart
        fi
        else
            echo "$date : emby-server is not responding to http requests... restarting service"
            /usr/sbin/service emby-server restart
    fi
else
    echo "$date : emby-server is not listening http requests... restarting service"
    /usr/sbin/service emby-server restart
fi

I set this script up yesterday and I've already had a few occurrences:

2018-05-16 21:57:11 : emby-server is not responding to http requests... restarting service
2018-05-16 21:59:11 : emby-server is not responding to http requests... restarting service
2018-05-17 09:52:11 : emby-server is not responding to https requests... restarting service

I've attached my server logs, but I really don't see what the issue is. I will note that *sometimes* when https doesn't work, http will continue to work. And when you log in to the admin console, it shows remote connections as http instead of https. This is making me feel like this is a config issue.

 

Suggestions?

 

Thanks!

Attached Files



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142429 posts
  • Local time: 10:20 PM

Posted 17 May 2018 - 03:27 PM

Hi, there's nothing obvious that jumps out here but i would suggest re-evaluating this with the next release of emby server. Thanks !



#3 maxxoverclocker OFFLINE  

maxxoverclocker

    Member

  • Members
  • 17 posts
  • Local time: 07:20 PM

Posted 17 May 2018 - 04:04 PM

Hi, there's nothing obvious that jumps out here but i would suggest re-evaluating this with the next release of emby server. Thanks !

 

Thanks! I will patiently wait for the next release :) The workaround seems to really make it not noticeable to the end user at the very least!



#4 marauder OFFLINE  

marauder

    Advanced Member

  • Members
  • 85 posts
  • Local time: 11:20 PM

Posted 25 July 2018 - 09:26 AM

A bit of a late bump, but I have a similar issue. The server will randomly stop responding on HTTP/HTTPS for 5-10 minutes then it'll come back. Once i'm connected it'll always stay connected, so I don't have to worry about playback stopping. But I will be trying to connect and it won't connect, but I can SSH into the machine without issue. WIthout making any changes or touching the system I'll be able to connect again. It's never more than 5-10 minutes. All the connections are from external. I also did a fresh reinstall at around 3.4.x and restored using server backup.

Release Version 3.5.1.0

 

  • Hypervisor: ESXi 6.5.0
  • OS: Ubuntu 18.04 LTS
  • vCPUs: 4
  • RAM: 32GB

Attached logs


Edited by marauder, 25 July 2018 - 09:28 AM.


#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142429 posts
  • Local time: 10:20 PM

Posted 25 July 2018 - 01:16 PM

Hi there, did you forget to attach the server log? thanks.



#6 marauder OFFLINE  

marauder

    Advanced Member

  • Members
  • 85 posts
  • Local time: 11:20 PM

Posted 25 July 2018 - 01:25 PM

Ops I chose the file, but forgot to attach it. 

Attached Files



#7 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142429 posts
  • Local time: 10:20 PM

Posted 25 July 2018 - 04:13 PM

And you're saying this has happened with the new 3.5.1 release?



#8 marauder OFFLINE  

marauder

    Advanced Member

  • Members
  • 85 posts
  • Local time: 11:20 PM

Posted 25 July 2018 - 04:17 PM

And you're saying this has happened with the new 3.5.1 release?

 

I actually just updated to 3.5.1 last night. I should correct it that I've experienced this issue will all versions from 3.2 through to 3.5.0. I do not know if 3.5.1 has resolved it yet. I will try to replicate it and let you know.



#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142429 posts
  • Local time: 10:20 PM

Posted 25 July 2018 - 05:06 PM

Well it won't be different from 3.5. If the issue remains, try turning off the server's dlna features, then restart the server and see if that makes a difference. thanks.



#10 marauder OFFLINE  

marauder

    Advanced Member

  • Members
  • 85 posts
  • Local time: 11:20 PM

Posted 30 July 2018 - 09:51 AM

I had the issue happen again. This time it happened while I was playing a video, that hasn't happened before. It happened around 930 PM. Afterwards i could connect back but emby was to slow to do anything, it wasn't loading the pages properly and couldn't play anything. Around 10:15 The server was completely unconnectable until the process was restarted. Looking at my settings I do not have DNLA enabled. 

I've attached the logs from that day. I have also updated to Version 3.5.2.0

Attached Files


Edited by marauder, 30 July 2018 - 09:58 AM.


#11 maxxoverclocker OFFLINE  

maxxoverclocker

    Member

  • Members
  • 17 posts
  • Local time: 07:20 PM

Posted 23 August 2018 - 03:51 PM

Well it won't be different from 3.5. If the issue remains, try turning off the server's dlna features, then restart the server and see if that makes a difference. thanks.

 

Luke, it looks like this was resolved in 3.5.2.0 (for me). I haven't had any instances of random listening issues since! Thank you!

 

2018-07-27 19:44:11 : emby-server is not responding to https requests... restarting service
2018-07-29 23:32:11 : emby-server is not listening to http requests... restarting service
2018-07-30 10:38:11 : emby-server is not listening to http requests... restarting service
2018-07-30 10:39:11 : emby-server is not responding to https requests... restarting service
2018-08-07 11:29:11 : emby-server is not responding to https requests... restarting service
2018-08-07 12:05:11 : emby-server is not responding to https requests... restarting service
2018-08-07 12:11:11 : emby-server is not responding to https requests... restarting service
2018-08-09 21:42:11 : emby-server is not responding to http requests... restarting service
2018-08-14 09:30:11 : emby-server is not responding to https requests... restarting service
## 2018-08-15: Upgraded to 3.5.2.0

Edited by maxxoverclocker, 23 August 2018 - 03:52 PM.


#12 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 142429 posts
  • Local time: 10:20 PM

Posted 23 August 2018 - 03:52 PM

Thanks for the feedback !







Also tagged with one or more of these keywords: https, http, curl, netstat, listen

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users