Ubuntu 20.04 LTS:
plexmediaserver_1.19.2.2702-776106bc6_amd64:
When I run the command to restart the service, it takes down the plexmediaserver, but does not restart it. I have pasted below the status after I did the restart, and what happens when I try the start as well.
If I restart the ubuntu server, then it comes back up fully. So every time I upgrade the deb package I find myself having to restart my server as a whole.
ckolb@ubuntuintel:/ service plexmediaserver status
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-04-25 12:02:38 EDT; 2min 19s ago
Process: 1958651 ExecStartPre=/bin/sh -c /usr/bin/test -d "{PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p “{PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)
Process: 1958660 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR="(grep ^NAME= /etc/os-release | awk -F= “{print $2}” | tr -d " )”; export PLEX_MEDIA_SERVER_INFO_DEVICE=“PC”; export PLEX_MEDIA_SERVER_INFO_MODEL="$(un>
Main PID: 1958660 (code=exited, status=255/EXCEPTION)
Apr 25 12:02:33 ubuntuintel systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Apr 25 12:02:38 ubuntuintel systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 2.
Apr 25 12:02:38 ubuntuintel systemd[1]: Stopped Plex Media Server.
Apr 25 12:02:38 ubuntuintel systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Apr 25 12:02:38 ubuntuintel systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Apr 25 12:02:38 ubuntuintel systemd[1]: Failed to start Plex Media Server.
ckolb@ubuntuintel:/ service plexmediaserver start
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'plexmediaserver.service'.
Authenticating as: Christian Kolb (ckolb)
Password:
==== AUTHENTICATION COMPLETE ===
ckolb@ubuntuintel:/ service plexmediaserver status
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-04-25 12:05:43 EDT; 12s ago
Process: 1959022 ExecStartPre=/bin/sh -c /usr/bin/test -d “{PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "{PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}” (code=exited, status=0/SUCCESS)
Process: 1959033 ExecStart=/bin/sh -c export PLEX_MEDIA_SERVER_INFO_VENDOR="(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )"; export PLEX_MEDIA_SERVER_INFO_DEVICE="PC"; export PLEX_MEDIA_SERVER_INFO_MODEL="(un>
Main PID: 1959033 (code=exited, status=255/EXCEPTION)
Apr 25 12:05:43 ubuntuintel systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.
Apr 25 12:05:43 ubuntuintel systemd[1]: Stopped Plex Media Server.
Apr 25 12:05:43 ubuntuintel systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Apr 25 12:05:43 ubuntuintel systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.
Apr 25 12:05:43 ubuntuintel systemd[1]: Failed to start Plex Media Server.
Plex Media Server Logs_2020-04-25_12-16-13.zip (2.3 MB)
Logs from the server just after the latest upgrade was installed and my attempt to restart and then start as well and then finally having to restart the ubuntu server itself.
From the log files, I believe that his is probably the issue:
Apr 25, 2020 12:02:27.864 [0x7faf9f94e080] ERROR - HttpServer: Error binding acceptor: Address already in use
Apr 25, 2020 12:02:27.864 [0x7faf9f94e080] ERROR - HttpServer: Error opening acceptor on IPv6, falling back to IPv4: Address already in use
Apr 25, 2020 12:02:27.864 [0x7faf9f94e080] ERROR - HttpServer: Error binding acceptor: Address already in use
Apr 25, 2020 12:02:27.864 [0x7faf9f94e080] ERROR - Error: Unable to set up server: listen: Address already in use (N5boost10wrapexceptINS_6system12system_errorEEE)
When I reboot, the server must start before another process is running. Though I do not know what that process is. Especially since I do not use anything else on port 32400 that I am aware.
If I now do a service plexmediaservice restart, everything restarts fine. This happens after I do a update of the server that this happens.
Next time I do a update of the service, I was planning on doing a netstat to see what process had open the port. I could easily kill that process. Also, then look at either changing the port for that, or remove what ever process was using it. It may also be that the plexmedia server is not letting go of the ports fully as well.
I am still not proficient with Linux, and in fact using my plex server as w way to get better antiquated with linux. So i did do a few things with systemctl like systemctl list-unit-files, and ```
systemctl list-units to see if that brought anything up that may be of help, but did not see anything of use there.
Apr 25, 2020 12:09:28.371 [0x7f4b11ffb700] DEBUG - [Notify] Now watching "/movies/Music/Soul Coughing/Irresistible Bliss"
Apr 25, 2020 12:09:28.372 [0x7f4b11ffb700] DEBUG - [Notify] Now watching "/movies/Music/Soul Coughing/Ruby Vroom"
Apr 25, 2020 12:09:28.373 [0x7f4b11ffb700] DEBUG - [Notify] Now watching "/movies/Music/Soul II Soul"
Apr 25, 2020 12:09:28.374 [0x7f4b11ffb700] DEBUG - [Notify] Now watching "/movies/Music/Soul II Soul/Club Classics, Vol. 1"
Apr 25, 2020 12:09:28.375 [0x7f4b11ffb700] DEBUG - [Notify] Now watching "/movies/Music/SoulDecision"
Apr 25, 2020 12:09:28.375 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/SoulDecision/Faded (Single)" (28: No space left on device)
Apr 25, 2020 12:09:28.377 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Sound Ideas" (28: No space left on device)
Apr 25, 2020 12:09:28.377 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Sound Ideas/6010" (28: No space left on device)
Apr 25, 2020 12:09:28.378 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Sound Ideas/6058" (28: No space left on device)
Apr 25, 2020 12:09:28.379 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Sound Of Philly and More" (28: No space left on device)
Apr 25, 2020 12:09:28.380 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Sound Of Philly and More/Saturday Morning House Party" (28: No space left on device)
Apr 25, 2020 12:09:28.381 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.386 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Metropolis Sound Track" (28: No space left on device)
Apr 25, 2020 12:09:28.387 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/After The Snow" (28: No space left on device)
Apr 25, 2020 12:09:28.388 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Almost Famous Soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.389 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Amadeus Soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.390 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Austin Powers" (28: No space left on device)
Apr 25, 2020 12:09:28.391 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Batman Forever" (28: No space left on device)
Apr 25, 2020 12:09:28.392 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/BO" (28: No space left on device)
Apr 25, 2020 12:09:28.393 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Breakfast Club Soundtrack, The" (28: No space left on device)
Apr 25, 2020 12:09:28.395 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Bridget Jones's Diary" (28: No space left on device)
Apr 25, 2020 12:09:28.396 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Cant Hardly Wait" (28: No space left on device)
Apr 25, 2020 12:09:28.397 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Chocolat - Music from the Mira" (28: No space left on device)
Apr 25, 2020 12:09:28.398 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Chocolat - Soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.399 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Crooked Rain, Crooked Rain" (28: No space left on device)
Apr 25, 2020 12:09:28.400 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Deadman On Campus Soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.401 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Don't You (Forget About Me)" (28: No space left on device)
Apr 25, 2020 12:09:28.407 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Gone In 60 Seconds OST" (28: No space left on device)
Apr 25, 2020 12:09:28.418 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Matrix" (28: No space left on device)
Apr 25, 2020 12:09:28.429 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Mother Love Bone Disc 1" (28: No space left on device)
Apr 25, 2020 12:09:28.430 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Music From Baz Luhrmann's Film Moulin Ro" (28: No space left on device)
Apr 25, 2020 12:09:28.443 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Not Another Teen Movie" (28: No space left on device)
Apr 25, 2020 12:09:28.444 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Not Another Teen Movie (OST)" (28: No space left on device)
Apr 25, 2020 12:09:28.445 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/O Brother" (28: No space left on device)
Apr 25, 2020 12:09:28.446 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/O'Brother, where art thou" (28: No space left on device)
Apr 25, 2020 12:09:28.447 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/OLIVER" (28: No space left on device)
Apr 25, 2020 12:09:28.448 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Oliver!" (28: No space left on device)
Apr 25, 2020 12:09:28.449 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/One fine Day soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.458 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Pablo Honey" (28: No space left on device)
Apr 25, 2020 12:09:28.459 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Pokemon the first movie" (28: No space left on device)
Apr 25, 2020 12:09:28.459 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Pretty In Pink Soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.460 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Prince of Egypt Soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.461 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Pulp Fiction Soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.462 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Soundtrack/Reality Bites - Soundtrack" (28: No space left on device)
Apr 25, 2020 12:09:28.463 [0x7f4b11ffb700] ERROR - [Notify] Failed to add watch for "/movies/Music/Sound
Ran out of inotify slots. This needs updating first. Let’s get the startup settled.
it came back with 12617 for the directory count. however, I did double the default to 65536 since, as you noticed in the log, it was running out of space. I have since restarted the plex server to accept that. I will keep an eye on the restart after I do the next update and restart of the plex server after the update. See if this fixes the issue. If not, and I see the port issue above durring the restart, I will do a netstat to see if I can see what is running on that port.
OK, I applied the update just now and the restart was done afterward
Plex did not restart Looking at the netstat It looks like my Unifi webapp is taking that port.
I did a enable on the plexmedia server and it asked for my password, put that in and then did a service plexmediaserver start and that failed again.
I have now rebooted the server to bring things back up once again.
I have attached the logs from plex as well just after the restart of plex after the restart of the server. I hope that between the first set of logs I tared up before the reboot, and thes you may see something.
Yes, this is after I have restarted. Log 1, 2, and 3 are all from before the reboot, but after the steps you had me take. As you can see in those logs, there is that dang port issue again.
its like it starts up and then the port is taken. I verified before starting that it was like above, not like after I try and start and it fails and then do the netstat and see all the connections to 32400 and some from Unifi.
I have been persuing this on the Unifi site as well, asking them if they have seen this. They have not.