Can't access management console after enable-secure-admin

348 views
Skip to first unread message

Michael Flynn

unread,
Jul 2, 2020, 5:29:39 AM7/2/20
to Payara Forum
Hi,

I'm the new guy who posted yesterday about trying to get a datasource connection pool working.  I tried a few things and along the way somehow lost access to the management console on port 4848.  I decided to reinstall Payara.  I've now reinstalled a fresh copy of Payara and still can't access the console.  Here's the basic procedures I've followed;

OS: Centos 7
Payara Version: payara-5.191
(There's a LetsEncrypt SSL certificate installed on my domain)

$ cd /tmp
$ unzip payara-5.191.zip -d /opt/
$ chown -R payara:payara /opt/payara5/

=== /usr/lib/systemd/system/payara.service ===
[Unit]
Description = Payara Server v5.1
After = syslog.target network.target
[Service]
User = payara
ExecStart = /usr/bin/java -jar /opt/payara5/glassfish/lib/client/appserver-cli.jar start-domain
ExecStop = /usr/bin/java -jar /opt/payara5/glassfish/lib/client/appserver-cli.jar stop-domain
ExecReload = /usr/bin/java -jar /opt/payara5/glassfish/lib/client/appserver-cli.jar restart-domain
Type = forking
[Install]
WantedBy = multi-user.target
=============

$ systemctl enable payara.service
$ systemctl start payara.service

At this point payara starts okay and I can access the management console on http://domain:4848 but with message on the login screen;  

"Configuration Error, Secure Admin must be enabled to access the DAS remotely."

So from internet searches I do the following;

$ /opt/payara5/bin/asadmin change-admin-password # (interactive, accepts new password)
$ /opt/payara5/bin/asadmin -u admin enable-secure-admin

Enter admin password for user "admin":
"You must restart all running servers for the change in secure admin to take effect.
Command enable-secure-admin executed successfully."
$ sudo systemctl restart payara

Payara starts up and is running but with various SSL WARNING/SEVERE messages (see attached snippet).  And when I try to access the console on 4848 I get a HTTP ERROR 500. 

I can access asadmin but with the following responses;

$ /opt/payara5/bin/asadmin -u admin
Use "exit" to exit and "help" for online help.
NCLS-ADMIN-00010
Remote commands not fetched
asadmin>

I've repeated this process a couple of times but with the same results every time. I've also installed Payara on my windows desktop a few times and though a little different have got the installs working okay.  I have a payara localhost version and there was no Secure Admin required.  I also have a windows service payara installation and this did require enable-secure-admin (which worked fine, though there is no ssl cert on my windows network).  

Any help greatly appreciated :)

Mike
server-log-snippet.txt

Steve Millidge

unread,
Jul 2, 2020, 4:08:39 PM7/2/20
to Payara Forum
A couple of things. I recommend downloading the latest version of Payara as you are using an old version. The error relates to an incompatibility between the version of Java 8 you are using and the older software. I would recommend using the latest version of Payara on the latest JDK 11 or JDK 8 if you need JDK 8.

Michael Flynn

unread,
Jul 3, 2020, 7:00:48 AM7/3/20
to Payara Forum
>> A couple of things. I recommend downloading the latest version of Payara as you are using an old version. The error relates to an incompatibility between the version of Java 8 you are using and the older software. I would recommend using the latest version of Payara on the latest JDK 11 or JDK 8 if you need JDK 8.


Hi Steve,

I saw your answer (re incompatible versions) previously whilst searching the net but it seemed to be just one of a multitude of possibilities and I was wary of upgrading to JDK 11 in case I broke something else. Following your recommendation though I first tried upgrading Payara (payara-5.193.1 to payara-5.2020.2), but then Payara wouldn't even start, but then after also upgrading to JDK 11 (nothing else broke) and, hey presto, problem solved! Payara starts and I can now enable-secure-admin and access the management console on 4848.

I have now been able to retry my previous issue (post, New JDBC Connection Pool works on some machine not on other) to create postgresql connection pool but still can't connect.  At least I now have the management console (and latest Payara/Java versions) to look into matter further.

Cheers,
Mike
Reply all
Reply to author
Forward
0 new messages