Monday, November 11, 2024

Glassfish : Fix issue of secure admin must be enabled to access the DAS remotely

 The error "Secure Admin must be enabled to access the DAS remotely" occurs when you're trying to access the Glassfish Domain Administration Server (DAS) remotely, bu tthe secure admin feature is not enabled. By default, Glassfish disables remote administration for security reasons.

To fix this issue, you need to enable admin on your Glassfish server. Here's how you can do thath:

Step 1: Enable Secure Admin

1. Open the Glassfish Command Line Interface (asadmin):

  • Navigate to the 'bin' directory of your GlassFish installation.
  • Execute the 'asadmin' command.

2. Run the following command to enable secure admin:

asadmin enable-secure-admin

3. Resstart the GlassFish server:

  • If the server is running, restart it by running:

asadmin restart-domain

  • Alternatively, you can stop and then start the server:

asadmin stop-domain

asadmin start-domain 

 Step 2: Access the DAS Remotely

After enabling secure admin and restarting the server, you should be able to access the DAS remotely using the following URL:

https://your-server-ip:4848

Replace 'your-server-ip' with the IP address or hostname of your GlassFish server

Unblock with 'mysqladmin flush-hosts'

 You should put it into command line in windows.

mysqladmin -u [username] -p flush-hosts
**** [MySQL password]

or

mysqladmin flush-hosts -u [username] -p
**** [MySQL password]

For network login use the following command:

mysqladmin -h <RDS ENDPOINT URL> -P <PORT> -u <USER> -p flush-hosts
mysqladmin -h [YOUR RDS END POINT URL] -P 3306 -u [DB USER] -p flush-hosts 

you can permanently solution your problem by editing my.ini file[Mysql configuration file] change variables max_connections = 10000;

or

login into MySQL using command line -

mysql -u [username] -p
**** [MySQL password]

put the below command into MySQL window

SET GLOBAL max_connect_errors=10000;
set global max_connections = 200;

check veritable using command-

show variables like "max_connections";
show variables like "max_connect_errors";

Glassfish : Fix issue of secure admin must be enabled to access the DAS remotely

 The error "Secure Admin must be enabled to access the DAS remotely" occurs when you're trying to access the Glassfish Domain ...