UMS will not start

For help and support with Universal Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
CharlieBisbee
Posts: 5
Joined: Sun Feb 24, 2019 9:10 pm

UMS will not start

Post by CharlieBisbee » Sun Feb 24, 2019 9:34 pm

I tried to use UMS several years ago and had same issue. Now trying harder and would really appreciate any help

1) Windows 10 with latest MS update
2) UMS 7.9.0 standalone-x64
3) java version 1.8.0_201

After install tried to start with desktop shortcut -- click and nothing happens
Re FAQ remove java, reboot, reinstall java.

result UMS does not start
looked for log files -- there are none being created

Uninstalled and reinstalled UMS this time in directory with no spaces -- see below
before reinstall deleted all .../UMS directories in C:\Users\All Users and C:\Users\MyUserName
Deleted previous install directory
on install clicked box saying clean install

Problem persists

Started elevated cmd prompt. Changed to install directory. Ran command line
java -Xmx768M -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8 -classpath update.jar;ums.jar net.pms.PMS

Note not javaw as in bat file as this gives no output (and I do not think it should) with the following result:

Exception in thread "main" java.lang.ExceptionInInitializerError
at net.pms.configuration.PmsConfiguration.<init>(PmsConfiguration.java:606)
at net.pms.configuration.PmsConfiguration.<init>(PmsConfiguration.java:566)
at net.pms.PMS.main(PMS.java:1016)
Caused by: java.nio.file.InvalidPathException: Illegal char <"> at index 0: "
at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
at sun.nio.fs.WindowsPath.parse(Unknown Source)
at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
at java.nio.file.Paths.get(Unknown Source)
at net.pms.util.FileUtil.getOSPath(FileUtil.java:1904)
at net.pms.util.FileUtil.findInOSPath(FileUtil.java:1957)
at net.pms.util.FileUtil.findExecutableInOSPath(FileUtil.java:1922)
at net.pms.configuration.WindowsProgramPaths.<init>(WindowsProgramPaths.java:113)
at net.pms.configuration.PlatformProgramPaths.<clinit>(PlatformProgramPaths.java:147)
... 3 more

At this point I am lost.
Please help.

Thanks

Nadahar
Posts: 1345
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS will not start

Post by Nadahar » Mon Feb 25, 2019 6:46 am

You have done the correct thing, the crash is before the log file is created so the only way to get the output is to run "java" instead of "javaw" as you did. The developers should have the information they need to find the problem with the stacktrace you posted. An interesting point is what is different with your system.

This is probably related to some problem with the configuration file, it is by default located in "%PROGRAMDATA%\UMS" (not under "\Users"). I guess you could check it out and see if there's an old configuration there with some invalid path specification or permissions problems.

CharlieBisbee
Posts: 5
Joined: Sun Feb 24, 2019 9:10 pm

Re: UMS will not start

Post by CharlieBisbee » Tue Feb 26, 2019 2:03 pm

What is different with my system. Wish I knew. I upgraded windows 10 (its pro version) rather than clean install in an attempt to keep old programs as finding installation disks after several moves will be difficult. That has caused some issues.

UMS had same symptoms several years ago before the upgrade and I had forgotten. I did not want it as badly then and so when it did not run I just quit so I did not do a stack trace but symptom was identical. I deleted the old version so do not know which one.

Dumb of me to not delete appdata entry. Oh well. Looking at the config file in appdata it has a creation date of 21 Feb 2019 so consistent with last install. All values are at default that is the entries are just param = with nothing after the =.

PmsConfiguration.java line 558 is /**
* Default constructor that will attempt to load the DMS configuration file
* from the profile path.
*
* @throws org.apache.commons.configuration.ConfigurationException
* @throws InterruptedException
*/
public PmsConfiguration() throws ConfigurationException, InterruptedException {
this(true);
}

PmsConfiguration.java line 606 programPaths = new ConfigurableProgramPaths(configuration);
PMS.java line 1016 seems to be setConfiguration(new PmsConfiguration());

So trying to load DMS (?) config file from profile path. I am (or was) a c, C++(windows), javascript (for Firefox addons) type of programmer. This has reached the limit of my ability with java.

The C:\ProgramData\UMS\UMS.conf has full access for all users and has no spaces in the path.

Things like this bug me when I cannot understand them but I cannot go further without some hints.

Thanks
Charlie

Nadahar
Posts: 1345
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS will not start

Post by Nadahar » Wed Feb 27, 2019 2:26 am

If you know C/C++, you should have no trouble with Java, it's basically simplified C++ ;)

That said, this project is pretty large and complex so it takes quite a lot of time to get an overview over things even for people that are familiar with Java. The lack of logic and documentation many places doesn't help.

The reason it says DMS (not UMS) in the JavaDoc is because the UMS devs don't bother to go through the code they copy from Digital Media Server (DMS). DMS is a fork made by me because I disagree with the lack of focus on "code quality" in UMS, which leads to a lot of bugs and much frustration for everybody involved. The primary focus for DMS is to fix what's already there instead of constantly adding new (buggy) stuff making the situation worse. That said, when cleaning up things it will often lead to some new features or at least new possibilities for existing features. Even if the UMS devs doesn't want to do the "hard work" of fixing things themselves, they very much want to copy the fixes already done. But, since the "merging" of the code is done in the same hastily manner as everything else, it doesn't always actually lead to improvements ;)

In any case, looking at this case, it seems to me that the problem is with some of my code that they have copied, so I guess I am somewhat responsible :P The error is when your PATH environment variable is split and parsed, I suspect that you might have used double quotes within the PATH..? Could you post you complete PATH? It would be nice for me to make the code robust enough to tackle it anyway...

CharlieBisbee
Posts: 5
Joined: Sun Feb 24, 2019 9:10 pm

Re: UMS will not start

Post by CharlieBisbee » Tue Mar 05, 2019 9:10 am

Thanks for your response,

I did find several possible irregularities in my path variables

1) a var that was ";C\programfiles\nodejs" It starts with " and was added by the node js installer. Note I use a dir called ProgramFiles rather than Program files for many but not all programs particularly ones that I think might have a problem with spaces

2) a var that contained nothing but a " ;"; I have no idea how this got there but when using the system properties Env vars edit, it did not show. It did show in command prompt path command and could be edited with "edit as text" option

3) several empty vars ie ;; only. Again windows ignored these in the env built in editor but they were fixed as in #2

I fixed all of these

UMS still would not start but the error was different. Instead error was illegal ":" in path. Somehow another env var was causing the issue.

4) C:\Users\C:\Users\Charlie\.cargo\bin fixed that to C:\Users\Charlie\.cargo\bin

now getting error Could not find or load main class net.pms.PMS

reinstalled UMS and IT RUNS

Moral == windows should be clean installed occasionally even if that means searching for long packed installation disks for old programs. Hm but will I? Not till I find some disks.
Path vars should be cleaned. Even if windows can understand them some other programs may not handle malformed vars
NOTE: This problem was happening several years ago on windows 7-8 as well. Upg Windows 10 without reinstall propagated malformed vars.

Thanks for your time and for the education. I can learn new tricks.
Charlie

Nadahar
Posts: 1345
Joined: Tue Jun 09, 2015 5:57 pm

Re: UMS will not start

Post by Nadahar » Tue Mar 05, 2019 9:38 am

It's good to hear that you got it to work. I still think the parsing should be more robust so that an invalid PATH doesn't prevent it from starting, so I'll have to try to find the time to do that. That said, your PATH really was invalid and wouldn't have been easy to parse "properly".

Generally, I've had nothing but trouble with upgraded Windows installations (that mostly goes for Linux as well), so I never do that. Cleaning up the PATH and other environmental variables manually isn't that hard, but it's also all the stuff in the registry that ends up pointing to the wrong place or being generally invalid. I find that life is too short for that ;)

ilitirit
Posts: 2
Joined: Sat Jul 13, 2013 10:02 am

Re: UMS will not start

Post by ilitirit » Sat Apr 13, 2019 9:31 am

Just fixed the same issue. Seems like UMS doesn't like double quotes in any part of the path.

Post Reply