Another program is using port 500X, which UMS needs.

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
cesedy
Posts: 10
Joined: Sat Apr 04, 2020 2:29 am

Another program is using port 500X, which UMS needs.

Post by cesedy »

Hi.
Every time, when I turn on my PC and UMS loads (auto or manual), I get a error "Another program is using port 500X, which UMS needs.".

Code: Select all

13:28:24 INFO  Loading renderer configurations from C:\Program Files (x86)\Universal Media Server\renderers
13:28:24 INFO  Enabled 171 configurations, listed in order of loading priority:
13:28:24 INFO  :   Mirascreen
...
13:28:24 INFO  :   Yamaha RX-V671
13:28:25 INFO  Using address /192.168.2.96 found on network interface: name:eth1 (Realtek PCIe GbE Family Controller)
13:28:25 INFO  Created socket: /192.168.2.96:5002
13:28:25 ERROR Another program is using port 5002, which UMS needs.
13:28:25 ERROR You can change the port UMS uses on the General Configuration tab.
After I change the port from 5002 to 5001 and restart the server, it works.

Code: Select all

13:28:54 INFO  Stopping server on host 192.168.2.96 and port 5002...
13:28:54 INFO  Loading renderer configurations from C:\Program Files (x86)\Universal Media Server\renderers
13:28:55 INFO  Enabled 171 configurations, listed in order of loading priority:
13:28:55 INFO  :   Mirascreen
...
13:28:55 INFO  :   Yamaha RX-V671
13:28:56 INFO  Using address /192.168.2.96 found on network interface: name:eth1 (Realtek PCIe GbE Family Controller)
13:28:56 INFO  Created socket: /192.168.2.96:5001
But next time, when I switch the computer on, I get the error again "Another program is using port 5001, which UMS needs.", so I need to change port every time.

Could it be possible to implement random port at startup. Say, I input port range from 5001 - 5020, and next time UMS starts with a random port, except the previous one?

Thank you.

P.s. The problem is not with the latest version only, it has been from previous versions as well. And every time I update UMS, I select clean installation.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Another program is using port 500X, which UMS needs.

Post by Nadahar »

There would be no point in using a random port - the "old" port is supposed to be released with you quite UMS. It sounds to me like you're trying to run multiple instances at once, maybe you have installed it as a service in addition to running it "manually"?
cesedy
Posts: 10
Joined: Sat Apr 04, 2020 2:29 am

Re: Another program is using port 500X, which UMS needs.

Post by cesedy »

I have checked "Start with Windows" and installed as Windows service.

Should only one of them be selected?

Edit:

I uninstalled as Windows service, but I got the same error again, after reboot I need to change port.

Edit 2:

So, I changed port to 5020 and rebooted the computer.

After reboot I got error "Another program is using port 5020, which UMS needs."

Changed to 5001 and rebooted server. Everything works.

Checked in CMD what was using what ports with command: netstat -a -b

Got this:

Code: Select all

 TCP    192.168.2.96:5001      activation:0           LISTENING
 [javaw.exe]
  TCP    192.168.2.96:5001      192.168.2.25:50134     TIME_WAIT
  TCP    192.168.2.96:5001      192.168.2.25:63760     TIME_WAIT
  TCP    192.168.2.96:5001      DESKTOP-LJ9GI0P:11864  TIME_WAIT
  TCP    192.168.2.96:5001      DESKTOP-LJ9GI0P:11865  TIME_WAIT
  TCP    192.168.2.96:5001      DESKTOP-LJ9GI0P:11866  TIME_WAIT
  TCP    192.168.2.96:5001      DESKTOP-LJ9GI0P:11867  TIME_WAIT
  TCP    192.168.2.96:5001      DESKTOP-LJ9GI0P:11868  TIME_WAIT
  TCP    192.168.2.96:5001      DESKTOP-LJ9GI0P:11869  TIME_WAIT
  TCP    192.168.2.96:5001      DESKTOP-LJ9GI0P:11870  TIME_WAIT
...
  TCP    192.168.2.96:5001      DESKTOP-LJ9GI0P:12798  TIME_WAIT
  TCP    192.168.2.96:5020      activation:0           LISTENING
 [java.exe]
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:11164  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:11165  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:11166  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:11167  TIME_WAIT
...
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:11319  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:imip-channels  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:11321  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:11322  TIME_WAIT
  ...
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:12719  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:12720  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:12721  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:12722  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:12723  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:12724  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:12725  TIME_WAIT
  TCP    192.168.2.96:5020      DESKTOP-LJ9GI0P:12726  TIME_WAIT
  TCP    192.168.2.96:11432     vip04:https            CLOSE_WAIT
That means, that [java.exe] is starting with port 5020 before UMS has launched. Then UMS starts with [javaw.exe] process and tries to access 5020 port, but cannot. After I change port, the [javaw.exe] process can access 5001 port.

So, there is a conflict with [java.exe] and [javaw.exe].
cesedy
Posts: 10
Joined: Sat Apr 04, 2020 2:29 am

Re: Another program is using port 500X, which UMS needs.

Post by cesedy »

And I think it is somehow connected with my previous error which is now fixed, where [java.exe] accessed medias.mv.db file before UMS started, which resulted in stuck on Splash screen when [javaw.exe] tried to access it.

Yet another "Stuck on splash" topic
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Another program is using port 500X, which UMS needs.

Post by Nadahar »

This is caused by the service. You should not install UMS as a service unless you know exactly how to use it. When running UMS as a service it must be managed by editing text configuration files, no GUI is available.

It sounds to me like your service uninstallation didn't work properly, run "services.msc" and check if you find UMS in the list. If the service has been uninstalled, it should NOT be in the list. Please note: A reboot is usually required to remove a Windows service completely.
cesedy
Posts: 10
Joined: Sat Apr 04, 2020 2:29 am

Re: Another program is using port 500X, which UMS needs.

Post by cesedy »

Yes, the Universal Media Server was still in Service list.
Deleted it with

Code: Select all

sc delete "Digital Media Server"
And now, after reboot, the ports are working

Thank you.
kenmckinney78
Posts: 2
Joined: Fri Jan 05, 2018 6:04 pm

Re: Another program is using port 500X, which UMS needs.

Post by kenmckinney78 »

I was having many problems with UMS errors on the TV something to the effect of "unable to locate server" and "no playable files found". On the General Settings tab I added 52323 to the Force port of the server (5001 by default). I have not had those problems since. Now my only problem is to get Resumed Files to play, it always says File is corrupt or not supported.
Post Reply