Right, I didn't meant to have it in the agent installer and/or to change the user's server settings, that's too much.. for that I'd just use the documentation.

The issue is more related to starting Hawkular and the agent doesn't work OOTB. That line you've shown is preceded by "if [ "x$JAVA_OPTS" = "x" ]; then", meaning it will only apply if no custom JAVA_OPTS are already defined.. which I guess most dev(op)s define. IMO, that piece of code in standalone.conf should be something like:

if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m"
   JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS"
   JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true"
else
   JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true"
   echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi

So that those 2 options would always be present, even if JAVA_OPTS are already present.

Anyway, +1 on catching that exception and presenting some meaningful message and instructions/link on how to fix.

Alexandre


On Thu, Nov 26, 2015 at 2:43 PM, John Mazzitelli <mazz@redhat.com> wrote:
The major issue with this is we currently have no way of changing this kind of thing via the agent installer today. It isn't impossible, but its something we would have to add to specifically allow the installer to tweak the .conf file such that it can add this option (making sure we don't screw up any customizations the user already put in that file, if there are any).

But yes, I do see:

   JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"

in the out-of-box WildFly. So this is already in the default settings for WildFly. Which makes me even more hesitate to add something in the installer to go screwing around with the user's customized configuration to get this to work :) So maybe this is only a documentation issue - we have to tell people, "If you are running on Mac *and* you want to monitor file systems *and* you took out the java.awt.headless=true setting from the defaults settings in the .conf file, you need to put it back" :-) Or we can catch this exception and log that kind of message.

----- Original Message -----
> Hi,
>
> I don't see how the fact that we don't officially support Mac OS is an
> impediment to adding such option, which won't break anything else and make
> the OOTB experience for a Mac user work. Even if we can't (and likely
> shouldn't) go the full way of changing monitored machines, this would help.
>
> Actually, I've seen that by default WFLY starts with the
> java.awt.headless=true option (and also with java.net.preferIPv4Stack=true,
> which I requested at https://issues.jboss.org/browse/HAWKULAR-38) so this
> may be a minor issue, as I've only experienced it due to having my custom
> JAVA_OPTS.
>
> Alexandre
>
>
>
> On Tue, Nov 24, 2015 at 1:08 PM, John Mazzitelli <mazz@redhat.com> wrote:
>
> > Heiko - I think I remember you reporting this (but I can't remember where
> > or when). See: https://issues.jboss.org/browse/HAWKULAR-838
> >
> > This is because on MacOS the OSHI library uses the Swing file chooser
> > dialog widget to obtain file system data.
> >
> > Since MacOS is not an officially supported platform, do we want to do what
> > this JIRA asks? That is, change kettle's startup options? This would also
> > mean we'd have to somehow get the agent installer to also change WF/EAP
> > startup options (not something I think we want to do - especially since
> > this only affects MacOS).
> >
> > We could add this to the agent install documentation for those on MacOS.
> >
> > The other alternative is to disable file system data collection in the
> > agent, assuming the user doesn't care about those metrics.
> > _______________________________________________
> > hawkular-dev mailing list
> > hawkular-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hawkular-dev
> >
>
_______________________________________________
hawkular-dev mailing list
hawkular-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hawkular-dev