3

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 ?**

dobey
  • 40,344
  • 5
  • 56
  • 98
richa
  • 95
  • 3
  • 3
  • 5

1 Answers1

9

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

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

or add the path to your PATH variable

PATH=$PATH:/usr/local/glassfish3.1.2.2/bin
asadmin start-domain
asadmin stop-domain

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

catch23
  • 1,224
  • 9
  • 31
  • 42
January
  • 35,223
  • 15
  • 82
  • 101
  • 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 "http://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
  • hmm, where does current version install asadmin to? – Thufir Oct 24 '17 at 16:31