Ombi-app / Ombi

Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
http://ombi.io
GNU General Public License v2.0
3.7k stars 395 forks source link

Syncing Plex content appears to not pickup anything inside a LXC Container #1783

Closed cbarratt closed 6 years ago

cbarratt commented 6 years ago

Ombi build Version:

V 3.0.XX

Update Branch:

Settings shows 'DotNetCore' for the branch

Media Sever:

Plex

Media Server Version:

1.10.0.4516

Operating System:

Ubuntu 16.04 inside an LXC container

Ombi Applicable Logs (from /logs/ directory or the Admin page):

2017-12-06 20:19:50.287 +00:00 [Information] Hangfire Server stopped.
2017-12-06 20:19:57.968 +00:00 [Information] Start installing Hangfire SQL objects...
2017-12-06 20:19:58.063 +00:00 [Information] Hangfire SQL objects installed.
2017-12-06 20:19:58.108 +00:00 [Information] Starting Hangfire Server
2017-12-06 20:19:58.113 +00:00 [Information] Using job storage: 'SQLite Server: Schedules.db'
2017-12-06 20:19:58.113 +00:00 [Information] Using the following options for Hangfire Server:
2017-12-06 20:19:58.113 +00:00 [Information]     Worker count: 1
2017-12-06 20:19:58.113 +00:00 [Information]     Listening queues: 'default'
2017-12-06 20:19:58.114 +00:00 [Information]     Shutdown timeout: 1.00:00:00
2017-12-06 20:19:58.114 +00:00 [Information]     Schedule polling interval: 00:00:15

Problem Description:

Dec  6 20:14:36 plexpy-ombi Ombi[10760]: #033[40m#033[32minfo#033[39m#033[22m#033[49m: Ombi.Schedule.Jobs.Plex.PlexContentSync[0]
Dec  6 20:14:36 plexpy-ombi Ombi[10760]:       Starting Plex Content Cacher
Dec  6 20:14:36 plexpy-ombi Ombi[10760]: #033[40m#033[32minfo#033[39m#033[22m#033[49m: Ombi.Schedule.Jobs.Plex.PlexContentSync[0]
Dec  6 20:14:36 plexpy-ombi Ombi[10760]:       Getting all content from server Barratt
Dec  6 20:14:37 plexpy-ombi Ombi[10760]: #033[40m#033[32minfo#033[39m#033[22m#033[49m: Ombi.Schedule.Jobs.Plex.PlexContentSync[0]
Dec  6 20:14:37 plexpy-ombi Ombi[10760]:       We found 2 items
Dec  6 20:14:37 plexpy-ombi Ombi[10760]: #033[40m#033[32minfo#033[39m#033[22m#033[49m: Ombi.Schedule.Jobs.Plex.PlexContentSync[0]
Dec  6 20:14:37 plexpy-ombi Ombi[10760]:       Starting EP Cacher

The problem appears to be that the plex content cacher runs, but every single time it runs it only finds 2 items, and then says "starting ep cacher", and thats it - nothing changes in Ombi (content stuck in processing request state).

Reproduction Steps:

Start the plex cache job or click manual cache in the plex settings.

mmolitor87 commented 6 years ago

Version | 3.0.2456 Branch | DotNetCore

root@Ombi:/opt/Ombi# uname -a Linux Ombi 4.13.4-1-pve #1 SMP PVE 4.13.4-25 (Fri, 13 Oct 2017 08:59:53 +0200) x86_64 x86_64 x86_64 GNU/Linux

Ubuntu 16.04 LTS image downloaded from the templates in Proxmox. No problems here with caching Plex.

cbarratt commented 6 years ago

Strange @mmolitor87 - another 2 users on the discordd chat were also having the same issue :(

mmolitor87 commented 6 years ago

A friend of mine pointed me to this since we've both been waiting to setup v3 and he was having the same issue you are. Only issue I ran into was needing to install libcurl4-openssl-dev which was under the common issue. I did also install curl, not realizing it was missing a library completely.

cbarratt commented 6 years ago

I appear to have both curl and the libcurl4 revel packages installed already! :(

I did install them both too when I noticed it wasn’t but installed from some errors.

mmolitor87 commented 6 years ago

What kernel are you on if you uname -a ?

cbarratt commented 6 years ago

‘4.13.4-1-pve #1 SMP PVE 4.13.4-25 (Fri, 13 Oct 2017 08:59:53 +0200) x86_64 x86_64 x86_64 GNU/Linux’

Was also the stock 16.04 template for a container on Proxmox :)

mmolitor87 commented 6 years ago

Yeah, since it shares the kernel with the host that means proxmox is latest for you. I also used the stock container and made no changes outside of the install document other than what I've listed with the libcurl4-openssl-dev and curl. Very odd...

Does your Plex user import work?

cbarratt commented 6 years ago

It is very weird! Especially as I’m not the only one too. Yeah my Plex user import worked perfectly :) people are able to use Ombi just fine having used the user import. I’d have expected that to fail due to missing and or broken http lib. Requests work just fine too :)

cbarratt commented 6 years ago

I wonder if it’s a Plex version / specific issue. I’m on the Plex pass builds 1.10.1.4561

mmolitor87 commented 6 years ago

Version 1.10.1.4561 here too!

cbarratt commented 6 years ago

All I can think to try and do is to wade through the code and figure out how to do some logging! Not very C# savvy :(

mmolitor87 commented 6 years ago

I have mine connecting directly to plex with local IP as opposed to external. Just trying to keep it very basic and find what is different, if anything.

cbarratt commented 6 years ago

Same here :) local IP which is just another LXC container on the same node. Hmm 🤔 I’ve been racking my brain for a while to figure this one out.

mmolitor87 commented 6 years ago

Plex is also in an LXC container for me as well.

For an easier time seeing the logging and tweaking the system: apt-get install screen to run screen in an lxc you have to script /dev/null screen -S Ombi cd /opt/Ombi ./Ombi you can then run the manual cache update and if you want to leave Ombi running and go tweak something just SHIFT+A+D and it'll back out of screen. You can get back in by screen -r

Do note that Ombi seems to need a restart between new package installs before it will see them. At least it needed it before it would pick up the curl ssl library.

tidusjar commented 6 years ago

Guys, i'm not sure what to suggest, I'd never even heard of LXC until a few days ago. Officially I/we support the LSIO docker container.

The way Ombi communicates to Plex is over HTTP using Plex's Web API, so there is nothing strange going on with the way we communicate.

mmolitor87 commented 6 years ago

@cbarratt have you done any changes in the proxmox networking? I have not. My LXC containers are on the same subnet and use the host's DNS which is the router pointing to pi-hole and a failover to google.

cbarratt commented 6 years ago

I think the networking is totally fine as it could easily contact Plex and Radarr/Sonarr - its purely just that one job for updating the plex content that doesn't work :(

bartmoorman commented 6 years ago

I had the same problem with Docker until I switched from C.UTF-8 to en_US.UTF-8.

What is the output of env | grep LANG ?

mmolitor87 commented 6 years ago

Can confirm mine is LANG=en_US.UTF-8 and I have had a problem in other containers with C.UTF-8 previously.

cbarratt commented 6 years ago

Fixing the locale/lang fixed it !!

rjsears commented 6 years ago

I was having the same issue but my fix was a little different. I already had the LANG=en_US.UTF-8: env | grep LANG: LANG=en_US.UTF-8

But I did not have LC_ALL set the same way. Once I set LC_ALL=en_US.UTF-8 it started working after a reboot!!

goldenpipes commented 6 years ago

i think this should be closed and a note be added to the wiki.

bartmoorman commented 6 years ago

The wiki was updated: https://github.com/tidusjar/Ombi/wiki/Installation#linux-systems