2

I'm running Glassfish 4.1 on Ubuntu 16. enable-secure-admin worked the first time I setup glassfish it. Due to some issue I had setting up security certificate I tried to set it up glassfish from scratch again.

The guide I'm following the most is: https://www.nabisoft.com/tutorials/glassfish/installing-glassfish-41-on-ubuntu

Now every time I run it tells me the command does not exist. The funny thing is:

  1. disable-secure-admin works like a charm
  2. it includes enable-secure-admin in the list of closest matching commands, which makes no sense at all!

The image with the errors can be found here when I'm running as the user that owns the file (http://i.imgur.com/DWIX2Ok.png)

When running as root this is the result (http://imgur.com/7y4KPrc)

Any help would be appreciated! Thanks.


Edit: It seems to be a security misconfiguration

Another symptom I realized was that everytime you start the domain and try to access 4848 the admin console says its loading but never shows login. If you try to refresh the page after that you get a completely blank page.

I noticed some stuff in the error log:

http://pastebin.com/6vYmWNFW

1 Answers1

0

It was one of the two following things that had fixed the issue.

Step 1: I loaded asadmin in /etc/environment and put both paths /path_to_glassfish/bin and /path_to_glassfish/glassfish/bin (and an additional step I forgot which let all users access asadmin command)

If I accessed it using the binary folder directly (ie. /path_to_glassfish/bin/asadmin) the error went away.

Step 2: My tls certificate configuration.

Using Danial Camargo's answer to this question (https://stackoverflow.com/questions/12860289/import-ssl-certificate-in-glassfish)

I setup my StartSSL tls certificate properly. When using the nabisoft tutorial I might have not followed the instructions correctly when replacing the default s1as and glassfish-instance certificates. Once I removed those from my keystore everything worked fine after.

  • Could you elaborate on what, exectly, you did in /etc/environment? I'm not familiar with that file, and mine exists, but is currently empty. Can add the exact format of the lines/commands you added/edited in that file? – Mark J. Bobak Aug 15 '18 at 21:38