Brief-Wishbone9091
Member
Bash:
[root@localhost ~]# systemctl enable glassfish
Failed to execute operation: Bad message
[root@localhost ~]# sudo systemctl enable glassfish
Failed to execute operation: Bad message
How do I fix this issue?
This is my unit file for glassfish.service. I've tried with 2 different such files yet no good.
Bash:
[Unit]
Description = GlassFish Server v4.1
After = syslog.targetnetwork.target
[Service]
User=banksmart
Group=banksmart
ExecStart = /home/banksmart/.java/bin/java -jar
/home/banksmart/glassfish4/glassfish/lib/client/appserver-cli.jar start-domain
ExecStop =/home/banksmart/.java/bin/java -jar
/home/banksmart/glassfish4/glassfish/lib/client/appserver-cli.jar stop-domain
ExecReload =/home/banksmart/.java/bin/java -jar
/home/banksmart/glassfish4/glassfish/lib/client/appserver-cli.jar restart-domain
Type = forking
[Install]
WantedBy = multi-user.target
Bash:
[Unit]
Description = GlassFish Server v4.1
After = syslog.targetnetwork.target
[Service]
User=banksmart
Group=banksmart
ExecStart = /home/banksmart/.java/bin/java -jar
/home/banksmart/glassfish4.1/glassfish4.1/glassfish/lib/client/appserver-cli.jar start-domain
ExecStop =/home/banksmart/.java/bin/java -jar
/home/banksmart/glassfish4.1/glassfish4.1/glassfish/lib/client/appserver-cli.jar stop-domain
ExecReload =/home/banksmart/.java/bin/java -jar
/home/banksmart/glassfish4.1/glassfish4.1/glassfish/lib/client/appserver-cli.jar restart-domain
Type = forking
[Install]
WantedBy = multi-user.target
My appserver-cli.jar is actually located at:
Bash:
/home/banksmart/glassfish4/glassfish/lib/client/appserver-cli.jar
BTW, I am on centos 7 virtual machine.
This is what systemctl status glassfish produces:
Bash:
glassfish.service - GlassFish Server v4.1
Loaded: error (Reason: Bad message)
Active: inactive (dead)
Apr 24 23:59:46 localhost.localdomain systemd[1]: [/etc/systemd/system/glassfish.service:8] Missing '='.
Apr 25 00:00:47 localhost.localdomain systemd[1]: [/etc/systemd/system/glassfish.service:8] Missing '='.
Apr 25 00:08:41 localhost.localdomain systemd[1]: [/etc/systemd/system/glassfish.service:8] Missing '='.
Apr 25 00:08:52 localhost.localdomain systemd[1]: [/etc/systemd/system/glassfish.service:8] Missing '='.
Apr 25 00:10:17 localhost.localdomain systemd[1]: [/etc/systemd/system/glassfish.service:8] Missing '='.