0

I launched an AWS EC2 instance in the EU West (Ireland) region and installed glassfish 4.1 on it.

The domain starts perfectly.

However, when I try any asadmin command (even to stop the domain), I get the following answer :

[ec2-user@ip-172... ~]$ asadmin stop-domain
autoscaling.us-east-1.amazonaws.com
[ec2-user@ip-172... ~]$ asadmin list-domains
autoscaling.us-east-1.amazonaws.com

I believe this is AWS default endpoint. I don't understand what's happening. I don't know if that is relevant but I'm using the default VPC located in EU West.

I googled my problem and found this thread on stackoverflow : Deploy to remote Glassfish instance via cli

But, in that case, the domain hadn't started and mine definitely started.

I'm quite novice in this field and I would really appreciate it if anyone could tell me what's wrong.

Thanks a lot.

EDIT : No answer for the following :

[ec2-user@ip-172-... ~]$ sudo netstat -lntp | grep java
[ec2-user@ip-172-... ~]$ 
John
  • 1
  • 2
  • how are you running asadmin commands? Is this on the command line when you are connected to the sever over SSH? Is that answer the only thing you get, or is it part of a bigger message? – Mike Oct 26 '16 at 10:34
  • Yes absolutely. I'm connecting to my instance using ssh. This is indeed the only thing I'm getting. No other message. – John Oct 26 '16 at 10:52
  • When you say "any asadmin command", what commands have you tried? Can you copy/paste the full terminal output, including the command you try? – Mike Oct 26 '16 at 12:24
  • Also, is GlassFish running on default ports, etc, and accessible on localhost? – Mike Oct 26 '16 at 12:24
  • @Mike GlassFish is running on default ports. Not on localhost. But when I append 4848 or 8080 to my public DNS and enter that into my browser, I land on the correct pages. Thanks a lot for your help – John Oct 26 '16 at 13:00
  • @Mike This is what the output looks like (sorry, I didn't manage to format the comment properly) : [ec2-user@ip-172-... ~]$ asadmin stop-domain autoscaling.us-east-1.amazonaws.com [ec2-user@ip-172-... ~]$ asadmin list-domains autoscaling.us-east-1.amazonaws.com – John Oct 26 '16 at 13:03
  • Comments don't have any formatting, so you're probably better off editing the question. Can you also add the output of `sudo netstat -lntp | grep java` to the question? – Mike Oct 26 '16 at 13:05
  • @Mike I did. No output. – John Oct 26 '16 at 13:22
  • OK, seeing the output formatted in the question has helped me spot something. You're just running "asadmin" in the home directory - is the `bin` directory for GlassFish on your `$PATH`? If not, then that command wouldn't work. Try calling the asadmin binary with its absolute path, e.g. `/home/ec2-user/glassfish4/bin/asadmin list-domains`. – Mike Oct 26 '16 at 13:26
  • No output from `netstat` is very odd. Do you get any output from `asadmin` when you successfully start the domain? – Mike Oct 26 '16 at 13:27
  • @Mike You're right. Calling it with its absolute path worked. And now the netstat gives me an output too. I guess nothing was wrong after all. Thank you so much for your help. – John Oct 26 '16 at 13:46
  • No problem :) it was interesting to work through! – Mike Oct 26 '16 at 14:29

0 Answers0