Server Version#: 1.15.3
Player Version#: latest
Ubuntu 16.04
Hey guys, still having an issue where plex web can‘t find my server. I need this to access my settings.
With every other app, it can find the server.
I run custom plex domain URL‘s behind nginx. If i restart the server, plex web will find the server for about 2 hours, then it wont find it anymore until i restart again.
Tried it with plex.dom.ain and app.plex.tv, same behaviour. Even when i am localhost, it wont show up, just getting connected to a friends server (mine not listed). But as i said, only with plex web! Im lost
I am experiencing a problem that may be similar to the one reported here. Cannot access the server. The local URLs http://localhost:32400/web and http://127.0.0.1:32400/web both give me a "connection refused"error.
The server appears to be running:
$ sudo systemctl status plexmediaserver.service
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2019-04-21 21:52:22 -03; 4s ago
Process: 6606 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR
Main PID: 6608 (sh)
Tasks: 6 (limit: 4915)
CGroup: /system.slice/plexmediaserver.service
├─6608 /bin/sh -c PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )" PLEX_MEDIA_SERVER_INFO_DEVICE="PC"
└─6618 /usr/lib/plexmediaserver/Plex Media Server
Apr 21 21:52:22 sammy systemd[1]: Starting Plex Media Server...
Apr 21 21:52:22 sammy systemd[1]: Started Plex Media Server.
$ ps axu | grep plex
plex 6608 0.0 0.0 4628 852 ? Ss 21:52 0:00 /bin/sh -c PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )" PLEX_MEDIA_SERVER_INFO_DEVICE="PC" PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)" PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(grep ^VERSION= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )" LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib "/usr/lib/plexmediaserver/Plex Media Server"
plex 6618 0.0 0.3 402628 28348 ? Sl 21:52 0:00 /usr/lib/plexmediaserver/Plex Media Server
reverbel 6720 0.0 0.0 14440 1036 pts/1 S+ 21:53 0:00 grep --color=auto plex
However, the server does not generate any new log files. The most recent log files are from eleven days ago, when everything was working.
The command that stops the server takes a long time to finish:
$ sudo systemctl stop plexmediaserver.service
(It takes more than one minute for the shell prompt to appear here.)
While the stop command is running, status commands issued in another window give me results like this:
$ sudo systemctl status plexmediaserver.service
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)
Active: deactivating (final-sigterm) since Sun 2019-04-21 22:02:56 -03; 39s ago
Process: 6608 ExecStart=/bin/sh -c PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )" PLEX_MEDIA_SERVER_INFO_DEVICE=
Process: 6606 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
Main PID: 6608 (code=killed, signal=TERM)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/plexmediaserver.service
└─6618 /usr/lib/plexmediaserver/Plex Media Server
Apr 21 21:52:22 sammy systemd[1]: Starting Plex Media Server...
Apr 21 21:52:22 sammy systemd[1]: Started Plex Media Server.
Apr 21 22:02:56 sammy systemd[1]: Stopping Plex Media Server...
After the stop command completes, this is the status:
$ sudo systemctl status plexmediaserver.service
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; disabled; vendor preset: enabled)
Active: failed (Result: timeout) since Sun 2019-04-21 22:04:26 -03; 22s ago
Process: 6608 ExecStart=/bin/sh -c PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )" PLEX_MEDIA_SERVER_INFO_DEVICE=
Process: 6606 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
Main PID: 6608 (code=killed, signal=TERM)
Apr 21 21:52:22 sammy systemd[1]: Starting Plex Media Server...
Apr 21 21:52:22 sammy systemd[1]: Started Plex Media Server.
Apr 21 22:02:56 sammy systemd[1]: Stopping Plex Media Server...
Apr 21 22:04:26 sammy systemd[1]: plexmediaserver.service: State 'stop-final-sigterm' timed out. Killing.
Apr 21 22:04:26 sammy systemd[1]: plexmediaserver.service: Killing process 6618 (Plex Media Serv) with signal SIGKILL.
Apr 21 22:04:26 sammy systemd[1]: plexmediaserver.service: Failed with result 'timeout'.
Apr 21 22:04:26 sammy systemd[1]: Stopped Plex Media Server.
I have stopped and restarted the server several times, but was never able to connect to the server. And the log directory remained untouched.
This behavior is quite recent. Eleven days ago everthhing was working perfectly.
Exact same problem with my debian server. Rolling back to any previous versions now exhibit the same problem. This leads me to believe that the issue comes from a config change made by the newest versions of PMS binaries.
Also looking at netstat, I am unable to find a registery for Plex on port 32400, this probably explains why we can’t connect. PMS not adding debugging logs is going to make this difficult to debug. (There are no logs written, Plex sees itself as fully functional) This really needs to be fixed, users encountering this bug will be entrapped with a non-functional plex until their plex configs/dirs are wiped.
The issue lies in the systemd startup script. Running commands separate, plex works normally.
Fixed: It looks like privileges were either affected through the update or through apt upgrade (I doubt this).
Simply roll privileges of plex’s home directories to your allocated “plex” user or change the systemd startup script’s user and group. The latter is easier, but poses security risks.
Some thoughts: Plex doesn’t check privilege level when trying to log. This made it very difficult to debug a small issue since logs could not be written. No verbosing either through direct binary runs.
The issue persisted after a PMS upgrade from 1.15.3.876-ad6e39743 to 1.15.4.993-bb4a2cb6c.
Following Ajan’s suggestion, I have changed to plex the owner and group of the directory tree at /var/lib/plexmediaserver. This fixed the problem. (Thanks, @ajan!!!)
@George30 You need to run a command like this in a terminal window:
sudo chown -R plex:plex /var/lib/plexmediaserver
The command above works in a *ix system that uses sudo (such as Ubuntu and Mac OS/X) and assumes that the plex home dir is /var/lib/plexmediaserver. It must be changed if any of these conditions is not met.
Following Ajan’s suggestion, I have changed to plex the owner and group of the directory tree at /var/lib/plexmediaserver. This fixed the problem. (Thanks, @ajan!!!)
Well, not really. After changing to plex the owner and group of the directory tree at /var/lib/plexmediaserver I was able to reach the server and see my library, but still could not play any movie or TV series in my media library. To be able to play my movies, I would have to change to plex the owner and group of the directory trees in which the media library is stored. This would be very inconvenient, as I want the media files accessible to other applications.
So I resorted to Ajan’s second suggestion. Switched the owner and group of the plex directory tree back to my own username, and changed the user and group specifications within the startup script /lib/systemd/system/plexmediaserver.service.
Now I am able to play videos, but the plex server is running with my username. Not an ideal setup, security wise… I wonder how this mess came about. Two weeks ago, out-of-the-box plex worked perfecly.