Quantcast
Channel: VMware Communities : Popular Discussions - Hyperic User Forums
Viewing all articles
Browse latest Browse all 52618

Hyperic HQ Agent Fails to start with absolute paths on Windows platforms

$
0
0
When using absolute paths (i.e. C:\hyperic\data) for the data directory on Windows, Hyperic HQ Agent fails to start.  After looking through the code I've root caused the issue to the "init" method in the "org.hyperic.hq.agent.server.AgentDListProvider" class.  The issue stems from the  usage of tokenizing a string with a colon delimiter (i.e. :).  Since Windows uses a ":" as part of an absolute path for drives this causes the tokenizer validation to fail since the data directory is split into 2 tokens.  I've fixed this temporarily in our internal builds to use a pipe (i.e. |) instead of a colon as the delimiter for the input string.  I've attached a patch with the corresponding fix.

One thing to note is this doesn't protect against all cases, since you can use a "|" in a filename/path on *nix systems.  This is much more unlikely since a pipe is usually used for redirection on these systems. Usage of the pipe is at least more safe than a colon, which is known to be a component of a drive absolute paths on Windows systems. The best solution would be to rework the method to be passed an object or use multiple parameters for each of the inputs to protect from potential input errors.

Message was edited by: tpounds

Viewing all articles
Browse latest Browse all 52618

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>