Code:
Jan 22 21:41:46 worker-node-1 systemd[1]: Starting GlassFish Server v4.1...
Jan 22 21:42:15 worker-node-1 java[1043]: The domains directory /home/techyman/glassfish4/glassfish/domains
Jan 22 21:42:15 worker-node-1 java[1043]: contains multiple domains. Please specify a domain.
Jan 22 21:42:15 worker-node-1 java[1043]: Available domains: domain1, a, b, c, e, x
Jan 22 21:42:15 worker-node-1 java[1043]: Command start-domain failed.
Jan 22 21:42:15 worker-node-1 systemd[1]: glassfish.service: control process exited, code=exited status=1
Jan 22 21:42:15 worker-node-1 systemd[1]: Failed to start GlassFish Server v4.1.
Jan 22 21:42:15 worker-node-1 systemd[1]: Unit glassfish.service entered failed state.
Jan 22 21:42:15 worker-node-1 systemd[1]: glassfish.service failed.
Jan 22 21:55:55 worker-node-1 systemd[1]: Starting GlassFish Server v4.1...
Jan 22 21:55:55 worker-node-1 java[2789]: The domains directory /home/techyman/glassfish4/glassfish/domains
Jan 22 21:55:55 worker-node-1 java[2789]: contains multiple domains. Please specify a domain.
Jan 22 21:55:55 worker-node-1 java[2789]: Available domains: domain1, a, b, c, e, x
Jan 22 21:55:55 worker-node-1 java[2789]: Command start-domain failed.
Jan 22 21:55:56 worker-node-1 systemd[1]: glassfish.service: control process exited, code=exited status=1
Jan 22 21:55:56 worker-node-1 systemd[1]: Failed to start GlassFish Server v4.1.
Jan 22 21:55:56 worker-node-1 systemd[1]: Unit glassfish.service entered failed state.
Jan 22 21:55:56 worker-node-1 systemd[1]: glassfish.service failed.
I clearly understand this issue but I don't realize how do I put "all domains" in unit file? Do I do that manually?
[Unit]
Description = GlassFish Server v4.1
After = syslog.target network.target
Code:
[Service]
User=techyman
Group=techyman
ExecStart = /home/techyman/.java/bin/java -jar /home/techyman/glassfish4/glassfish/lib/client/appserver-cli.jar start-domain
ExecStop = /home/techyman/.java/bin/java -jar /home/techyman/glassfish4/glassfish/lib/client/appserver-cli.jar stop-domain
ExecReload = /home/techyman/.java/bin/java -jar /home/techyman/glassfish4/glassfish/lib/client/appserver-cli.jar restart-domain
Type = forking
[Install]
WantedBy = multi-user.target
This is my unit service file.