Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed glassfish in ubuntu 12.04 from below: (the first one)

I have user-admin and password-admin for administrator and installation directory is root/glassfish

After installing it started the deafult domain automatically so I see the admin login page when I type "http://localhost:4848/" in the browser. I am able to login also with above user and password.

In the quick-start guide it says following to start the server

as-install/bin/asadmin start-domain 

to stop:

as-install/bin/asadmin stop-domain

I tried to start and stop to glassfish like that.

1) I moved to usr/local/glassfish3.1.2.2/bin directory and then I type folllowing:

asadmin start-domain but it gives me following:

No command 'asadmin' found, did you mean:
 Command 'amadmin' from package 'amanda-server' (universe)
asadmin: command not found

I get same when I try to stop it by as-admin stop-domain

**May be I have misunderstood the instructions to start and stop the server.

Could someone please tell me what am I doing wrong here ?**

share|improve this question
up vote 7 down vote accepted

The directory is not on your PATH variable. Use './asadmin' or asadmin with full path:

/usr/local/glassfish3.1.2.2/bin/asadmin start
/usr/local/glassfish3.1.2.2/bin/asadmin stop

or add the path to your PATH variable

asadmin start
asadmin stop

To make it permanent, add the PATH modification to your .profile or /etc/profile.

share|improve this answer
Thanks. With ./asadmin I am able to run start and stop command. But when I run stop command, it shows "command stop executed successfully" So I think it stopped properly but even after stopping when I type "localhost:4848/"; in browser, it shows me login page. why does it show even if I stopped it ? – richa Sep 28 '12 at 13:40
Try running lsof -i :4848 to see what is running on that port. Maybe it is a previous instance that you did not manage to kill properly? – January Sep 28 '12 at 13:57
thanks again..U were right, it was already running when I killed that process, the command seem to work fine. – richa Sep 28 '12 at 14:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.