GlassFish 5 Build 25 : Cannot start JMX connector JmxConnector config


I am unable to start the JMX connecter. Using the Admin GUI I have set the JMX connector to port 8686 in Admin Service. Also under JVM Settings I have put this in JVM OptionsĀ Sharing the error message below:
Cannot start JMX connector JmxConnector config: { name = system, Protocol = rmi_jrmp, Address =, Port = 8686, AcceptAll = false, AuthRealmName = admin-realm, SecurityEnabled = true} due to exception java.lang.RuntimeException: Port 8686 is not available for the internal rmi registry. This means that a call was made with the same port, without closing earlier registry instance. This has to do with the system jmx connector configuration in admin-service element of the configuration associated with this instance]]
at org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread.startConnector(
at org.glassfish.admin.mbeanserver.JMXStartupService$
I also tested by changing the port, but still I get the same issue. However when I run the command "netstat -ntlp", I do see that Java process is listening on the designated JMX port. What is the issue and how I can fix this ?