# Failed to start Plex Media Server

**URL:** <https://forums.plex.tv/t/failed-to-start-plex-media-server/778513>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [February 27, 2022, 2:56am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513 "2022-02-27T02:56:10Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![NCPW](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@NCPW](https://forums.plex.tv/u/NCPW)\
**Post date:** [February 27, 2022, 2:56am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/1 "2022-02-27T02:56:10Z")

</div>

Server Version#:1.25.6.5577-c8bd13540

One day my plex server on Ubuntu Server 20.04 LTS just stopped working. I don’t recall doing anything to it. I just lost access to it.  
I’ve found that the service isn’t starting. I’ve tried rebooting the service and server many times and still no success. I run the status command and get the output below:

systemctl status plexmediaserver.service  
● plexmediaserver.service - Plex Media Server  
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)  
Active: failed (Result: exit-code) since Sun 2022-02-27 02:33:16 UTC; 30s ago  
Process: 1171 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: 1180 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 PL\>  
Main PID: 1180 (code=exited, status=255/EXCEPTION)

Feb 27 02:33:16 us01 systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.  
Feb 27 02:33:16 us01 systemd[1]: Stopped Plex Media Server.  
Feb 27 02:33:16 us01 systemd[1]: plexmediaserver.service: Start request repeated too quickly.  
Feb 27 02:33:16 us01 systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.  
Feb 27 02:33:16 us01 systemd[1]: Failed to start Plex Media Server.

And another command to better give info on the error:  
journalctl -e -u plexmediaserver.service  
Feb 26 06:17:57 us01 systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 2.  
Feb 26 06:17:57 us01 systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 2.  
Feb 26 06:17:57 us01 systemd[1]: Stopped Plex Media Server.  
Feb 26 06:17:57 us01 systemd[1]: Starting Plex Media Server…  
Feb 26 06:17:57 us01 systemd[1]: Started Plex Media Server.  
Feb 26 06:17:57 us01 Plex Media Server[1176]: /bin/sh: 1: exec: /usr/lib/plexmediaserver/Plex Media Server: not found  
Feb 26 06:17:57 us01 systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=127/n/a  
Feb 26 06:17:57 us01 systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.  
Feb 26 06:18:02 us01 systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.  
Feb 26 06:18:02 us01 systemd[1]: Stopped Plex Media Server.  
Feb 26 06:18:02 us01 systemd[1]: plexmediaserver.service: Start request repeated too quickly.  
Feb 26 06:18:02 us01 systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.  
Feb 26 06:18:02 us01 systemd[1]: Failed to start Plex Media Server.  
Feb 26 17:12:05 us01 systemd[1]: Starting Plex Media Server…  
Feb 26 17:12:05 us01 systemd[1]: Started Plex Media Server.  
Feb 26 17:12:06 us01 Plex Media Server[18670]: Error: Unable to set up server: listen: Address in use (N5boost10wrapexceptINS\_6system12system\_errorEEE)  
Feb 26 17:12:06 us01 systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=255/EXCEPTION  
Feb 26 17:12:06 us01 systemd[1]: plexmediaserver.service: Failed with result ‘exit-code’.  
Feb 26 17:12:11 us01 systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 1.  
Feb 26 17:12:11 us01 systemd[1]: Stopped Plex Media Server.  
Feb 26 17:12:11 us01 systemd[1]: Starting Plex Media Server…  
Feb 26 17:12:11 us01 systemd[1]: Started Plex Media Server.

(it repeats three times with no change in output)  
I’ve searched far and wide and tried many solutions I’ve seen on the internet and still no success. Hopefully someone here can lend me a hand and get this problem solved.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 27, 2022, 3:23am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/2 "2022-02-27T03:23:29Z")

</div>

Check first but Uninstall and reinstall the package.

Something removed file(s) from /usr/lib/plexmediaserver

```auto
/bin/sh: 1: exec: /usr/lib/plexmediaserver/Plex Media Server: not found

```

---

<div class="post-metadata">

**Author:** ![NCPW](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@NCPW](https://forums.plex.tv/u/NCPW)\
**Post date:** [February 27, 2022, 3:36am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/3 "2022-02-27T03:36:53Z")

</div>

> [@ChuckPa](#):
>
> `/usr/lib/plexmediaserver/Plex Media Server`

I tried uninstalling, rebooting and reinstalling but still get the same error. Also that file does exist on the server.  
I ran the command below:  
ls /usr/lib/plexmediaserver

And got this as an output:  
CrashUploader ‘Plex DLNA Server’ ‘Plex Media Scanner’ ‘[Plex Relay](https://support.plex.tv/articles/216766168-accessing-a-server-through-relay/)’ ‘Plex Script Host’ ‘Plex Tuner Service’ etc  
‘Plex Commercial Skipper’ ‘Plex Media Fingerprinter’ ‘Plex Media Server’ ‘Plex SQLite’ ‘Plex Transcoder’ Resources lib

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 27, 2022, 3:51am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/4 "2022-02-27T03:51:27Z")

</div>

Do you have a customized startup (override) file?

If not, may I see your last set of logs? (make a tar.gz of the `Logs` directory)

---

<div class="post-metadata">

**Author:** ![NCPW](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@NCPW](https://forums.plex.tv/u/NCPW)\
**Post date:** [February 27, 2022, 3:57am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/5 "2022-02-27T03:57:34Z")

</div>

Where do find the log file?

I did make some changes to a file so an external drive I have attached to the server auto mounts and is broadcast in my network as an SMB share on startup.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 27, 2022, 4:01am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/6 "2022-02-27T04:01:45Z")

</div>

the logs , by default, are in `"/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs"`

When you made your edits, did you edit `/lib/systemd/system/plexmediaserver.service` ?

---

<div class="post-metadata">

**Author:** ![NCPW](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@NCPW](https://forums.plex.tv/u/NCPW)\
**Post date:** [February 27, 2022, 4:23am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/7 "2022-02-27T04:23:46Z")

</div>

ls /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/  
‘PMS Plugin Logs’ ‘Plex DLNA Server.4.log’ ‘Plex Media Scanner Chapter Thumbnails.4.log’ ‘Plex Media Scanner Matcher.4.log’ ‘Plex Transcoder Statistics.4.log’  
‘Plex Crash Uploader.1.log’ ‘Plex DLNA Server.5.log’ ‘Plex Media Scanner Chapter Thumbnails.5.log’ ‘Plex Media Scanner Matcher.5.log’ ‘Plex Transcoder Statistics.5.log’  
‘Plex Crash Uploader.2.log’ ‘Plex DLNA Server.log’ ‘Plex Media Scanner Chapter Thumbnails.log’ ‘Plex Media Scanner Matcher.log’ ‘Plex Transcoder Statistics.log’  
‘Plex Crash Uploader.3.log’ ‘Plex Media Scanner Analysis.1.log’ ‘Plex Media Scanner Deep Analysis.1.log’ ‘Plex Media Server.1.log’ ‘Plex Tuner Service.1.log’  
‘Plex Crash Uploader.4.log’ ‘Plex Media Scanner Analysis.2.log’ ‘Plex Media Scanner Deep Analysis.2.log’ ‘Plex Media Server.2.log’ ‘Plex Tuner Service.2.log’  
‘Plex Crash Uploader.5.log’ ‘Plex Media Scanner Analysis.3.log’ ‘Plex Media Scanner Deep Analysis.3.log’ ‘Plex Media Server.3.log’ ‘Plex Tuner Service.3.log’  
‘Plex Crash Uploader.log’ ‘Plex Media Scanner Analysis.4.log’ ‘Plex Media Scanner Deep Analysis.4.log’ ‘Plex Media Server.4.log’ ‘Plex Tuner Service.4.log’  
‘Plex DLNA Server Neptune.log’ ‘Plex Media Scanner Analysis.5.log’ ‘Plex Media Scanner Deep Analysis.5.log’ ‘Plex Media Server.5.log’ ‘Plex Tuner Service.5.log’  
‘Plex DLNA Server Neptune.old.log’ ‘Plex Media Scanner Analysis.log’ ‘Plex Media Scanner Deep Analysis.log’ ‘Plex Media Server.log’ ‘Plex Tuner Service.log’  
‘Plex DLNA Server.1.log’ ‘Plex Media Scanner Chapter Thumbnails.1.log’ ‘Plex Media Scanner Matcher.1.log’ ‘Plex Transcoder Statistics.1.log’  
‘Plex DLNA Server.2.log’ ‘Plex Media Scanner Chapter Thumbnails.2.log’ ‘Plex Media Scanner Matcher.2.log’ ‘Plex Transcoder Statistics.2.log’  
‘Plex DLNA Server.3.log’ ‘Plex Media Scanner Chapter Thumbnails.3.log’ ‘Plex Media Scanner Matcher.3.log’ ‘Plex Transcoder Statistics.3.log’

Which log file from above is the one that’s helpful?

And no I did not edit that file.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 27, 2022, 4:24am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/8 "2022-02-27T04:24:48Z")

</div>

Please do the following:

```auto
sudo tar cfz /tmp/plexlogs.tar.gz ./Logs

```

It grabs the entire directory (so i can see them with their rollover)  
and places it in /tmp for easy access

---

<div class="post-metadata">

**Author:** ![NCPW](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@NCPW](https://forums.plex.tv/u/NCPW)\
**Post date:** [February 27, 2022, 4:35am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/9 "2022-02-27T04:35:04Z")

</div>

[plexlogs.tar.gz](https://forums.plex.tv/uploads/short-url/8rl7SBwzfXGw5siKfzdFcbFITbE.gz) (1.2 MB)

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 27, 2022, 4:41am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/10 "2022-02-27T04:41:47Z")

</div>

Thank you. You have a seriously stuck process which is holding the socket open.

Please check, and report back,

```auto
ps -ef | grep -i plex

```

You’ll find either EAE or a ‘Plex Script Host’ process.

Please let me know what you find.

After you figure out the pid, `kill -9 PID_NUMBER`

---

<div class="post-metadata">

**Author:** ![NCPW](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@NCPW](https://forums.plex.tv/u/NCPW)\
**Post date:** [February 27, 2022, 5:03am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/11 "2022-02-27T05:03:34Z")

</div>

Well i did not see any of the names of the processes you called but I killed the only plex process i saw and it doesnt kill it. Additionally, whenever I execute the kill command it ends my ssh session to the server as well so maybe I’m killing the wrong thing. I am not sure.

> ps -ef | grep -i plex  
> root 737 1 0 03:28 ? 00:00:01 /sbin/mount.ntfs /dev/sdb2 /Plex\_Storage -o rw,nosuid,nodev  
> toor 4678 4442 0 04:50 pts/0 00:00:00 grep --color=auto -i plex  
> ~$ kill -9 4442

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 27, 2022, 6:45am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/12 "2022-02-27T06:45:18Z")

</div>

From what you’ve shown me, the `kill -9 4442` killed the parent process (your shell).  
The PID of the process is the first number. The parent process ID is the second number.

So that my instructions are better targeted, how long have you been using Linux?

---

<div class="post-metadata">

**Author:** ![NCPW](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@NCPW](https://forums.plex.tv/u/NCPW)\
**Post date:** [February 27, 2022, 6:53am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/13 "2022-02-27T06:53:17Z")

</div>

Off and on for about 5 years. I apologise for any inconvenience caused due to me not knowing something.

In the case of killing the process, since the table didnt have any headings, I tried both processes at first. When i tried killing the first number (In the case of the output shown earlier “4678”) it said no such process so that’s when I tried to kill the second number which ended up terminating my SSH session.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 27, 2022, 7:16am UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/14 "2022-02-27T07:16:00Z")

</div>

From what you showed me, there are no Plex processes running.

If any part of Plex were running, you’d see one of these listed.

```auto
chuck@lemming:/lib/systemd/system$ ps -ef | grep -i plex
chuck 24852 1 9 Feb26 ? 01:06:47 /usr/lib/plexmediaserver/Plex Media Server
chuck 24894 24852 0 Feb26 ? 00:00:07 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.6.5577-c8bd13540 /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/System.bundle
chuck 24972 24852 0 Feb26 ? 00:00:12 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.25.6.5577-c8bd13540 32600
chuck 25007 24852 0 Feb26 ? 00:00:05 Plex Plug-in [tv.plex.agents.movie] /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.6.5577-c8bd13540 /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/PlexMovieNew.bundle
chuck 25183 24852 0 Feb26 ? 00:00:05 Plex Plug-in [tv.plex.agents.music] /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.6.5577-c8bd13540 /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/PlexMusic.bundle
chuck 25186 24852 0 Feb26 ? 00:00:05 Plex Plug-in [org.musicbrainz.agents.music] /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.6.5577-c8bd13540 /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/Musicbrainz.bundle
chuck 26026 24852 0 Feb26 ? 00:00:05 Plex Plug-in [tv.plex.agents.series] /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.25.6.5577-c8bd13540 /usr/lib/plexmediaserver/Resources/Plug-ins-c8bd13540/PlexSeries.bundle
chuck 120458 49736 0 02:10 pts/0 00:00:00 grep --color=auto -i plex
chuck 120459 24852 0 02:10 ? 00:00:00 /usr/lib/plexmediaserver/Plex Media Scanner --analyze-deeply --item 116390 --log-file-suffix Deep Analysis
chuck@lemming:/lib/systemd/system$ 

```

Notice they are either the Plex Plug-in (agents) or the main server elements themselvs from /usr/lib/plexmediaserver

Let’s now find out which process is holding the main plex ports (any of them) open

```auto
sudo bash
for i in 3240[0-9]
do
netstat -tulpn | grep $i
done

```

This will show the progresses are using Plex’s ports.  
Please show me your output (Copy/paste the text)

It will look something like this:

```auto
root@lemming:~# for i in 3240[0-9]
> do
> netstat -tulpn | grep $i
> done
tcp 0 0 127.0.0.1:32401 0.0.0.0:* LISTEN 24852/Plex Media Se 
tcp6 0 0 :::32400 :::* LISTEN 24852/Plex Media Se 
root@lemming:~#

```

In the above, you can see my server is what’s using the ports ; which is normal.  
For you, I expect to find something else.

---

<div class="post-metadata">

**Author:** ![NCPW](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@NCPW](https://forums.plex.tv/u/NCPW)\
**Post date:** [February 27, 2022, 2:25pm UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/15 "2022-02-27T14:25:59Z")

</div>

Thank you, I got the problem resolved. The problem was that I changed the port to SSH into the server and made it a bit too close to the port number Plex uses. I changed the port SSH uses to another one again, rebooted and now Plex works again.

Thank you for the help!

---

<div class="post-metadata">

**Author:** ![NCPW](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@NCPW](https://forums.plex.tv/u/NCPW)\
**Post date:** [February 27, 2022, 2:28pm UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/16 "2022-02-27T14:28:28Z")

</div>

I’m guessing the day the Plex stopped working for me was the first time the server restarted since I made the changes which is why I never noticed the conflict until then.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [May 28, 2022, 2:29pm UTC](https://forums.plex.tv/t/failed-to-start-plex-media-server/778513/17 "2022-05-28T14:29:05Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
