Can't launch glassfish server at boot

Discussion in 'Mac OS X Server, Xserve, and Networking' started by Leslie.Hon, Jun 20, 2012.

  1. macrumors member

    Apr 27, 2008
    Hong Kong
    Hi, I setup a Lion Server and install Glassfish 3.1.2 using Homebrew
    Now I can start the service by manual
    asadmin start-domain domain1
    Now I want to start the glassfish at server boot (without login)
    I tried to follow
    HERE to setup a launchd

    Here is my script (modified the path for homebrew)

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
    <plist version="1.0">
    When I reboot the server, it can't start the service , the log is shown below:

    Jun 20 17:06:54 server[1] (com.sun.glassfish[2439]): Suspicious setup: User "appserver" maps to user: _appserver
    Jun 20 17:06:55 server[1] (com.sun.glassfish[2439]): Tried to setup shared memory more than once
    Jun 20 17:06:56 server com.sun.glassfish[2439]: The main GlassFish configuration file is missing.  This is where it is supposed to be: /usr/local/Cellar/glassfish/3.1.2/libexec/glassfish/domains/domain1/config/domain.xml
    Jun 20 17:06:56 server com.sun.glassfish[2439]: Command start-domain failed.
    Jun 20 17:06:56 server[1] (com.sun.glassfish[2439]): Exited with code: 1
    Jun 20 17:07:05 server sandboxd[2319] ([73]): mds(73) deny file-write-data /dev/dtracehelper
  2. macrumors newbie

    Jul 23, 2012
    Glassfish server on reboot

    Hi Leslie,

    Did you find a solution?

    thanks in advance,
  3. macrumors G4


    Jun 6, 2003
    Solon, OH
    The first thing to check when diagnosing issues like this one is the working directory. Remember that when launchd starts something, its working directory will NOT be the same as the one used when you start things manually from the Terminal. This is especially troublesome if relative paths are used, as these break if the working directory isn't set to what is expected.

Share This Page