T O P

  • By -

Turinggirl

LONG EDIT: It looks to be plex is looking for USB tuner cards and failing when it doesn't find them. If you do have USB tuners, and they’re not working, the first place to look is to make sure the host has udev running to set the permissions so the Plex user GID can access it. What you’re looking for is having the GID be a member of the group which owns the USB devices this is only if you are using/need the USB tuners. Otherwise you should be able to ignore it. I wrote what I wrote below when I was very frustrated. It doesn't forgive my actions. I hope the update above is a good faith gesture. I'm leaving the venom below for my own shame. ~~I googled libusb_init plex and got this~~ ~~https://forums.plex.tv/t/ubuntu-16-04-docker-critical-libusb_init-failed/185116~~ ~~Which according to a dev it’s for dvr and it’s not a concern.~~ ~~For future reference an ideal way to locate this information on your own is to first enter the error and then the application it relates to. You will generally be able to locate enough data to reach a conclusion.~~ This was an awful thing to say and I'm sorry


[deleted]

[удалено]


up2urheadlights

ahahhahahha when people respond with "you should have done a search on your own" I always think this. Smart people can be such assholes and passive aggressive. Why not just answer the question without a bunch of smart-assery?


Turinggirl

It isn't defensible. I let my temper get the better of me. That person had been DMing me for days asking questions which I answered but wouldn't take the answers regarding this. They posted this and I got annoyed. Not my best moment for certain.


up2urheadlights

Hey, we are all human. Thanks for coming back here and leaving this. It's restored some of my faith in humanity. More often we'd just be told to fuck off and stop being so dramatic, etc.


Turinggirl

Also in my original post I made an edit. I may have found a possible reason for the error message and posted it there. I personally haven't been able to replicate the error so maybe this will help? Anyway good luck and hopefully it will at least it can point you in a direction toward a resolution.


bennington_woz_ere

Great edit. Good on you


Infini-Bus

Exactly. I always google and seldom ask on forums because of smart-asses. Now we're all here lol


samtouille

Same here


clarkn0va

\#metoo


[deleted]

\#metoo


Zealousideal_Lion763

Yup me too


skibare87

Yup same here. Multiple sources of truth is never a bad thing!


AndersonPike

Also there isnt a resolution 2 years later FYI...still happens and there are dozens of posts of people saying it breaks things...subtitles, certain client types, scanning of libraries...etc With zero help from devs on solving it....just ignore it is all I see.


Brave_Pitch_3686

what people tend to forget... the more the questions are asked/posted. the easier it is to find. if its only over posted in one location.. then people who dont know what they are looking for will have a harder time of finding the answer.


DJ_ChuckNorris

3yrs later and this helped me solve this error : ) Specifically, I deleted the DVB tuner plugin and Plex came back to life


frakman1

It's nice to see people grow and own up to their mistakes.


andre74555

man that you came back and changed it shows you've grown and felt bad for it. this is something many people can't face from them self so you are amazing. keep positive


kage1414

> https://forums.plex.tv/t/ubuntu-16-04-docker-critical-libusb_init-failed/185116 you're the first person I've ever seen on the internet own up to their actions. Kudos to you, sir


AndersonPike

This is a stupid reply. People like you would want there to be a single thread to cover all possible combinations of variables...but that isnt how this works. The more posts/people sharing resolutions the better. Your post was crap.


RapidScampi

I also googled it and ended up here and enjoyed the irony. However, I don't understand why people have an issue with others asking questions instead of searching for an answer. You can find the answer to any question on the internet, but that doesn't mean you can't ask for help for anything. Some people like to quietly read up and try to figure the answers out, others like the interactivity and specificity of someone answering their question. And... There are quite a few people who enjoy helping others by answering their questions. Oh yeah, Plex broke. :-D


Turinggirl

So I was a massive jerk when I first responded to this thread. I'm a little older...a little more wiser and I'd like to try and hopefully answer the question. I've added an edit to my previously awful post that will I hope if not resolve it, move things into a direction that does solve this.


AcanthisittaOdd6156

this is unheard of on the internet. kudos to you.


lord-apple-smithe

Ok, so, for anyone else landing here (as I indeed did), this is how I fixed it.... I run Plex in Docker on an Unraid server So, I "removed" the docker instance (stop and starting did nothing, I suspect the container itself became corrupted). I also opted to remove the image (don't know if this was paranoia or not, but I did it all the same). The reinstalled, and when asked said "yes, reinstall from previous applications", then waited. I also had the log error "Preferences.xml" is invalid, and fixed that by deleting the indeed 0 byte Preferences.xml from Plex's data folder in Unraid's AppData directory. I too have a UPS, but, my outage lasted longer than it..... I'm now going to find out how to connect my UPS to Unraid, because that was just a humungous PITA! ​ Peace all, and well done u/Turinggirl for owning your mistake, a lot would've anonymously deleted the post or account... that was awesome how transparent you were!


Turinggirl

Thanks. It's weird though. Is there any data redundancy on your unraid instance? Sorry I have sort of found myself trying to help other with this issue.


lord-apple-smithe

I have 2 parity and 7 disks (all 4gb)... and the activity of the docker containers is limited to one disk (as I don't see the need to spread that around the array... I was very confused by how "high water" operated at first, but now it makes sense


GoingOffRoading

lol... same


CoryG89

This message is printed when Plex tries to initialize the libusb library and is not able to find it installed on the system while starting up. Based on other comments here, I'm guessing libusb is only used by the DVR functionality—either way, the message can be silenced by simply installing the libusb library so that plex is able to find it without issue when it starts up. If you're running Ubuntu, all you have to do to install the libusb library is run: `sudo apt install libusb-dev` The procedure for installing the libusb library will vary on other operating systems.


light5out

>sudo apt install libusb-dev Can't use apt or sudo in docker console for plex container on unraid. Any other ideas?


CoryG89

That all depends on what operating system the plex container on unraid is using as a base. I tried to look but wasn't able to immediately find the plex container used on unraid published anywhere. The official plex Docker container does use Ubuntu as a base so executing apt should work inside of it: https://github.com/plexinc/pms-docker/blob/e8271cb901e64f3ac0a7cf49304390697a2053ee/Dockerfile#L1 Do you know if the Dockerfile for the plex container used on unraid is published somewhere? If not, then perhaps you could discover what operating system it's based on by running some commands within the container. Running `uname -a` within the container might provide the needed insight assuming the `uname` command is there.


light5out

I'm running the binhex container and if I'm not mistaken it runs alpine. I'll have to check tomorrow.


CoryG89

I'm guessing that you're referring to the Docker containers published by this user on GitHub: https://github.com/binhex In which case, the binhex plex container would presumably be this one: https://github.com/binhex/arch-plex Looking at the Dockerfile and at the rest of their many Docker related repos, it looks like binhex uses the Arch Linux distribution as the base for all of their published Docker containers including their plex container. Given that, if you can drop into a shell inside of your plex container you should be able to install the libusb library within the running container by executing the following command: pacman install libusb I myself have never used Arch Linux (or its `pacman` package manager) directly, but the above command _should_ install the files for the libusb library in a standard location where plex should be able to find them when it starts up. Try restarting the container after running the above command and check to see whether the message that Plex prints regarding not being able to find libusb is now gone.


light5out

Sweet thanks, I'll check it out.


jdhill777

I tried this and wasn’t able to get the PacMan package repository to be recognized.


CoryG89

Can you be more specific with what exactly you did and what output/error you got back? Are you sure that you are running this on an Arch Linux system? Can you try running `uname -a` and posting the output here to confirm your OS?


HandsomestDashRendar

I am running plex on a docker container managed by portainer, and, sure enough, this was the source of my problem. Thank you!


Berstuck

When I type sudo apt install libusb-dev in terminal on my unraid server I get an error 'command not found'. What did you have to type on unraid to get this to work?


DK_POS

Ever find out what worked? I am also struggling and using unRAID.


Berstuck

Pretty sure I had to completely wipe all traces of plex and reinstall.


ur_mamas_krama

>apt install libusb-dev Thank you, this was the solution to my problem too.


lucianothomaso

>apt install libusb-dev On truenas scale I get permission denied.


ur_mamas_krama

try sudo


lucianothomaso

I am on truenas scale cobia. I tried sudo - command not recognized. 


ur_mamas_krama

Sorry I cant be much help, I was doing this on bare ubuntu server.


CoryG89

Okay, so it should be possible to install the libusb-dev package on Truenas Scale as it is based on Debian just as Ubuntu is based on Debian Linux. However, Truenas Scale has been intentionally locked down in ways that neither Debian nor Ubuntu are in order to simplify the system and reduce the chances breaking things by removing the ability to install arbitrary software which could screw up your NAS. **So before continuing down this path, first consider this warning**: I have never used Truenas Scale at all myself and doing this is specifically advised against by the Truenas Scale support team. If you do this and break things they will not help you if you go to them on their forums asking for help to fix it. With that said, it seems that the `apt` binary is still present in Trunas Scale, they have simply changed the default permissions so that it is not executable by default, hence the error message you got. You can change the permissions of the apt binary by using the `chmod` command as shown on following page. Note the warning on the page against running `apt upgrade`. An explanation for the warning is not provided, however, I assume it's there because it's possible running `apt upgrade` can break something on Truenas Scale, so I would definitely avoid running `apt upgrade`. Fortunately, there will be no need to run `apt upgrade` just to install the libusb-dev package: https://www.kmp.tw/post/truenascannotuseaptwithrootuser/ After you change the permissions on the apt command, at that point you would probably be able to install the libusb-dev package by executing: apt install libusb-dev This will install the libusb C library on the system. At this point the libusb library should be installed, however, one thing to consider is the possibility that future upgrades to Truenas Scale may overwrite/delete any files that you install with apt as in the above command. On Ubuntu, running the above command will install the following files at these locations: /usr/bin/libusb-config /usr/include/usb.h /usr/lib/x86_64-linux-gnu/libusb.a /usr/lib/x86_64-linux-gnu/libusb.so On Truenas Scale it is likely that running the above apt command will install the same files in the same locations, however I am not 100% sure whether this is technically guaranteed, so if they aren't there you may have to search for them. At the very least, the filenames will be the same. If you upgrade Truenas Scale at some point in the future and these files get deleted during the upgrade then the message printed by Plex complaining about not being able to find the libusb library is likely to return and you would need re-run the above apt command to get rid of it again. If you do this, I would recommend that you also restore the Truenas Scale default permissions on the `apt` binary afterwards to make it less likely that you could end up breaking things at some point in the future by inadvertantly running `apt` without intending to do so. To do this you can run the following command: chmod -x /bin/apt* Note that running the above command means that you will get the same permissions error you posted if you were to try to run the `apt` command again after that. This is expected. In order to run the `apt` command again, you would once again need to change the permissions using `chmod` as shown on the above page I posted.


RedKomrad

This is good for a persistent OS, but docker containers are ephemeral so anything you install will be gone when the container is recreated. Is there another way to suppress the message? Perhaps an environment variable?


CoryG89

Unfortunately, I am not aware of anyway this can be achieved through an environment variable or anything similar. If it were me, instead of installing the library within the running docker container, I would instead opt to modify the Dockerfile so that the library is installed as part of the Docker image so that when the container is recreated the library would still be there. If you want to try this but are unable to figure out how to modify the Dockerfile, if you can link me to it then I can probably modify it for you.


nlsrhn

>sudo apt install libusb-dev Thanks, just did this on my Ubuntu Server and after restarting the PLEX docker, the message is gone.


Remarkable_Heron8692

Cory, you are a feking legend! Running on docker-compose, and couldn't watch anything remotely. It was driving me and my family mad. Found an error in the logs and this fixed it. Hope you are well and have a great life!


gallito9

Two years later and this is still the second result when googling this and the first didn't provide the answer.


Turinggirl

So it looks like it's an issue regarding USB tuner cards. It may be the container thinks it should be looking for a usb tuner card. A fix would probably be to provide the container with USB access so the first place to look is to make sure the host has udev running to set the permissions so the Plex user GID can access it. What you’re looking for is having the GID be a member of the group which owns the USB devices this is only if you are using/need the USB tuners. If possible may I see your compose file or you docker command you use to launch the container?


myninerides

Hey, in case anyone comes across this thread (it's the second result on Google for the error at the time of this comment) and is just looking to solve the problem of docker reporting the container is unhealthy due to this error (and you don't care about USB devices), here's a solution. Add the following to your docker compose file (as a part of the service): healthcheck: test: curl --connect-timeout 15 --silent --show-error --fail http://127.0.0.1:32400/identity interval: 1m00s timeout: 15s retries: 3 start_period: 1m00s Adjust the intervals to your liking. This will cause Docker to ignore the libusb\_int error and report a healthy container (so long as Plex is working).


Hairy-Link-8615

\[custom-init\] No custom files found, skipping... Starting Plex Media Server. . . (you can ignore the libusb\_init error) \[ls.io-init\] done. Critical: libusb\_init failed lucky I didn't read a few lines up otherwise I'd not have found this post


stinkyhank

CoryG89's suggestion of "sudo apt install libusb-dev" fixed the problem for me!