Hi, I setup a Lion Server and install Glassfish 3.1.2 using Homebrew
Now I can start the service by manual
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)
When I reboot the server, it can't start the service , the log is shown below:
Now I can start the service by manual
Code:
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)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.sun.glassfish</string>
<key>Disabled</key>
<false/>
<key>UserName</key>
<string>appserver</string>
<key>GroupName</key>
<string>appserverusr</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/asadmin</string>
<string>start-domain</string>
<string>domain1</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
When I reboot the server, it can't start the service , the log is shown below:
Code:
Jun 20 17:06:54 server com.apple.launchd[1] (com.sun.glassfish[2439]): Suspicious setup: User "appserver" maps to user: _appserver
Jun 20 17:06:55 server com.apple.launchd[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 com.apple.launchd[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