OSMC crashes when using plex

So I’ve bought a Vero 4k+ a while ago but had issues with hdmi cec and didn’t use it for quite some time. Last week I wanted to start using it again but when I use the plex add on, osmc/kodi crashes.
The OS itself doesn’t crash as my ssh session stays open.

I tried going back to an older version of OSMC but then it’s somehow unable to find my plex server (I found some other thread that talked about a python dependency that causes the issue)

As soon as I upgrade to the current version I can access my plex server again but cannot play anything.

Other clients can play without issue such as my phone, my desktop or Chromecast.

Here are my debug logs (I pasted them somewhere else since the original included my domain name and I’d rather have that removed): Paste.ee - View paste Mnf92

Thank you very much in advance.

You can use grab-logs -A-P to write them to the device and edit them. Then you can use paste-log to upload to OSMC.

Maybe running out of Memory, could check free memory via SSH to confirm.
CCurlFile::WriteCallback - Failed to grow overflow buffer from 1515270144 bytes to 1515274240 bytes

Not sure if you can adapt the buffer somewhere.

It looks like the Plex server is routing over the internet and Kodi is timing out. Is your Plex server on the same local network? If so you probably need to check both the settings on your Plex server and the Kodi Plex add-on and make sure it is configured correctly. I think sometimes if you exclude your local subnet from requiring a token it can help.

Thanks for the tip with the logs.

It seems that it’s actually running out of memory. I always just looked at the CPU but when I start a movie the memory completely fills up and then it crashes. I wonder what the reason for this could be though.

No the server is not on the same local network but it should work as my chromecast or my phone are able to stream from it and they are on the same network as the Vero.

Is it always crashing or only under certain conditions like in this thread?

As far as I can see it happens with all content. I tried a few different shows with different resolutions and SD content works fine while it crashes with 1080p.

This happens independently of the sound (AC3, dts and stereo).

You might try setting refresh rate to on start/stop in Kodi player settings and try different things with direct play and bandwidth in the Plex add-on (the settings found by clicking on your plex logon at the top of the screen, not the settings that are available outside of the add-on). I’m a bit limited in experience here as I’ve only run the Kodi add-on over my LAN.

You might also want to check out the Composite add-on. It doesn’t have the Plex web interface look that some prefer but it may work better than the official add-on.

I changed the refresh rate setting but this didn’t help. While playing around in the plex settings I discovered that if I disable direct stream (but not direct play) the stream starts playing but then starts buffering after about 3 to 10 seconds. After that the ram fills up again and it crashes. What I saw was that sometimes kodi doesn’t crash completely but it just stops the stream and the autoplay countdown for the next episode in the series starts.

I actually tried out the composite add-on before making the post without any luck though. I’ll try again tomorrow. Otherwise I might just toss the vero and get some NUC or so. Kinda frustrated with this right now.

I understand that your experience with plex outside the lan is limited but I fail to see how it even makes a difference since it discovers the server just fine and can also browse it. Also other clients can play from it without any issue.

The whole reason I want to switch to the vero is because I want to upgrade to a 4k TV and my current chromecast is too weak for 4k content while the vero should be able to handle that.

How Plex communicates with Kodi is different depending on if it is traveling over the internet.

Plex does generally speaking have less issues on most other platforms. Why Plex does not maintain their Kodi add-on as diligently as some of their other clients would have to be answered by them.

It is able to and it does even through Plex on my system. That being said if your going to buy a 4K TV just make sure it is a smart TV with a Plex app available for it. The Plex app on my LG TV doesn’t have any issue I’ve run into with the few times I’ve tried it out.

I tried with a friend who has his plex server just port forwarded to 32400 and it started playing immediately. It was actually scary how fast it loaded.

I thought my problem might be my nginx reverse proxy so I started changing it up a bit. What I landed on was this configuration here: GitHub - toomuchio/plex-nginx-reverseproxy: Configuration to serve Plex Media Center https://plex.tv using Nginx https://nginx.com

I changed it up a little bit to accommodate my own config:

server {
listen 192.168.2.10:443 ssl;
server_name plex.domain.ch;

send_timeout 360m;
location / {

	proxy_pass http://127.0.0.1:32400;


}


#Forward real ip and host to Plex
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#When using ngx_http_realip_module change $proxy_add_x_forwarded_for to '$http_x_forwarded_for,$realip_remote_addr'
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;

#Websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";

    #Disables compression between Plex and Nginx, required if using sub_filter below.
#May also improve loading time by a very marginal amount, as nginx will compress anyway.
    #proxy_set_header Accept-Encoding "";

#Buffering off send to the client as soon as the data is received from Plex.
proxy_redirect off;
proxy_buffering off;

ssl_certificate /etc/ssl/domain.ch/domain.ch.fullchain;
ssl_certificate_key /etc/ssl/domain.ch/domain.ch.key;
#include /etc/letsencrypt/options-ssl-nginx.conf; 
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0
expires off;
#include /etc/nginx/conf.d/expires.global;
}

Other clients continue to work fine but the Vero still has the same issues.

I also tried out the plexkodiconnect add on again but it crashes when it tries to search for a plex server. It also crashes when I want to enter one manually.
Note: I reset the Vero 4k+ before doing this so I can be sure it’s nothing which I misconfigured before.

Oh I also tried changing my config so the plex server is in the same local network as my vero and there is no nginx in front of it so that it directly connects through port 32400 but kodi didn’t even find my server then. This is probably a configuration issue from my side but if I’m being honest, I don’t really want to remove nginx from this equation since I want to have everything cleanly behind it.

I think you will likely have more luck over on the plex forum. Plex knowledge over here is fairly sparse and you’ve moved well outside of my knowledgebase.

If anybody stumbles upon this thread in the future (or has an answer now), I opened up a topic on the plex forum: OSMC / Kodi crashes on Vero when using Plex - Streaming Devices - Plex Forum

I saw that you have to buy a codec pack for the raspberry pi: Frequently Asked Questions - Raspberry Pi - OSMC

Since I installed it on the vero with the vero image, do I also have to buy / install some codecs or are they integrated into the image?

That codecs are specific to the Pi to allow hardware based decoding for that codecs. The Vero has that all enabled by default.

1 Like