Can't stop glassfish on linux as user (CLI306 Warning)
I have a weird problem with glassfish running on Debian GNU/Linux 6.
I have jdk1.7.0_06 accessible via "/usr/lib/jvm/jdk". It belongs to user and group "root".
Glassfish 22.214.171.124 is located in folder "/opt/glassfish3" and belongs to user and group "glassfish".
I have enabled secure-admin to make remote-deploy possible...
To start and stop the server I have written a custom start-stop script.
Now the problem:
I can start the server by using the asadmin-command with the user "glassfish", but when I want to stop the server using the user "glassfish" it sais:
glassfish@server:/opt$ glassfish3/bin/asadmin stop-domain
CLI306 Warning - The server located at /opt/glassfish3/glassfish/domains/domain1 is not running.
Command stop-domain executed successfully.
I did not find any solution via google and hope that somebody can help me here...