Asadmin> enable-secure-admin - fails with NCLS-SECURITY-05200 error

On the Payrara Admin server when I login I get this error:

Secure Admin must be enabled to access the DAS remotely.

To resolve this issue I tried to enable-secure-admin but this fails. So I am stuck.

root@ubuntu-s-1vcpu-2gb-tor1-01:~/iuclid6/iuclid6-server-6.8.0/glassfish4/bin# ./asadmin
Use "exit" to exit and "help" for online help.
asadmin>
asadmin> get secure-admin.enabled
secure-admin.enabled=false
Command get executed successfully.
asadmin> enable-secure-admin

remote failure: NCLS-SECURITY-05200 : org.jvnet.hk2.config.TransactionFailure: Constraints for this JmxConnector configuration have been violated: on property [ port ] violation reason [ must be between 1 and 65535, or reference a system property using the form ${SYSTEM_PROPERTY_NAME} ]
Command enable-secure-admin failed.

Hi,

There’s probably something wrong in the JMX connector configuration in the Admin service. Look at the value of the Port field, maybe it’s set to a system property which isn’t defined?

This isn’t anything that I’ve ever seen before so I can’t help much more without more information.

Ondro

Thank you ondromihalyi.

I looked as asenv.conf file below are the contents.
/config/asenv.conf
export ASADMIN_LISTENER_PORT=4848
export HTTP_LISTENER_PORT=8080

But when I start the server it says using Admin Port: -1.

However the admin is available at 4848
[http://159.203.15.193:4848/j_security_check]
u: admin p: admin123

./asadmin start-domain 
Waiting for domain1 to start ......

Successfully started the domain : domain1
domain Location: /root/iuclid6-server-6.2.0/glassfish4/glassfish/domains/domain1
Log File: /root/iuclid6-server-6.2.0/glassfish4/glassfish/domains/domain1/logs/server.log

`**Admin Port: -1**`
Command start-domain executed successfully.

Does this info provide a bit more idea on what may be the issue. Thank you!