Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

http://glassfish.java.net/public/downloadsindex.html#top

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
add comment

1 Answer 1

up vote 3 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

PATH=$PATH:/usr/local/glassfish3.1.2.2/bin
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
add comment

Your Answer

 
discard

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.