LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 01-13-2021, 02:00 PM   #1
vovim
Member
 
Registered: Nov 2011
Location: England
Distribution: Slackware64 current and Slackware arm current
Posts: 65

Rep: Reputation: Disabled
Plex Media Server not starting


Hi, I am trying to run the Plex Media Server on my raspberry pi 4 with slackware current.

I have amended both the slackbuild and the info files from the SlackBuild to use the armhf download as described below.

root@pi:/etc/rc.d# diff '/var/lib/sbopkg/SBo-git/multimedia/plexmediaserver/plexmediaserver.SlackBuild' '/var/lib/sbopkg/SBo-git/multimedia/plexmediaserver/plexmediaserver.SlackBuild.sbopkg'
61,63c61,64
< else
< echo "Package for $(uname -m) architecture is not available."
< exit 1
---
> elif [ "$ARCH" = "arm" ]; then
> DEBARCH="armhf"
> LIBDIRSUFFIX=""
> ARCH="arm"

root@pi:/etc/rc.d# diff '/var/lib/sbopkg/SBo-git/multimedia/plexmediaserver/plexmediaserver.info' '/var/lib/sbopkg/SBo-git/multimedia/plexmediaserver/plexmediaserver.info.sbopkg'
4,5c4,5
< DOWNLOAD="https://downloads.plex.tv/plex-media-server-new/1.21.1.3876-3c3adfcb4/debian/plexmediaserver_1.21.1.3876-3c3adfcb4_i386.deb"
< MD5SUM="502193fe104a95aa887ddf1330245858"
---
> DOWNLOAD="https://downloads.plex.tv/plex-media-server-new/1.21.1.3876-3c3adfcb4/debian/plexmediaserver_1.21.1.3876-3c3adfcb4_armhf.deb"
> MD5SUM="b118c6ada17befc5037d85ab15859999"
root@pi:/etc/rc.d#

The package installs O.K. with no errors but it will not start.
I issue the command "/etc/rc.d/rc.plexmediaserver start" and it says "Starting Plex Media Server." and it seems to complete O.K. (it show no errors). However, as soon as the start completes I run "/etc/rc.d/rc.plexmediaserver status" and it says "Plex Media Server is stopped.".

I do have the plex user and plex group setup as described in the README of the SlackBuild. And the slackbuild lists no dependencies.

Any help with this problem would be greatly appreciated.

Thank You.
 
Old 01-14-2021, 08:47 AM   #2
vovim
Member
 
Registered: Nov 2011
Location: England
Distribution: Slackware64 current and Slackware arm current
Posts: 65

Original Poster
Rep: Reputation: Disabled
The above (original post) happens when I start rc.plexmediaserver as root.

If I start rc.plexmediaserver as a normal user the start never completes.

I have run the process as myself (a normal user) under strace and the only clues that I have found is this :

access("/bin/su", R_OK) = -1 EACCES (Permission denied)

I think that this is very strange because I can access the su command as a normal user (myself).
And then a few lines later in the strace it has :

clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb6facee8) = 3072

And if I do a ps -A | grep 3072 it shows the su command :

bash-5.0$ ps -A | grep 3072
3072 pts/0 00:00:00 su
bash-5.0$

And then a few more lines later it goes into "wait4"

And if I look at the /proc entry for this process at the status entry it shows :

bash-5.0$ cat /proc/3050/status
Name: rc.plexmediaser
Umask: 0022
State: S (sleeping)

The strace of starting plexmediaserver as a normal user is in pastebin at https://pastebin.pl/view/54a9e5e3

The strace of starting plexmediaserver as root is in pastebin at https://pastebin.pl/view/51ece6d2

I hope the straces can help someone as I have no real idea about what they are saying.

I am happy to supply any further information that may be required.

Thank You for any help.
 
Old 01-14-2021, 07:20 PM   #3
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,398

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
X, virtualbox, samba, apache have logs even if they don't work.

As it seems you've done some diagnostic digging, you've not mentioned anything about plex logs.

I don't use plex but does it log anything anywhere?
 
Old 01-16-2021, 05:21 AM   #4
vovim
Member
 
Registered: Nov 2011
Location: England
Distribution: Slackware64 current and Slackware arm current
Posts: 65

Original Poster
Rep: Reputation: Disabled
Thanks for your reply glorsplitz.

I have checked online where plex logs to, and it is in the directory "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs".
This directory did not exist. The slackbuild only creates "/var/lib/plexmediaserver/Library/Application Support" so I created the other directories (and chowned them to plexlex). I then tried to start the plex media server as a normal user and it still gets stuck on "Starting Plex Media Server." and there is nothing in the Logs directory that I just created.
I did, however, look at the proc filesystem for the su command that it runs as a child process and specifically at the cmdline part of it and it shows the following :

root@pi:~# cat /proc/1894/cmdline
su-mplex-s/bin/sh-cexec /usr/lib/plexmediaserver/Plex\ Media\ Server &root@pi:~#

So the su command would have failed before because the Slackbuild did not create the "Plex Media Server" subdirectory.

The cmdline looks very strange but I think that the plexmediaserver process has left out the spaces in it and perhaps it should be :

su-m plex -s /bin/sh -c exec /usr/lib/plexmediaserver/Plex\ Media\ Server &

I don't know why the process has missed out the spaces. But then how can it execute a directory ?

I hope that this will help.

Thank You.
 
Old 01-16-2021, 04:47 PM   #5
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,398

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
slackbuilds are really only for stable, you're always on your own with current

I would dump slackbuild install, get and build from source and see where that goes.

Sometimes simple slackbuilds can be tweaked/coerced to work with current, I don't know how complicated plex is.
 
Old 01-18-2021, 05:46 PM   #6
vovim
Member
 
Registered: Nov 2011
Location: England
Distribution: Slackware64 current and Slackware arm current
Posts: 65

Original Poster
Rep: Reputation: Disabled
glorsplitz, thanks for your reply. However, I have difficulty reconciling your comment that "slackbuilds are really only for stable" with the fact that since I have got my raspberry pi I have been using ponces slackbuilds for current !

Also, there is no source code for plex media server. It is closed source. All you can get are binary download packages (Debian (.deb) or Fedora / Centos / Suse (.rpm). I thought that you might do some research before just spouting some rubbish !

So, now, I need to decide how to continue. Shall I go to a linux distribution that has a plex media server package that works (I do love my music and films) ? Or shall I stick with slackware (I've been with slackware since version 3 came out when I was at university) and make my own media server using the httpd server (Apache) with php and the minidlna database of my media ?
 
Old 01-18-2021, 07:18 PM   #7
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,398

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
I was looking to serve up media simple, to replace mymedia server.

I tried plex and didn't care for its, what seemed to me, constant hard drive caching.

Someone I know uses and likes plex for all its bells and whistles.

I also did minidlna via lg tv but didn't care for it for some reason. I'm now doing openelec, NOT slackware, which does audio, video and pictures.

I've seen other LQ slackware forum users mention htpc setups, maybe post to regular slackware forum as to how others do htpc?

Last edited by glorsplitz; 01-18-2021 at 07:24 PM.
 
Old 01-20-2021, 07:44 AM   #8
vovim
Member
 
Registered: Nov 2011
Location: England
Distribution: Slackware64 current and Slackware arm current
Posts: 65

Original Poster
Rep: Reputation: Disabled
glorsplitz, Thanks for your reply. I am having trouble with videos and music in Slackware not being able to output surround sound (5.1 channels) I have tried all sorts of things suggested on the internet, with pavucontrol, etc. Then I looked at the slackware kernel code for the bcm2835 chip and it set to only 2 channels in the kernel. I was wondering, as you are using openelec, if you could tell me if that OS is able to do 5.1 channel audio through the HDMI port ?

Thanks.
 
Old 01-20-2021, 07:26 PM   #9
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,398

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Quote:
Originally Posted by vovim View Post
if that OS is able to do 5.1 channel audio through the HDMI port ?
I don't know but maybe answer your question here Audio quickstart guide
 
Old 01-21-2021, 04:22 PM   #10
vovim
Member
 
Registered: Nov 2011
Location: England
Distribution: Slackware64 current and Slackware arm current
Posts: 65

Original Poster
Rep: Reputation: Disabled
glorsplitz, thank you for your reply. However, I am about as much enamoured of Kodi as you are of Plex !
I didn't realise that openelec is just a wrapper for Kodi.

Anyway, I have found a way of getting surround sound on the HDMI port in Slackware. After googling, I just amended a couple of files in /etc/pulse, rebooted, and it worked.

So now I think that I will stick with Slackware and roll my own media server as I described before.

Thanks for your help anyway.
 
Old 02-04-2021, 07:51 PM   #11
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 914

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
I've been trying to get my slarm64 install to run plex and ran into the same troubles as vovim here. I am also using the latest armv8 download from plex.tv and similar slackbuild modifications as in post 1 here.

Starting /etc/rc.d/rc.plexmediaserver just exits silently. If you remove the redirect in that script all it reports is that /usr/lib/plexmediaserver/Plex\ Media\ Server does not exist. That same error is reported when trying to run anything in /usr/lib/plexmediaserver btw.

Then I came across a post by sndwvs about getting jdk to work using:
Code:
cd /lib  && ln -s ../lib64/ld-linux-aarch64.so.1 .
Post is here if you're interested: https://www.linuxquestions.org/quest...7/#post6197010

Once that link is made then plex starts fine via "/etc/rc.d/rc.plexmediaserver start", and you can access the website and finish the setup from there.

Last edited by 0XBF; 02-04-2021 at 07:53 PM.
 
Old 02-05-2021, 04:25 AM   #12
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by 0XBF View Post
Code:
cd /lib  && ln -s ../lib64/ld-linux-aarch64.so.1 .
This symlink is created automatically by ld for Slackware's glibc package on 64bit, so it should be there for slarm64 too unless it's gone missing or things are done differently there.

Last edited by drmozes; 02-05-2021 at 05:33 AM. Reason: ld makes the symlink
 
Old 02-05-2021, 08:28 AM   #13
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 914

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
I'm not sure if things are done differently in slarm64. I've only been using it off and on for a week or two so I'm a little new to running things on arm. I was hoping someone here might be able to explain things better

A little background info: I am migrating from using an old x86_64 machine as my plex server (and a few other functions) to aarch64 on my new rockpro64. On the x86_64 machine (slackware current, a few months old), there is no symlink or much of anything in /lib. However, plex has ran just fine on that machine for years. Plex is distributed as a pre-compiled .deb package that's installed by the slackbuild, and always installs to /usr/lib/plexmediaserver, regardless of the arch.

In my efforts to get plex running on aarch64 I was looking at their instructions on the plex forums. I'm pretty sure they are written for either debian or ubuntu but they say to install "binutils:armhf" to run plex on aarch64. I thought "armhf" was "armv7" so I was looking for some problem between 32bit/64bit and lib/lib64. I still find it strange that this needed to be done on 64bit arm but not x86_64 though. Maybe some difference in how they built the package?
 
Old 02-05-2021, 08:58 AM   #14
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by 0XBF View Post
I thought "armhf" was "armv7" so I was looking for some problem between 32bit/64bit and lib/lib64. I still find it strange that this needed to be done on 64bit arm but not x86_64 though. Maybe some difference in how they built the package?
Most people refer to ARM as meaning <=armv7-a and aarch64 =>armv8-a

On Slackware-AArch64 (the official aarch64 port, in development), the standard glibc build has the symlink created by ldconfig because by default the linker lives in /lib (I think it's a hard coded default), but the libraries within /lib64. I just happen to know because I was working on it last week.
You shouldn't mix 32bit with 64bit.

Last edited by drmozes; 02-05-2021 at 09:05 AM.
 
Old 02-05-2021, 11:23 AM   #15
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 2,195

Rep: Reputation: Disabled
there is a difference, in slarm64, as well as in slackware64, the interpreter is located in /lib64,
Code:
patchelf --print-interpreter /bin/ls
slarm64
Code:
/lib64/ld-linux-aarch64.so.1
slarm64-riscv64
Code:
/lib64/ld-linux-riscv64-lp64d.so.1
slackware64
Code:
/lib64/ld-linux-x86-64.so.2
but all third-party software is built with interpreter which is in /lib. for the work of a third-party software there are 2 options 1 symlink
Code:
ln -s /lib64/ld-linux-aarch64.so.1 -r /lib/ld-linux-aarch64.so.1
and the second change the path of the interpreter
Code:
find . | xargs file | grep -e "executable\(.*\)interpreter" \
            | grep ELF | cut -f1 -d ':' \
            | xargs -I '{}' patchelf --set-interpreter /lib64/ld-linux-aarch64.so.1 '{}'

Last edited by sndwvs; 02-05-2021 at 11:29 AM.
 
  


Reply

Tags
arm, plexmediaserver


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Review Plex Media Server For Linux, Sync Media Across All Of Your Devices LXer Syndicated Linux News 0 02-29-2016 12:51 PM
Plex Media Server on Slackware64 Gee Man Slackware 1 10-01-2012 06:12 PM
LXer: Plex Media Server + Roku = Awesome LXer Syndicated Linux News 0 08-27-2012 12:30 PM
LXer: Plex Media Server + Roku = Awesome LXer Syndicated Linux News 0 08-13-2012 05:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration