Hi Aravind, Thank you very much for pointing out that there is indeed a zip download. It seemed really unnatural to have to do this with the Mac app, but somehow I had missed the alternative download and thought that was my only option. Silly me.
Thanks again and all the best, Katya > On 18 May 2018, at 15:38, Aravind SV <[email protected]> wrote: > > Quick follow up: I tried this. Even though that allows you to go past this > issue, it'll fail for other Headless checks later. So, zip is the only thing > that'll work. I don't think the Mac app will work headless. > > On Fri, May 18, 2018 at 8:30 AM Aravind SV <[email protected] > <mailto:[email protected]>> wrote: > Hello Katya, > > It's probably easiest to use the zip <https://www.gocd.org/download/#zip>, > instead of the Mac application, in this case. That way, you can unzip it > anywhere and use it as any user, not just root. > > I've seen that java.awt.HeadlessException before. It's happening because the > Mac app's GUI launcher is being launched from a service (when you add it to > LaunchDaemon). With the zip, you shouldn't see it since there is no launcher. > If you really want to stick with the Mac app, you'll need to set the Java > system property: "java.awt.headless" in overrides.env: > > So, depending on which user you want to use, the file "~/Library/Application\ > Support/Go Agent/overrides.env" will need to have something like this: > > PROPERTIES=$(printf "%s\n%s" "$PROPERTIES" "-Djava.awt.headless=true") > > It seems like it'll be easier to just use the zip and not have to deal with > this. :) > > Cheers, > Aravind > > > On Thu, May 17, 2018 at 11:04 AM Katya Yurukova <[email protected] > <mailto:[email protected]>> wrote: > Hi everyone, > > I'm playing around with a simple GoCD configuration on a Mac mini and was > wondering whether it is at all possible to start Go Server/Go Agent with a > system level launch daemon when the system starts? > I have tried to make this work, but all I got after several trials and errors > was : > > Exception in thread "main" java.awt.HeadlessException > at > java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204) > at java.awt.Window.<init>(Window.java:536) > at java.awt.Frame.<init>(Frame.java:420) > at java.awt.Frame.<init>(Frame.java:385) > at javax.swing.JFrame.<init>(JFrame.java:189) > at > com.thoughtworks.go.server.launcher.GoMacLauncher.<init>(GoMacLauncher.java:53) > at > com.thoughtworks.go.server.launcher.GoMacLauncher.main(GoMacLauncher.java:50) > > The daemon was running as root, as I could not make it use a dedicated user > due to file permission problems. > > The setup is Go Server 18.5.0-6679.6679 running on macOS 10.12.5 with Java > version 1.8.0_152 > > Any insights will be highly appreciated. > > Best regards, > Katya > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
