Page 1 of 1

Script init.d

Posted: Sun Apr 28, 2013 10:22 pm
by Fabien
Hi Everyone,

UMS is supposed to start as a service thanks to this script http://www.ps3mediaserver.org/forum/vie ... 6550d5aaf3. It used to work quite well but since i reinstalled my computer it does not work anymore (i changed my HDD to a SSD). It seems that UMS starts before the network is up.
Here is the end of the ums.log file.

Code: Select all

INFO  2013-04-28 09:16:20.477 [main] Using localhost address
INFO  2013-04-28 09:16:20.478 [main] Created socket: 0.0.0.0/0.0.0.0:5001
INFO  2013-04-28 09:16:20.892 [main] The server is now available for renderers to find
ERROR 2013-04-28 09:16:20.905 [UPNPHelper] UPNP network exception
java.net.SocketException: No such device
	at java.net.PlainDatagramSocketImpl.join(Native Method) ~[na:1.7.0_03]
	at java.net.AbstractPlainDatagramSocketImpl.join(AbstractPlainDatagramSocketImpl.java:168) ~[na:1.7.0_03]
	at java.net.MulticastSocket.joinGroup(MulticastSocket.java:302) ~[na:1.7.0_03]
	at net.pms.network.UPNPHelper$2.run(UPNPHelper.java:340) ~[ums.jar:2.6.2]
	at java.lang.Thread.run(Thread.java:722) [na:1.7.0_03]
If i restart the service, UMS succeeds to get an IP address and it is ready to work. I think that something might be not correct in the script but i can't find what. The script requires the network to be started, and I also tried to force the server ip and port in ums configuration file. But nothing worked so far.

Any idea? (script and debug.log are enclosed to this post)

Thanks

Re: Script init.d

Posted: Fri May 31, 2013 7:19 pm
by Fabien
It seems that UMS starts before the network is up. That's why it cannot obtain an IP address.
But the startup script (in /etc/init.d/UniversalMediaServer) is supposed to require the network to start. I have also added the script with a low priority: update-rc.d UniversalMediaServer defaults 99.

Anyway i found a workaround. I have just add "sleep 1" to UMS.sh to force the program to wait a little bit before starting. It's not a clean solution but it works at least.