Address already in use running multiple instances

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
criddle1091
Posts: 2
Joined: Fri Feb 05, 2016 3:20 pm

Address already in use running multiple instances

Post by criddle1091 »

In previous versions, I have been able to run two instances of UMS. One for the kids and one for the adults. I updated to 6.0.0 today and this is no longer the case.

One is run as my normal user and one as root user from different locations on the hdd. "Only run an single instance of UMS" is unchecked in both copies. Both server and web ports have been changed in the root copy so it shouldn't interfere with the other and the web interfaces have been turned off, but I still get the error.

From the log file:
ERROR 2016-02-04 21:32:10.512 [main] A serious error occurred during Universal Media Server initialization: Address already in use
TRACE 2016-02-04 21:32:10.555 [main]
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_71]
at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_71]
at sun.nio.ch.Net.bind(Unknown Source) ~[na:1.8.0_71]
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[na:1.8.0_71]
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) ~[na:1.8.0_71]
at sun.net.httpserver.ServerImpl.<init>(Unknown Source) ~[na:1.8.0_71]
at sun.net.httpserver.HttpServerImpl.<init>(Unknown Source) ~[na:1.8.0_71]
at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(Unknown Source) ~[na:1.8.0_71]
at com.sun.net.httpserver.HttpServer.create(Unknown Source) ~[na:1.8.0_71]
at net.pms.remote.RemoteWeb.<init>(RemoteWeb.java:90) ~[ums.jar:6.0.0]
at net.pms.PMS.init(PMS.java:583) [ums.jar:6.0.0]
at net.pms.PMS.createInstance(PMS.java:1062) [ums.jar:6.0.0]
at net.pms.PMS.main(PMS.java:1220) [ums.jar:6.0.0]

I have attached logs for both instances. In this case, I ran the copy for my user first and then attempted to run as root, which received the error. It does not matter which one starts first, the second copy receives the error.

I appreciate any help you can provide.

Sincerely,
Chris
Attachments
user_ums_dbg.zip
(18.85 KiB) Downloaded 488 times
root_ums_dbg.zip
(5.36 KiB) Downloaded 475 times
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Address already in use running multiple instances

Post by Nadahar »

I see no sign of the web interface being either turned off or it's port changed. The parameters are:

Code: Select all

web_enable =
web_port = 
Either disable the web interface on one instance, or change the web port (the default is 9001) on one instance. The only thing changed in 6.0.0 is that this error is no longer suppressed.
criddle1091
Posts: 2
Joined: Fri Feb 05, 2016 3:20 pm

Re: Address already in use running multiple instances

Post by criddle1091 »

Apologies. I was editing the UMS.conf in the program directory instead of in the .config/UMS directory. I added the parameter to the ~/.config/UMS/UMS.conf and it solved it.

For what it's worth, the .config dir file hadn't been changed from the previous working version.
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Address already in use running multiple instances

Post by Nadahar »

The bind error has been there all along, but it wasn't exposed in previous versions.
snoop_mx
Posts: 3
Joined: Thu Aug 04, 2016 5:22 pm

Re: Address already in use running multiple instances

Post by snoop_mx »

criddle1091 wrote:Apologies. I was editing the UMS.conf in the program directory instead of in the .config/UMS directory. I added the parameter to the ~/.config/UMS/UMS.conf and it solved it.

For what it's worth, the .config dir file hadn't been changed from the previous working version.


I have the same problem, please, How can I do fix it??
Nadahar
Posts: 1990
Joined: Tue Jun 09, 2015 5:57 pm

Re: Address already in use running multiple instances

Post by Nadahar »

Have you made sure that all ports are different for the two configurations? If not, this will happen.
Post Reply