Page 1 of 1

Address already in use running multiple instances

Posted: Fri Feb 05, 2016 3:36 pm
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

Re: Address already in use running multiple instances

Posted: Fri Feb 05, 2016 4:55 pm
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.

Re: Address already in use running multiple instances

Posted: Fri Feb 05, 2016 5:08 pm
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.

Re: Address already in use running multiple instances

Posted: Fri Feb 05, 2016 11:14 pm
by Nadahar
The bind error has been there all along, but it wasn't exposed in previous versions.

Re: Address already in use running multiple instances

Posted: Thu Aug 04, 2016 5:23 pm
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??

Re: Address already in use running multiple instances

Posted: Fri Aug 05, 2016 12:51 am
by Nadahar
Have you made sure that all ports are different for the two configurations? If not, this will happen.